I need to write a statement to display every column in a table, the count and percentage of records with that column populated, and the distinct count of values.
For example if I had a table Address containing:
Addr1 | AddrText | PostalCode
11111 | demo ave | 91210
22222 | demo2 ave | null
33333 | null | null
It should display something like:
columns | Count | Percentage
Addr1 | 3 | 100
AddrText | 2 | 66.6
PostalCode | 1 | 33.3
Or have the columns remain the same and put only the data as rows, but I figured the above may be easier.
ps: Sorry if I couldn't get the formatting right but I hope you get the idea.