如何为以下条件的复杂查询编写条件或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