I have a table that contains a column
year. I need, for each row, calculate the number of entries where the year is less than that in the row.
So that the output would look like:
col1 | col2 | … | year | number of entries prior to this year
I'm using PostgreSQL.