Difference between two queries marked with ^
SELECT COUNT(*)
FROM customers_reports AS cr
JOIN customers_docs on customers_docs.customerId=cr.customerId
WHERE cr.firstDepositDate >= 2015-12-01 AND customers_docs.docs = "None";
This query returns 2 results.
SELECT COUNT(*)
FROM customers_reports AS cr
JOIN customers_docs on customers_docs.customerId=cr.customerId
WHERE cr.firstDepositDate >='2015-12-01' AND customers_docs.docs = "None";
^ ^
While this query returns 30,000 results.
May someone explain why?
Without single quotes the date value becomes the arithmetic expression and 2015-12-01 is 2002 which is obviously affect the result
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With