I am trying to find the number of unique IDs in my table and these two lines of code give me two different results:
select distinct [ID]
from df1
-- The table returned in results tab total of 2,300,000 rows
select distinct count(ID) as ID
from df1
-- The count of the output is 97,000,000
Is the reason for this discrepancy because SQL Server limits the number of rows in the results tab?