row_number() over (partition by table.field, table.field etc order by table.field asc)
You use the groupings if for what you want to group by (you might be able to skip that if you literally only want row numbers) and order by is what the numbering uses to order by. You can also add asc or dec for which way you want the order to go by.