PySpark Aggregations
18 interview problems on groupBy, agg, percentiles and conditional metrics, from easy to hard.
- Average Salary by Department · Easy · Aggregations
- Departments with Large Teams · Easy · Aggregations
- Word Count · Medium · Arrays
- Pivot Quarterly Revenue · Medium · Pivot, Unpivot & Rollup
- Conditional Aggregation · Medium · Aggregations
- Entry and Exit Pages (MAX_BY / MIN_BY) · Medium · Aggregations
- New Users per Day · Medium · Aggregations
- Median and 90th Percentile · Medium · Aggregations
- Sorted Distinct Purchase List · Medium · Arrays
- Three-Day Login Streak · Hard · Window Functions
- Subtotals with ROLLUP · Hard · Pivot, Unpivot & Rollup
- All Combinations with CUBE · Hard · Pivot, Unpivot & Rollup
- Pivot with Several Aggregations · Hard · Pivot, Unpivot & Rollup
- Consecutive Status Runs (Gaps and Islands) · Hard · Window Functions
- Fill Missing Dates (Calendar Spine) · Hard · Joins
- Customers Who Bought Every Product · Hard · Joins
- Conversion Funnel · Hard · Aggregations
- Monthly Retention by Cohort · Hard · Joins
Browse
Topics: Window Functions · Joins · Aggregations · Pivot, Unpivot & Rollup · Arrays · Null Handling · Conditional Logic · Dates · Filtering & Selection · Strings
Difficulty: Easy · Medium · Hard · PySpark interview roadmap · All problems