mysql - question about group by -


how to write an SQL like this, mysql to get the amount of X> 20 and <20,

select date, numberOfXMoreThan20, numberOfXLessThan20, otherValues ​​

from the table

(date, x> 20 and x of & lt; 20) Group

is my way, but I think it is not good

select from less20.id_date, A, B (select id_date , Count (Duree_Attente_Avant_Abandon) cnav_reporting.contact_global where as a

as low as 20 ), Select at least 20 as 2020, (id_date according to 20 groups), (id_date, select from cnav_reporting.contact_global as b (duree_Attente_Avant_Abandon); .id_date = more20.id_date

Thanks

"itemprop =" text ">

  date of selection, SUM (IF (X) DownTwenty, as in 'table` group by otherValue` date`, `otherValue` 
as the overTwenty, SUM (IF (X of <20), 1, 0) / Code>

Comments