Query to rank rows in groups
问题 I'm using Apache Derby 10.10. I have a list of participants and would like to calculate their rank in their country, like this: | Country | Participant | Points | country_rank | |----------------|---------------------|--------|--------------| | Australia | Bridget Ciriac | 1 | 1 | | Australia | Austin Bjorklun | 4 | 2 | | Australia | Carrol Motto | 7 | 3 | | Australia | Valeria Seligma | 8 | 4 | | Australia | Desmond Miyamot | 27 | 5 | | Australia | Maryjane Digma | 33 | 6 | | Australia |