var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Simple Query Help
Hi. I have a relatively simple question, but it is difficult to describe! Thanks for any help
I am trying to make a query that accesses multiple tables through the use of foreign keys and JOINs. The trouble I am having is with formatting the output, as such.
What I need is a count of a combination of two columns.
it then looks at each possible Sex and FavColour combination and reports how many instances there are of each:
M RED 1
M BLUE 2
M GREEN 0
F RED 1
F BLUE 1
F GREEN 1
How can I achieve this?
Thanks very much
this is exceedingly simple, and it sounds way to much like a homework assignment
i'll give you two hints: COUNT(*) and GROUP BY
the rest you will have to come up with yourself
That's cool r937.
I know it is exceedingly simple but hey, beginner, and it's not as if is particularly simple to find things in the manual.
I was already on the path with GROUP BY in my head, and I will look at the other thing tomorrow. I like working it out for myself anyways.