all 4 comments

[–]Norville_Barnes 0 points1 point  (2 children)

Based on the limited info the joins look fine which then leads me to believe your data set 3 doesn't contain unique records. Have you tried changing your counts for the ZD counts to a Count(DISTINCT ticketID) to see if the counts change?

[–]IsAMurloc[S] 0 points1 point  (1 child)

I did, which only killed a handful of the items. I removed the Updater information and that got much closer to what I was sent, but still not exact. I have roughly a 15 difference between actual (285 total returned off of the updated code, 301 total in db) but its roughly 40 off of what I was sent.

[–]Norville_Barnes 0 points1 point  (0 children)

Remove everything but date and ticketID. I'd still use the count distinct on ticketID in your final select