Bulk Order Lines

Easy
Filtering

Bulk Order Lines

The order_items table records quantities ordered.

Return order_id, product_id, quantity for order lines with a quantity of at least 4. Sort by order_id, then product_id ascending.

Browser Engine: Evaluates PySpark DataFrame & SQL logic locally in Pyodide WebAssembly.

Input data

1 DataFrame

These DataFrames are passed to solve(spark, dfs). Access one with dfs['name'].

df.order_items7 rows
order_id (int)product_id (string)quantity (int)
1P14
1P22
2P35
3P13
4P47
5P54
6P61

Return these columns

order_id(int)
product_id(string)
quantity(int)

Column names and order must match. Sort order is specified in the question.

Browser engine
Loading Python editor…
Click Run to try the sample cases, or Submit to check the hidden cases. First run caches the browser Python engine (~8–15s once); all code stays on your device.