如何加入SELECT查询

时间:2015-08-25 05:44:42

标签: sql-server

我有三个问题如下:

select sum(prod) as Production ,sum(rej) as Rejection 
where machinename='A' from data

select sum(prod) as Production ,sum(rej) as Rejection 
where machinename='B' from data 

select sum(prod) as Production ,sum(rej) as Rejection 
where machinename='C' from data

我希望加入这些查询以获得单行输出。

0 个答案:

没有答案