Every MySQL database programmer should learn and apply the newly added MariaDB and MySQL Window Functions and Common Table Expressions(CTEs) in their daily work. Both CTEs and window functions enable easy solutions to many query challenges that in prior releases have been difficult and sometimes impossible to surmount. Mastering these features opens the door to query solutions that are more robust, execute faster, and are easier to maintain over time than prior solutions using older techniques.
In our last blog we compared User Roles in MySQL 8 vs. MariaDB. Today, we will here compare Window Functions and Common Table Expressions in both databases.
While all database administrators are familiar with aggregate functions like COUNT(), SUM(), and AVG(), far less people make use of window functions in their queries. Unlike aggregate functions, which operate on an entire table, window …[Read more]