What is the best way to find out how many bookings a team has done on each date
I have two tables
Table Bookings
Date | Team |
---|---|
21-6-2021 | MM |
21-6-2021 | MM |
21-6-201 | Lead |
Table Datetable
Date | Team MM bookings on date |
---|---|
21-6-2021 | 2 |
If I could do SQL I would do something like for Team MM bookings on date:
Count(select Bookings.Team from Bookings, Datetable where Bookings.Date=Datetable,Date and Bookings.Team=‘MM’)
What I do instead is to create a template columns, relation columns and rolloup
Table Bookings
Date | Team | tpl Team on date |
---|---|---|
21-6-2021 | MM | MM21-6-2021 |
21-6-2021 | MM | MM21-6-2021 |
21-6-201 | Lead | Lead21-6-2021 |
Table Datetable
Date | tpl team on date | rel MM bookings | Team MM bookings on date |
---|---|---|---|
21-6-2021 | MM21-6-2021 | MM21-6-2021 MM21-6-2021 | 2 |
rel MM bookings is relation column with multiple match and the match is tpl Team on date
MM bookings on date is a rollup column where rel MM bookings is counted
But is there a better way?