Hey everyone, I have the following two queries, and want to know why the first one would return a count of 52, but the second would return a count of 51 when technically they should be the same;
SELECT count(*) from Inquiry
Inner Join NoDecision on Inquiry.ID = NoDecision.InquiryID_fk
Inner Join Inquirer on Inquirer.ID = Inquiry.InquirerID_fk
WHERE (Inquiry.DecisionMade = 'No decision yet') AND
(Inquiry.Date >= '4/1/2012' AND Inquiry.Date <= '9/17/2012') AND
Inquirer.Program IN('Appleton','Brook','Fernside','Gunderson','Lincoln','Pavilion')
SELECT count(*) from Inquiry
Inner Join Inquirer on Inquirer.ID = Inquiry.InquirerID_fk
WHERE (DecisionMade = 'No decision yet') AND
(Inquiry.Date >= '4/1/2012' AND Inquiry.Date <= '9/17/2012') AND
Inquirer.Program IN('Appleton','Brook','Fernside','Gunderson','Lincoln','Pavilion')
I understand that I am joining the NoDecision table, but I don't understand why that would increase the count by 1 in the first query.
Any help would be appreciated.
Thanks,
NickG