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 | 27808599 | 2 | 2 | 100.0 | 100 | t | t | t |
| 27793000 | 27808499 | 3 | 3 | 100.0 | 100 | t | t | t |
| 27794200 | 27808799 | 2 | 2 | 100.0 | 100 | t | f | f |
| 27793900 | 27808749 | 3 | 2 | 66.7 | 70 | f | f | f |
| 27793600 | 27808649 | 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 ^
| ref_time | max_updated | total | proc | now_mins | interval_mins | percent | rounded | complete | settled |
|---|---|---|---|---|---|---|---|---|---|
| 27794200 | 27808799 | 2 | 2 | 27808899 | 200 | 100.0 | 100 | t | f |
| 27793300 | 27808599 | 2 | 2 | 27808899 | 200 | 100.0 | 100 | t | t |
| 27793000 | 27808499 | 3 | 3 | 27808899 | 200 | 100.0 | 100 | t | t |
| 27793900 | 27808749 | 3 | 2 | 27808899 | 200 | 66.7 | 70 | f | f |
| 27793600 | 27808649 | 2 | 1 | 27808899 | 200 | 50.0 | 50 | f | t |
SELECT 5
| ref_time | max_updated | total | proc | now_mins | interval_mins | complete | settled | percent | rounded | ready |
|---|---|---|---|---|---|---|---|---|---|---|
| 27793300 | 27808599 | 2 | 2 | 27808899 | 200 | t | t | 100.0 | 100 | t |
| 27793000 | 27808499 | 3 | 3 | 27808899 | 200 | t | t | 100.0 | 100 | t |
| 27794200 | 27808799 | 2 | 2 | 27808899 | 200 | t | f | 100.0 | 100 | f |
| 27793900 | 27808749 | 3 | 2 | 27808899 | 200 | f | f | 66.7 | 70 | f |
| 27793600 | 27808649 | 2 | 1 | 27808899 | 200 | f | t | 50.0 | 50 | f |
SELECT 5