菜鸟提问简单的sql 要求效率高 ( 积分: 50 )

  • 主题发起人 主题发起人 hitman007260
  • 开始时间 开始时间
還可以寫成
select a.* from aa as a,(
select sname from aa
where cj='優'
group by sname
having count(*)=(select max(icount) from (select count(*) as icount from aa group by stime) as a)) as b
where a.sname=b.sname
 
多人接受答案了。
 

Similar threads

S
回复
0
查看
857
SUNSTONE的Delphi笔记
S
S
回复
0
查看
783
SUNSTONE的Delphi笔记
S
D
回复
0
查看
2K
DelphiTeacher的专栏
D
D
回复
0
查看
1K
DelphiTeacher的专栏
D
D
回复
0
查看
2K
DelphiTeacher的专栏
D
后退
顶部