Simple Window Function
October 8, 2012
Here's a simple window function, used to work out a count of rows.
bands_band
rows have a link to a regions_region
row.
These two queries produce the same results. First, a simple count
:
SELECT r.name, count(b.region_id) FROM regions_region r INNER JOIN …