https://betapython.com/how-can-i-return-pivot-table-output-in-mysql/
How can I return pivot table output in MySQL?