当前位置: 代码迷 >> Oracle管理 >> 数据库面试题.如何做
  详细解决方案

数据库面试题.如何做

热度:512   发布时间:2016-04-24 05:58:41.0
数据库面试题...怎么做啊
有一个表    
 
aTable    
 
name         ¦     number    
-------------    
a                                     2    
b                                     3    
a                                     1    
c                                     9    
a                                     6    
b                                     3    
 
不能用groupby     不能用max等这些函数,怎么写查询语句查出    
a     b     c     中分别最大的     number     啊????

------解决方案--------------------
Select distinct * from aTable t where not exists
(Select * from aTable where name=t.name and number> t.number)
  相关解决方案