Back to problems

Write SQL to compute max-overlap lists

SQL · Pinterest · Hard

You are given two relational tables that store user-created lists and the items they contain. Assume the current date is 2025-09-01. The phrase “last 7 days” refers to the inclusive interval from 2025-08-26 through 2025-09-01. Only lists whose created_at value falls inside this interval are eligible for the queries below. Schema Sample data Task 1: Maximum overlap pair Write a single SQL query that returns exactly one row containing four columns: list_id_small,…

Checking your access…