By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE
INSERT 0 12
| ref_time | max_updated | total | proc | percent | rounded | complete | settled | ready |
|---|---|---|---|---|---|---|---|---|
| 27793300 | 27808546 | 2 | 2 | 100.0 | 100 | t | t | t |
| 27793000 | 27808446 | 3 | 3 | 100.0 | 100 | t | t | t |
| 27794200 | 27808746 | 2 | 2 | 100.0 | 100 | t | f | f |
| 27793900 | 27808696 | 3 | 2 | 66.7 | 70 | f | f | f |
| 27793600 | 27808596 | 2 | 1 | 50.0 | 50 | f | t | f |
SELECT 5
ERROR: column "proc" does not exist LINE 5: , round(proc * 100.0 / total, 1) AS percent ^