I have this query
select count ( * )
from
table1
where
code ='947'
and update_date >='2019-01-01' and update <= '2019-01-31'
and
case when left(st_no,2)='US' then left (st_no,9) else com_code end='US0010101'
group by bng_datenow in that case condition
case when left(st_no,2)='US' then left (st_no,9) else com_code end='US0010101'
this query fetch data of this 'US0010101' against this condition
left(st_no,2)='US'then left (st_no,9)
and data display like per day wise
now i want data of all com_code wise against this condition
left(st_no,2)='US' then left (st_no,9)
how i modify this query ?
if case is not work then any other alternative solution ?