求条sql语句
table xml_channel(cha_id ,cha_name )
table xml_new(new_id ,new_title,cha_id)
查询显示cha_id,num(num为xml_new中cha_id=xml_channel.cha_id的所有值)
------解决方案--------------------
select a.cha_id ,b.* from xml_channel a, (select cha_id , count(*) from xml_new group by cha_id) b
where a.cha_id =b.cha_id