Check out example codes for "select count distinct multiple columns sql server". It will help you in understanding the concepts better.

Code Example 1

SELECT COUNT(DISTINCT (CHECKSUM(DocumentId,DocumentSessionId)) + CHECKSUM(REVERSE(DocumentId),REVERSE(DocumentSessionId)) )
FROM DocumentOutPutItems

Learn ReactJs, React Native from akashmittal.com