Count days in date range?

后端 未结 5 1741
无人及你
无人及你 2021-01-20 10:57

I have a query like this:

SELECT COUNT(*) AS amount
FROM daily_individual_tracking
WHERE sales = \'YES\'
AND daily_individual_tracking_date BETWEEN \'2010-01         


        
5条回答
  •  自闭症患者
    2021-01-20 11:27

    I'm not sure which SQL you are using. TSQL has a DATEDIFF that will count the number of days between two dates. See this

提交回复
热议问题