In the Google Sheets table, you can specify the fields to be broken down and the sorting method, but I'm imagining something like that
·