By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
| version |
|---|
| PostgreSQL 12.5 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5), 64-bit |
9 rows affected
| id | cnt | sum_ | show |
|---|---|---|---|
| 2 | 1 | 1 | false |
| 4 | 1 | 2 | false |
| 5 | 2 | 4 | false |
| 1 | 10 | 14 | false |
| 6 | 10 | 24 | true |
| 3 | 25 | 49 | true |
| 7 | 50 | 50 | true |
| 8 | 90 | 140 | true |
| 9 | 90 | 230 | true |