[consult] mysql how to achieve excel data perspective

1. At present, there is a pile of lists on hand. The fields are "time", "region", "point of sale", "product" and "product". They are grouped together under the condition of "point of sale". The practice on excel is very simple, PivotTable, in the row side of the five dimensions, the value on the "point of sale" field summation, can be achieved.

2. The current situation is that the data is more than 1.5 million and cannot be implemented in excel. In the case of mysql, you haven"t learned much before, only simple queries and basic group by statements, but you don"t know how to implement this situation where you need to present other field data in a conditional summary. Ask the gods for answers. Thank you.

Feb.20,2022
What exactly do you mean by

"situations in which data from other fields need to be presented in a conditional summary"? Sum by point of sale? Average? Or sort output? Specific requirements correspond to specific SQL.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb606a-2597.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb606a-2597.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?