Advertisement
Advertisement

新足迹

 找回密码
 注册
新足迹 门户 IT专业论坛 查看内容

简单的oracle SQL问题

2013-9-5 12:14| 发布者: porcorosso | 查看: 1971| 原文链接

  1. ID         KEYWORD(VARCHAR255)         TIMESTAMP
  2. ---------------------------------
  3. 1        abc                                        01/SEP/13
  4. 2        123                                        01/SEP/13
  5. 3        abc                                        01/SEP/13
  6. 4        123                                        02/SEP/13
  7. 5        456                                        02/SEP/13
  8. 6        zxc                                        02/SEP/13
  9. 7        zxc                                        03/SEP/13
  10. 8        456                                        03/SEP/13
  11. 9        abc                                        04/SEP/13
  12. 10        abc                                        05/SEP/13
复制代码
问:如何建立optimised query来读取 "top 2 unique keywords with it's latest timestamp"

答案应该是

  1. abc        05/SEP/13
  2. 456        03/SEP/13
复制代码
Advertisement
Advertisement


Advertisement
Advertisement
返回顶部