Re: Conditional return of aggregated data
"Ravi Krishna" <[email protected]>
| Newsgroups | gmane.comp.db.postgresql.general |
|---|---|
| Message-ID | <trinity-d2559a0b-faa4-465b-b2cd-1878b08feb22-1575287569190@3c-app-mailcom-lxa05> |
> My initial idea was something along the lines of : > select (select sum(statcount) from stats_residence) as aggstat,statcount,short_name_en from stats_residence where aggstat>some_number; Am I missing something basic. The above can be done using GROUP BY and HAVING clause.