I would like to count number of records with week number of 27.
SELECT count(*)
FROM booker.o
WHERE assigned_to_group
IN ( 'Writing' )
AND create_date > '2020-11-08'
AND (DatePart(week, resolved_date) - 1) = '27'
AND short_description = %corrective%`
Function: (DatePart(week, resolved_date) - 1)
convert given date to week number.
Example of short_description
columns: SP-ADDITIONAL CORRECTIVE ND - EU
-Research
I would like to extract the count of records only with week 27 and with a description that includes words: , corrective".
The number of records does not equal with records from the excel file but they should. So something must be wrong with my syntax. Also column status as a filter: resolved and closed. When I use my syntax all , closed" records disappear. Have you know any tips/solutions because I have no ideas. Thank you in advance.
Excel screen below: