日期:2014-05-17 浏览次数:21054 次
-- TRY IT .. SELECT CA.NAME, BB.BNAME, BB.PRICE FROM CARD CA, (SELECT * FROM (SELECT BR.CNO, BO.BNAME, BO.PRICE, ROW_NUMBER() OVER(PARTITION BY BR.CNO ORDER BY BO.PRICE DESC) RN FROM BOOKS BO, BORROW BR WHERE BO.BNO = BR.BNO) RR WHERE RN = 1) BB WHERE CA.CNO = BB.CNO;