Facebook Page Reach Total

Easy
Aggregation
Social Media
Meta

Facebook Page Reach Total

A Facebook-style social team rolls up daily reach by page.

Return page_id, page_name, total_reach for each page. Sort by page_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.page_daily6 rows
page_id (string)page_name (string)day (int)reach (int)
FB1Campus Eats11200
FB1Campus Eats21500
FB2City Runners1800
FB2City Runners2950
FB3Weekend Trips12200
FB3Weekend Trips21800

Return these columns

page_id(string)
page_name(string)
total_reach(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.