I have a table with ~150 columns. I'd like to find the count(distinct(colName))
for each column but am wondering if there's a way to do so without actually typing out each column name.
Ideally I would use count(distinct(*))
but this doesn't work.
Any other suggestions?
EDIT:
if this is my table:
id col1 col2 col3 ...
01 10001 west north
02 10001 west south
03 10002 east south
04 10002 west north
05 10001 east south
06 10003 west north
I'm looking for this output
count(distinct(id)) count(distinct(col1)) count(distinct(col2)) count(distinct(col3))
6 3 2 2