Question: Find the id of users who are followed by Mary and Susan.
Schema: create table follows (f1 varchar, f2 varchar, PRIMARY KEY (f1)); create table user_profiles (uid varchar, name varchar, PRIMARY KEY (uid))
SQL: select t2.f1 from user_profiles as t1 join follows as t2 on t1.uid = t2.f2 where t1.name = "mary" intersect select t2.f1 from user_profiles as t1 join follows as t2 on t1.uid = t2.f2 where t1.name = "susan"