SQL Filtering in Has-Many-Through Relation
SQL Filtering in Has-Many-Through Relation: a task in Terminal-Lego-15k (Harbor dataset). You are given a database schema with a many-to-many relationship between students and clubs. Your task is to write a SQL query that finds all students who are members of both the Soccer club (id=30) AND the…
The task
You are given a database schema with a many-to-many relationship between students and clubs. Your task is to write a SQL query that finds all students who are members of **both** the Soccer club (id=30) AND the Baseball club (id=50).
Part of PrimeIntellect/Terminal-Lego-15k.