Answers for "count distinct by two columns sql"

3

pandas groupby column count distinct values

# Pandas group by a column looking at the count unique/count distinct values of another column

df.groupby('param')['group'].nunique()
Posted by: Guest on May-15-2020
1

select count distinct multiple columns sql server

SELECT COUNT(DISTINCT (CHECKSUM(DocumentId,DocumentSessionId)) + CHECKSUM(REVERSE(DocumentId),REVERSE(DocumentSessionId)) )
FROM DocumentOutPutItems
Posted by: Guest on August-05-2020
0

dax count distinct based on 2 columns

--Without filters
Measure1 = COUNTROWS(GROUPBY(User,User[FNAME],User[Card ID],User[Health ID],User[Gender]))
--With filters
Measure2 = COUNTROWS(FILTER(GROUPBY(User,User[FNAME],User[Card ID],User[Health ID],User[Gender]),User[Gender]="M"))
Posted by: Guest on March-24-2020

Python Answers by Framework

Browse Popular Code Answers by Language