select 单位,count(*) from 读者表 group by 单位;
select 单位,count(*) from 读者表 group by 单位 having count(*)>=2;
select 出版社,avg(round(单价)) ,sum(数量*round(单价))from 图书表 group by 出版社;
select 读者编号,条码,count(*) from 借阅表 group by 读者编号,条码 with rollup;
select * from 图书表 order by 数量 desc;
select * from 借阅表 order by 借阅状态,借阅日期;
select 类别号,单位,count(*) from 读者表,借阅表 where 读者表.读者编号=借阅表.读者编号 group by 类别号 ,单位 order by count(*) desc;
a