将TSQL转换为HSQL

时间:2012-02-29 05:18:14

标签: hibernate ejb-3.0 hsqldb seam

如何将以下SQL语句转换为HSQL。

SELECT * 
  FROM (SELECT d.*, 
               DENSE_RANK() OVER (PARTITION BY C1 ORDER BY Year desc) AS dr
          FROM table_1 d) dd
 WHERE dr = 1

1 个答案:

答案 0 :(得分:1)

从table_1 t1中选择t1,其中t1.year =(从table_1中选择max(year),其中t1.C1 = C1)