Window Functions in MySQL
Window functions are an advanced feature offered by MySQL to improve the execution performance of queries. These functions act on a group of rows related to the targeted row called window frame. Unlike a GROUP BY
clause, Window functions do not collapse the rows to a single row — preserving the details of each row instead. This new approach to querying data is invaluable in data analytics and business intelligence.
Window Functions vs. Aggregate Functions
Aggregate functions are used to return a single scalar value from a set of rows. Some prominent aggregate functions available in MySQL are SUM
, MIN
, MAX
, AVG
, and COUNT
. We can use these functions combined with the GROUP BY
clause to get an aggregated value.
from DZone.com Feed https://ift.tt/3ha7AXF
No comments:
Post a Comment