By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
| now | version | setseed |
|---|---|---|
| 2024-05-04 16:23:59.484701+01 | PostgreSQL 14.10 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-20), 64-bit |
SELECT 1
SELECT 5
ERROR: syntax error at end of input LINE 7: SUM(CASE totals.valid = 0 WHEN TRUE THEN amount ELSE 0... ^ CONTEXT: invalid type name "SUM(CASE totals.valid "
ERROR: duplicate declaration at or near "SELECT" LINE 8: SELECT --it is still a variable declaration ^
DO
DO
DO
DO