select * from sales
where payterms='ON invoice'
select top 2 qty from sales where payterms='net 60'
select * from sales order by qty
select * from sales where payterms='net 60' order by qty
select stor_id,sum(qty) from sales group by stor_id
select * from sales where ord_num like 'p3%'
select royalty from titles where royalty is not null
select advance from titles where advance>7000
select type,avg(price) as '平均值'from titles group by type
select title_id,max(royaltyper) as '最大值' from titleauthor where au_id like '[^8]%8%' group by title_id
select * from sales where ord_date between '1993' and '1994' order by title_id desc
select top 40 percent * from sales
select count (地区) as '供应商总数',地区 from 供应商 group by 地区
select 供应商ID,传真 from 供应商 where 传真 is not null
select 产品名称,单价*订购量 as '总价' from 产品
select top 10 *,运货费 from 订单 order by 运货费 desc
select 货主名称,货主地址,货主城市,货主邮政编码 from 订单 where 货主名称 like '方%'