SQL Server gives me wrong values?

pedrum golriz

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?

Larry Lustig

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.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

SQL Server Generate a specific set of year values from a column which gives me one single date/year

From Dev

SQL Server Generate a specific set of year values from a column which gives me one single date/year

From Dev

SQL Server gives me a different result

From Dev

Why is SQL Server giving me wrong output?

From Dev

UIBarButtonItem gives me wrong frame for popoverPresentationController

From Dev

what is wrong in my Rijndael that gives me this?

From Dev

Time difference in seconds gives me wrong answers

From Dev

what is wrong in my Rijndael that gives me this?

From Dev

PHP Date Function Gives Me A Wrong Time

From Dev

String.length() gives me a wrong value

From Dev

compare dates which gives me wrong result

From Dev

QMediaPlayer gives me wrong informations about video

From Dev

Wrong column values SQL Server Views after table schema update

From Dev

Firefox gives wrong values for image width and height

From Dev

Copying bytes to struct gives wrong values

From Dev

assignment of packed bitfield struct gives wrong values

From Dev

Simple subtraction gives wrong values in Tensorflow

From Dev

SUM(columnname) gives me a different result than manually summing columnname in SQL Server. Why?

From Dev

SQL Server : replace script error gives me String or binary data would be truncated

From Dev

SQL query gives me random order even with an ORDER BY clause on server but not localhost

From Dev

SQL Join gives wrong results (creates duplicates)

From Dev

Dividing values gives me a small inaccuracy?

From Dev

SQL Server gives syntax error

From Dev

WWW POST gives me Internal Server Error

From Dev

Installer Script gives me 'Wrong Entity ID' Magento error

From Dev

CakePhp Config.timezone gives me wrong time

From Dev

Doctrine2 gives me wrong sequence numbers (overflow)

From Dev

count() gives me wrong output after while loop

From Dev

CakePhp Config.timezone gives me wrong time

Related Related

  1. 1

    SQL Server Generate a specific set of year values from a column which gives me one single date/year

  2. 2

    SQL Server Generate a specific set of year values from a column which gives me one single date/year

  3. 3

    SQL Server gives me a different result

  4. 4

    Why is SQL Server giving me wrong output?

  5. 5

    UIBarButtonItem gives me wrong frame for popoverPresentationController

  6. 6

    what is wrong in my Rijndael that gives me this?

  7. 7

    Time difference in seconds gives me wrong answers

  8. 8

    what is wrong in my Rijndael that gives me this?

  9. 9

    PHP Date Function Gives Me A Wrong Time

  10. 10

    String.length() gives me a wrong value

  11. 11

    compare dates which gives me wrong result

  12. 12

    QMediaPlayer gives me wrong informations about video

  13. 13

    Wrong column values SQL Server Views after table schema update

  14. 14

    Firefox gives wrong values for image width and height

  15. 15

    Copying bytes to struct gives wrong values

  16. 16

    assignment of packed bitfield struct gives wrong values

  17. 17

    Simple subtraction gives wrong values in Tensorflow

  18. 18

    SUM(columnname) gives me a different result than manually summing columnname in SQL Server. Why?

  19. 19

    SQL Server : replace script error gives me String or binary data would be truncated

  20. 20

    SQL query gives me random order even with an ORDER BY clause on server but not localhost

  21. 21

    SQL Join gives wrong results (creates duplicates)

  22. 22

    Dividing values gives me a small inaccuracy?

  23. 23

    SQL Server gives syntax error

  24. 24

    WWW POST gives me Internal Server Error

  25. 25

    Installer Script gives me 'Wrong Entity ID' Magento error

  26. 26

    CakePhp Config.timezone gives me wrong time

  27. 27

    Doctrine2 gives me wrong sequence numbers (overflow)

  28. 28

    count() gives me wrong output after while loop

  29. 29

    CakePhp Config.timezone gives me wrong time

HotTag

Archive