I have a table with 12,000 rows of data. The table is comprised of 7 columns of data (PIDA, NIDA, SIDA, IIPA, RPRP, IORS, DDSN) each column with 4 entry types ("Supported", "Not Supported", "Uncatalogued", or "NULL" entries)
+--------------+-----------+--------------+-----------+
| PIDA | NIDA | SIDA | IIPA |
+--------------+-----------+--------------+-----------+
| Null | Supported | Null | Null |
| Uncatalogued | Supported | Null | Null |
| Supported | Supported | Uncatalogued | Supported |
| Supported | Null | Uncatalogued | Null |
+--------------+-----------+--------------+-----------+
I would like to generate an output where each entry is counted for each column. Like column to row transpose.
+---------------+------+------+------+------+
| Categories | PIDA | NIDA | SIDA | IIPA |
+---------------+------+------+------+------+
| Supported | 10 | 20 | 50 | 1 |
| Non Supported | 30 | 50 | 22 | 5 |
| Uncatalogued | 5 | 10 | 22 | 22 |
| NULL | 10 | 11 | 22 | 22 |
+---------------+------+------+------+------+
Not having any luck with inline select or case statements. I have a feeling a little bit of both would be needed to first count and then list each as row in the output
Thanks all,