What is the function of with rollup in MySQL
This article shows you what the role of with rollup in MySQL is, the content is concise and easy to understand, it can definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
1.grouping function. The grouping function is used in sqlserver, which has never been used before.
Grouping is used together with with rollup for aggregate calculation after grouping. There is no grouping function in mysql, so it needs to be modified. The function of with rollup is to count the grouped data.
This is the data after the basic grouping query.
This is the result of using with rollup
Then use IFNULL to improve the null value.
Related sql
The above content is what is the role of with rollup in MySQL. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.