My boss ask me some information: How many properties has each estate agent in our database. I need your help please.
I have a database with estate agents and properties. The properties are stored in table_ads: id category userid ad_text 45 flat 236 flat for rent 46 house 237 house for rent The estate agents are stored in table_ea: id name username email password 236 Robert Royalestate email@example.com x564d5s6s 237 David Boboestate firstname.lastname@example.org x5s4yhhs6s
I would like to get a list of estate agents with the quantity of properties they have
username qty Royalestate 18 Boboestate 26 etc...
So I need to creqate an SQL query which will count the quantity of each estate agent, display this quantity with the username.