Need to group Pocketbase collection by year

24 views Asked by At

I'm using sveltekit and pocketbase and have a collection named competitionResults competitionResults table

I need to make a page that displays the results of every year in year groups. E.g. it should looks something like this.

2024
Competition X - William Winner - Ricky Runner Up
Competition Y - William Winner - Ricky Runner Up
Competition Z - William Winner - Ricky Runner Up

2023
Competition X - William Winner - Ricky Runner Up
Competition Y - William Winner - Ricky Runner Up
Competition Z - William Winner - Ricky Runner Up

2022
Competition X - William Winner - Ricky Runner Up
Competition Y - William Winner - Ricky Runner Up
Competition Z - William Winner - Ricky Runner Up

I've tried to figure out how to group things but I don't understand the docs.

0

There are 0 answers