Can anyone please clarify what this query will return ?
SELECT TestCase FROM MyTable WHERE Verdict = 'PASS' AND
StartTime > DATE_SUB(NOW(), INTERVAL 2 MONTH)
Can anyone please clarify what this query will return ?
SELECT TestCase FROM MyTable WHERE Verdict = 'PASS' AND
StartTime > DATE_SUB(NOW(), INTERVAL 2 MONTH)
All passing test cases that were run (started, to be precise) in the last two months.
DATE_SUB(NOW(), INTERVAL 2 MONTH)
will return the date that was 2
months
before from present date.
So your query will return all the test cases that have Verdict
as 'PASS'
and whose startTime
was within the last 2 months.
This Query will return all the "TestCase" which has the Verdict value is equal to 'PASS' for the past 2 months...that is (current month-2)