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:
but access asks me for specify parameters for education and low_fat.
Thanks in advance for any help on this!
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!