I am struggling to resolve this . I have a table like this .
+-------------+-------+ | type | COUNT | +-------------+-------+ | A
how abt this:
select a.col as type,coalesce (`COUNT`,0) as `count` from (select 'A' as col union all select 'B' as col union all select 'C' as col union all select 'D' as col )a left join Table1 T on a.col=T.type order by FIELD(a.col,'A','B','C','D') ;