【正文】
)9. select * from 商品表1 where 單價all(select avg(單價) from 商品表1)10. select * from 商品表1 where 數(shù)量=some(select max(數(shù)量) from 商品表1 )11. select distinct 分類名 from 商品表1 group by 分類名 having count(*)112. select 商品表1.*,產(chǎn)地 from 商品表1,商品表2 where = and 產(chǎn)地 in (select 產(chǎn)地 from 商品表1 x,商品表2 y where = group by 產(chǎn)地 having count(*)=1)13. select *,單價*數(shù)量 as 總價值 from 商品表1 order by 總價值 desc 14. select * from 課程 where 課程號 in (select 課程號 from 選課 group by 課程號 having count(*)=2)15. select distinct 學(xué)生.* from 學(xué)生,選課 where = and 課程號=any(select 課程號 from 學(xué)生,選課 where = and 姓名=m1 )16. select ,課程名,count() as 人數(shù) from 課程,選課 where = group by ,課程名 order by 人數(shù)。1. select ,單價,數(shù)量,產(chǎn)地 from 商品表1,商品表2 where =2. select count(*) from 商品表1 where 數(shù)量103. select *