'Organize a query by weeks and display the data in different tables

I have a MySQL table in which I have the information of the classrooms which go from 1 to 11, each week they have to collect a number of caps, for example room 1 and 2 in week 1-01- 2022, collected 10 and 10 caps, in the week 7-01-22 room 1 and 2 collected 10 and 20.

I am doing this project in node js with template engine express-hablebars, I don't know if there is a solution so that I can divide this information that creates a table for each week and not show the information in a row.

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source