By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
| version |
|---|
| PostgreSQL 9.5.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 1
| section | status | count |
|---|---|---|
| A | Active | 1 |
| A | Inactive | 2 |
| B | Active | 4 |
| B | Inactive | 5 |
SELECT 4
ERROR: function crosstab(unknown, integer) does not exist LINE 4: FROM crosstab('select section::text, status, count::text fro... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts.