如何为以下内容的复杂查询中编写条件或hql转换

时间:2018-07-10 05:53:15

标签: select

如何为以下条件的复杂查询编写条件或hql转换:

SELECT b.health, b.site_id, b.server_time FROM 
       (SELECT health, MAX(server_time) AS max_timestamp  
       FROM traffview.health_status GROUP BY health,site_id ORDER BY site_id,health) a
INNER JOIN traffview.health_status b ON a.max_timestamp = b.server_time 
WHERE b.is_Error = true 
       AND b.server_time > CURRENT_TIMESTAMP - INTERVAL '30 days' 
       ORDER BY server_Time DESC 

0 个答案:

没有答案