Instagram Follower Net Change

Easy
Arithmetic
Social Media
Instagram

Instagram Follower Net Change

An Instagram-style growth team compares starting and ending follower counts.

Return account_id, handle, net_change, where net change is followers_end - followers_start. Sort by account_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.accounts6 rows
account_id (int)handle (string)followers_start (int)followers_end (int)
1urbanclicks120000135000
2dailybrew8000076000
3fitwithria4500052000
4travelframes200000198000
5kitchenlab6000061000
6stylefile150000165000

Return these columns

account_id(bigint)
handle(string)
net_change(bigint)

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.