如何将以下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
答案 0 :(得分:1)
从table_1 t1中选择t1,其中t1.year =(从table_1中选择max(year),其中t1.C1 = C1)