Oracle兩表聯(lián)合查詢group?
select * from (SELECT b.CLIENTNO,b.CNAME,SUM(a.AMOUNT) TAMOUNT FROM PURCHASE a, CLIENT b where a.CLIENTNO=b.CLIENTNO GROUP BY a.CLIENTNO order by TAMOUNT) aa where rowNum=1
Oracle兩表聯(lián)合查詢group?
select * from (SELECT b.CLIENTNO,b.CNAME,SUM(a.AMOUNT) TAMOUNT FROM PURCHASE a, CLIENT b where a.CLIENTNO=b.CLIENTNO GROUP BY a.CLIENTNO order by TAMOUNT) aa where rowNum=1