Leejoy
Leejoy

Reputation: 1446

Convert TSQL to HSQL

How do I convert the following TSQL statement to 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

Upvotes: 0

Views: 914

Answers (1)

Leejoy
Leejoy

Reputation: 1446

select t1 from table_1 t1 where t1.year = ( select max(year) from table_1 where t1.C1=C1)

Upvotes: 1

Related Questions