PySpark Window Functions
15 interview problems on rank, lag, lead and running totals over partitions, from easy to hard.
- Latest Order per Customer · Medium · Window Functions
- Running Total by Region · Medium · Window Functions
- Top Two Salary Levels per Department · Medium · Window Functions
- Month-over-Month Change · Medium · Window Functions
- 7-Day Moving Average · Medium · Window Functions
- Share of Category Total · Medium · Window Functions
- Customer Spend Quartiles (NTILE) · Medium · Window Functions
- Percent Rank and Cumulative Distribution · Medium · Window Functions
- Three-Day Login Streak · Hard · Window Functions
- Trailing 3 Calendar Days (Range Frame) · Hard · Window Functions
- Forward-Fill Missing Readings · Hard · Window Functions
- Sessionize a Clickstream · Hard · Window Functions
- Consecutive Status Runs (Gaps and Islands) · Hard · Window Functions
- Build an SCD Type 2 History · Hard · Window Functions
- Upsert: Merge New Records into a Table · Hard · Window Functions
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