DataLab with SQL
Jasmin Ludolf
Senior Data Science and AI Content Developer, DataCamp
$$
$$
$$
min_sales = 20
$$
SELECT *
FROM sales_data.csv
WHERE quantity_sold > {{min_sales}};
$$

$$
SELECT * FROM sales_data.csvWHERE customer_type = 'New';
-> Saved as new_sales DataFrame
SELECT *
FROM new_sales;
$$



Before a query
min_sales = 20
$$
SELECT *
FROM sales_data.csv
WHERE quantity_sold > {{min_sales}};
After a query
SELECT *
FROM sales_data.csv
WHERE quantity_sold > {{min_sales}};
-> Store as filtered_sales DataFrame
filtered_sales["product_category"]

DataLab with SQL