Counting rows from multiple tables in a single query in PostgreSQL
I've been trying to make a query more efficient by bringing together counts from multiple tables. I have a schema similar to this: create table "impressions" ( id serial primary key, ip inet, ad_id integer references ad(id), user uuid references…