Is this kind of count possible?

bplus

Registered User.
Local time
Yesterday, 21:06
Joined
Jun 14, 2006
Messages
10
Hi,
Im very new to sql so please excuse my ignorance, I ve been trying to do this for a while and not getting anywhere:
I have a table that has customer and product data in it. Its super market data.
I have a field that has customer education level (education), this holds text, (bachelors degree, graduate degree, high school degree, partial college, partial high school)

and a field low_fat which is boolean (0 or -1), wether the product purchased was low fat or not.

Im interested in the realtionship between education level and number of low_fat products purchased.

I'd like a resultset that counts the number of low_fat products purchased for each category of degree level. Something that looks like this

EDUCATION Low_fat_Count
bachelors degree 500
graduate degree 234
high school degree 124
partial college 333
partial high school 124

Is this possible?

So far I've come up with this:
SELECT education, COUNT(*)
FROM AllTablesMerged
WHERE low_fat=-1
GROUP BY education;

but access asks me for specify parameters for education and low_fat.

Thanks in advance for any help on this!
 
Can't you build this using the query builder? Then you can examine the sql it generates to see how you would go about building it...
 
I ve used the "simple query wizard before" but I cant see how to do counts in it.
I tried the deisgn view query builder and cant see how to do counts there either.
 

Users who are viewing this thread

Back
Top Bottom