Ankit  Shukla

Ankit Shukla

  • NA
  • 681
  • 117.6k

where clause is not working with group by

Jan 7 2020 3:07 AM
Hello All,
 
My query is:

Select Reg_year, count(*) as Total
From t_Data FR
Where fr.STATE_CD=35
and fr.Insert_DATA_Date >= '2017-01-01 15:25:16.437'
and fr.Insert_DATA_Date <= '2019-12-01 15:25:16.437'
group by Reg_year 
 
Problem:  date filter is not working.
Output comes like:
 
 Reg_Year    |  Total
-------------------------------
 2015           | 6
 2016           | 9
 2017           | 13
 2018           | 11
 
Thanks in advance

Answers (7)