So I'm trying to find out the total clicked on a link, but getting wrong results.
My first query, get total rows:
SELECT DISTINCT [email]
FROM [BOZTICKETS].[dbo].[Bozzuto25]
Gets 203 rows
Second query, get those with value False:
SELECT DISTINCT [email]
FROM [BOZTICKETS].[dbo].[Bozzuto25]
WHERE (changes = 'FALSE')
Which gets 148 rows
Last query WHERE changes='TRUE'
gets 61 rows
All together it adds up to 209 rows where it should be 203. Any ideas?
Most likely, you have some emails (six, probably) that have one or more records with changes TRUE and also one or more records with changes FALSE.
Those emails will contribute to all three query results.
If so, you can find them with:
SELECT [email] FROM [Bozzuto25]
GROUP BY [email]
HAVING MAX(changes) <> MIN(changes)
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments