描述
牛客有评论记录表`comment_detail`,输出所有第二话题为1002的评论对应的第一话题subject_id1的数量cnt,按照第一话题升序排序,查询返回结果名称和顺序为
subject_id1|cnt
`comment_detail`
示例1
输入:
drop table if exists comment_detail; create table `comment_detail`( id int(11) comment 'ID', comment text comment '评论内容', subject_set text comment '所属话题, 第一所属,第二所属, ....... 逗号分隔', type_id int comment '被标记类型' ); insert into `comment_detail` values (1, '试一 下吧', '1001,1002,1003', 100); insert into `comment_detail` values (2, '是吗?', '10086,1002,10010', 101); insert into `comment_detail` values (3, '是的,真的啊!', '', 102); insert into `comment_detail&#