Advanced AmiScript 3: AMI SQL Grouping and Joining Data
In this third tutorial of the AMI SQL series we will be continuing to work through the many features of the AMI SQL SELECT Statement. Starting with how to limit the number of rows returned in the result set using the LIMIT clause and moving on to explore how we can use GROUP BY to create groups in our data. Once we have grouped the data we will investigate applying aggregation functions to those groups, grouping on multiple columns and how to filter post grouping using HAVING. The second half of the tutorial will be spent on the JOIN clause, demonstrating what it does and going through the many types of JOIN such as LEFT, RIGHT ONLY and OUTER. Along the way we will look at how to use data from multiple tables, joined using the JOIN clause to answer a business question and will end by combining data from more than two tables.
-
Topics Covered
- LIMIT Clause
- GROUP BY
- Aggregation functions over groups
- HAVING Clause
- JOIN, LEFT JOIN, LEFT ONLY JOIN, RIGHT JOIN, RIGHT ONLY JOIN, OUTER JOIN, OUTER ONLY JOIN.
- Joining multiple tables.
-
Resources
This tutorial requires you to download the following dashboard: