I have a table of trading results
Here is the date format : 2017-08-22 20:47:14
I want to be able to get results in various options for example, results where trades were executed on monday or froday or mondays. and tuesdays or mondays wednesdays and thursdays
In other words I want to choose a specific weekday or specific weekdays
I tried "SELECT item, SUM(profit) AS profit FROM data WHERE DATEPART(WEEKDAY, Date) IN (2, 3, 4) GROUP BY item "
It doesn’t work.
How do I code the query right?