Count Open Tickets

Easy
Filtering
Aggregation

Count Open Tickets

The tickets table contains support tickets with a status.

Return one row with open_tickets, the number of tickets whose status is open.

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.tickets7 rows
ticket_id (int)status (string)
1open
2closed
3open
4pending
5open
6closed
7resolved

Return these columns

open_tickets(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.