Whenever you're ready, walk me through how you'd approach this.
Tell me about your experience with joins and window functions in SQL, including how you handle common edge cases.