select rank() over last_action_rank as "last_action_rank",
ua.id
from user_action ua
where ua.user_id is not null
and ua.action in ('upvote',
'downvote')
window last_action_rank as (partition by ua.playback_id,
ua.user_id
order by ts desc)
Get wrongly formatted, and window is not marked as a keyword:
Steps to Reproduce: A simple query like:
Get wrongly formatted, and window is not marked as a keyword:![image](https://user-images.githubusercontent.com/228250/55938489-c89bf280-5c3b-11e9-8a0c-57985c48eac5.png)
Check the docs for PSQL language definition: https://www.postgresql.org/docs/current/sql-select.html