nicer examples for aggregate calls
| От | PG Doc comments form |
|---|---|
| Тема | nicer examples for aggregate calls |
| Дата | |
| Msg-id | 163499710897.684.7420075366995883688@wrigleys.postgresql.org обсуждение исходный текст |
| Ответы |
Re: nicer examples for aggregate calls
|
| Список | pgsql-docs |
The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/14/tutorial-agg.html Description: currently, all of the examples are very simple, like SELECT city, max(temp_lo) FROM weather WHERE city LIKE 'S%' -- (1) GROUP BY city HAVING max(temp_lo) < 40; this example would be more complex and would allow users to search for clause "filter": Finally, if we only care about cities whose names begin with “S” and we want to calculate the number of observations in each city with temp_lo over 30, we might do: SELECT city, max(temp_lo), count(*) filter (temp_lo>30), FROM weather WHERE city LIKE 'S%' -- (1) GROUP BY city HAVING max(temp_lo) < 40;
В списке pgsql-docs по дате отправления: