|
Tabulating the frequency of data values in a variable
EXAMPLE DATABASE: NhanesDATA INPUTTable nhanes in the Nhanes.mdb database is the input.
QUERY frequency_of_infantsSELECT age, COUNT(age) AS infant_count FROM nhanes WHERE ageunit = 'M' GROUP BY age; Query frequency_of_infants lists the age frequency of infants below 1 year old.
DISCUSSIONThe query counts the number of infant records by age (in months), given the condition that the ageunit is M, which stands for MONTH.
QUERY frequency_by_ageSELECT age, COUNT(age) AS count FROM nhanes WHERE ageunit='Y' GROUP BY age; Query frequency_by_age lists the age frequency of respondents who are 1 year old and above.
DISCUSSIONThe query counts the number of respondent records by age (in years), given the condition that the ageunit is Y, which stands for YEAR.
Last modified September 23, 2008 9:13 am
|