Postgres Window Function Filter In R Studio Tutorial