Question11: How can I li

16 查阅
Question11: How can I list all book with prices greather than theaverage price of books of the same

参考答案:

正确答案:
Answer 11:
select a.type,a.title,a.price from titles a,
(select type,price=avg(price) from titles group by type)b
where a.type=b.type and a.price>b.price