ник: Altu
Можно обойтись и без промежуточного запроса q1.
Тогда основной запрос будет выглядеть так:
SELECT tblTest.Sex, tblTest.Name, DPersent("age","[tblTest]","[sex]='" & [sex] & "' and [Name] = '" & [Name] & "'") AS Минимум, DPersent("age","[tblTest]","[sex]='" & [sex] & "' and [Name] = '" & [Name] & "'",10) AS [Нижний дециль], DPersent("age","[tblTest]","[sex]='" & [sex] & "' and [Name] = '" & [Name] & "'",25) AS [Первый квартиль], DPersent("age","[tblTest]","[sex]='" & [sex] & "' and [Name] = '" & [Name] & "'",50) AS [Медиана (второй квартиль)], DPersent("age","[tblTest]","[sex]='" & [sex] & "' and [Name] = '" & [Name] & "'",75) AS [Третий квартиль], DPersent("age","[tblTest]","[sex]='" & [sex] & "' and [Name] = '" & [Name] & "'",90) AS [Верхний дециль], DPersent("age","[tblTest]","[sex]='" & [sex] & "' and [Name] = '" & [Name] & "'",100) AS Максимум, DPersent("age","[tblTest]","[sex]='" & [sex] & "' and [Name] = '" & [Name] & "'",63) AS [Произвольная персентиль (например, 63)]
FROM tblTest
GROUP BY tblTest.Sex, tblTest.Name;