Search⌘ K
AI Features

Exercise: Filtering, Sorting, Aggregating, and Binning

Explore how to apply filtering sorting aggregating and binning techniques on sales data. Learn to manipulate data views to meet business needs by completing code snippets for each task, improving your data transformation skills in ETL pipelines.

Suppose we have a table called sales that contains information about the sales of various products in a store. Let’s see what the table looks like:

MySQL
/* Print the first 5 records*/
select *
from sales
limit 5;

Our task is to apply filtering, sorting, aggregating, and binning to the table according to the business requirements.

Note: Fill in the missing code snippets to complete the task.

Filtering

The first task is to filter all the sales that occurred in ...