I have a table in Postgres:
zone_name | trade_name | client_name
G - WLA | Garage Doors | King Garage Doors
J - SOC | Attic | Attic Jimmy
E - SGV2 | Attic | Attic Jimmy
J - SOC | Closets | Brad Factory
E - SGV2 | Closets | Brad Factory
AE - SFE | Paint | Chris Painting
E - SGV2 | Kitchen | Joe Remodeling
I trying to create a table that shows how many clients (client_name) are in the same trade_name within the same zone_name.
I've been trying to use GROUP BY but couldn't figure it out.
Any ideas?
GROUP BY.select count(client_name), trade_name, zone_name from table group by trade_name, zone_name?