By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
| version |
|---|
| PostgreSQL 9.3.25 on x86_64-pc-linux-musl, compiled by gcc (Alpine 11.2.1_git20220219) 11.2.1 20220219, 64-bit |
SELECT 1
INSERT 0 6
| object_id | total_actives | total_records |
|---|---|---|
| 1 | 2 | 3 |
| 2 | 1 | 1 |
SELECT 2
| percentage |
|---|
| 0.5 |
SELECT 1