...

/

Exercise: Filtering, Sorting, Aggregating, and Binning

Exercise: Filtering, Sorting, Aggregating, and Binning

Practice filtering, sorting, aggregating, and binning product sales data.

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:

Press + to interact
/* 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 the ...