SQL如何使两个select语句查询结果合并一个? 10
查询语句1selectunit,count(*)asnumberfromarchives_managementgroupbyunit查询语句2selectfine_uni...
查询语句1
select unit,count(*)as number from archives_management group by unit
查询语句2
select fine_units,count(*) as fine_number from fine group by fine_units
想让两个语句变成一个,然后查询结果是
unit number fine_number
艾XXXXXXX 1 1
奥XXXXXXXX 1 0
北京XXXXXXX 2 0
...... ....... ......
求大神解决 展开
select unit,count(*)as number from archives_management group by unit
查询语句2
select fine_units,count(*) as fine_number from fine group by fine_units
想让两个语句变成一个,然后查询结果是
unit number fine_number
艾XXXXXXX 1 1
奥XXXXXXXX 1 0
北京XXXXXXX 2 0
...... ....... ......
求大神解决 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询