************************************************************************************************************************************************************************************
答案为:
select * from hard a
where je in(select top 2 je from hard b where a.qu=b.qu order by je)
************************************************************************************************************************************************************************************
统计查询的两种思路:
(1)、查询选修课程超过5门的学员号和所属单位
答案为:
select sn ,sd from s
where s# in(select s# from sc group by s# having count(distinct c#)>5)
(2)、
************************************************************************************************************************************************************************************
答案有错,纠正为:
select distinct a.*
from dbo.hc a left join dbo.hc b
on a.主叫号码=b.主叫号码
where a.id<>b.id and (datediff(second,a.通话起始时间,b.通话结束时间)>10)
and datediff(second,b.通话结束时间,a.通话起始时间)>10)
************************************************************************************************************************************************************************************