having postgresql example
Example: postgres having
SELECT
customer_id,
SUM (amount)
FROM
payment
GROUP BY
customer_id
HAVING
SUM (amount) > 200;Code language: SQL (Structured Query Language) (sql)
SELECT
customer_id,
SUM (amount)
FROM
payment
GROUP BY
customer_id
HAVING
SUM (amount) > 200;Code language: SQL (Structured Query Language) (sql)