An introduction to window functions in Redshift
michaelerasm.us