May 22nd, 2012, 02:42 AM
Join Date: May 2012
Time spent in forums: 10 m 27 sec
Reputation Power: 0
Help with query on multiple tables
I'm really hoping someone can help me. I'm trying to chart data from two different tables. I'm a noobie at this so any help would be greatly appreciated!
I have two tables:
What I need to extract from these tables are the forum and the result. For example the reviewForum could be A, B, C, D and result will be approved, not approved or cancelled. So what I need to do is extract the reviewForum and the result associated with it which I can do, however, I need to count how many results are associated with the reviewForum. So for A there could be 10 approved, 5 not approved and 2 cancelled.
here is the query I am using
SELECT r.reviewForum, m.result
FROM review r, mom m
WHERE r.reviewId = m.reviewID;
This checks the common field reviewId, if they match, extract. This extracts the reviewForum and result. I need a count of each result...can anyone help me?
That's probably not laid out the best way but I hope you understand...