Coloumn 1 Coloumn 2 Coloumn 3 1 Y 3 2 Y 3 3 Y 3 4 Y 4 5 Y 4
select count (distInct Coloumn 2 ),count (distinct Coloumn 3 ) from table.
count ( Coloumn 2 ) = 1
count ( Coloumn 3 ) = 2
count ( Coloumn 2 ) = 2
ount ( Coloumn 3 ) = 2
SELECT count(T.Coloumn2 ) Column2Count, count(T.Coloumn3 ) Column3Count FROM (SELECT DISTINCT Coloumn2 ,Coloumn3 FROM table) T
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)