String sql="(select AVG(mark),Count(stu_name),name from `all` group by name)union all(select count(*),name from `all`where mark<60 group by name)"
会出现下面的提示:
The used SELECT statements have a different number of columns
怎么才能让他们column一样?怎么做到使没有mark<60的分组,count=0
...全文
7915打赏收藏
sql中不同字段对应不同筛选条件
String sql="(select AVG(mark),Count(stu_name),name from `all` group by name)union all(select count(*),name from `all`where mark<60 group by name)" 会出现下面的提示: The used SELECT statements have a different number of columns 怎么才能让他们column一样?怎么做到使没有mark<60的