tags:

views:

19

answers:

1
+1  Q: 

MySQL Query help

I'm not very good at database queries. Need help with what is probably a simple query.

Database: MYSQL

zipcodes [table]

zip | city | state

post [table]

post_id | title | post | zip

I need to display the number of posts for each unique city.

+3  A: 
SELECT count(*) FROM post LEFT JOIN zipcodes ON post.zip = zipcodes.zip GROUP BY city;
Marius
Awesome, that works perfectly! Thx dude!
gAMBOOKa