How can i apply Multiple In clause in a single MySQL query -
How can i apply Multiple In clause in a single MySQL query -
i have list of ids , corresponding creation dates exmple :
1 2014-05-01
2 2014-07-01
3 2014-08-01
need suggestion regarding writing mysql
select statement gives id details after corresponding creation date.
select id,count(*) id_details id in(1,2,3) resolved_at >(2014-05-01,2014-07-01,2014-08-01) grouping id
the date status resolved_at
column not correct. again, if have 2 where
clause in query, not correct. can's specify >
status in in
clause trying. query should like
select id,count(*) id_details id in (1,2,3) , (resolved_at >= '2014-05-01' , resolved_at <= '2014-08-01') grouping id
i think trying utilize in
operator resolved_at
column like
select id, count(*) id_details id in (1,2,3) , resolved_at in ('2014-05-01','2014-07-01','2014-08-01') grouping id
mysql
Comments
Post a Comment