From: PG Doc comments form <noreply@postgresql.org>
To: pgsql-docs@lists.postgresql.org
Cc: branyi.laszlo@gmail.com
Subject: https://www.postgresql.org/docs/15/tutorial-agg.html
Date: Fri, 18 Nov 2022 21:26:34 +0000
Message-ID: <166880679445.636.13036369289525357491@wrigleys.postgresql.org> (raw)
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/15/tutorial-agg.html
Description:
city | max | count
---------+-----+-------
Hayward | 37 | 5
(1 row)
it's not right
SELECT city, max(temp_lo), count(*) FILTER (WHERE temp_lo < 30)
FROM weather
GROUP BY city
HAVING max(temp_lo) < 40;
city | max | count
---------+-----+-------
Hayward | 35 | 0
because
SELECT city, max(temp_lo), count(*) FILTER (WHERE temp_lo < 30)
FROM weather
WHERE city LIKE 'S%' -- (1)
GROUP BY city
HAVING max(temp_lo) < 40;
city | max | count
------+-----+-------
(0 rows)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: noreply@postgresql.org, pgsql-docs@lists.postgresql.org, branyi.laszlo@gmail.com
Subject: Re: https://www.postgresql.org/docs/15/tutorial-agg.html
In-Reply-To: <166880679445.636.13036369289525357491@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox