Scenario 1 - count of * rows:
A table has 10 records. Column B has duplicate rows with different values in Column A
A table has 10 records. Column B has duplicate rows with different values in Column A
then., Sql Query:
Code Snippet:
SELECT COUNT(ColumnA) AS Count_Headertext,
ColumnB AS
ColumnB_Headertext
FROM Tablename
GROUP BY ColumnB
Scenario 2 - count of distinct rows:
A table has 10 records. Column B has duplicate rows with different values in Column A
then., Sql Query:
Code Snippet:
SELECT COUNT(DISTINCT ColumnA) AS Count_Headertext,
ColumnB AS ColumnB_Headertext
FROM Tablename
GROUP BY ColumnB