Question: Show student ids who are on scholarship and have major 600.
Schema: create table sportsinfo (stuid varchar, major varchar, onscholarship varchar, PRIMARY KEY (stuid)); create table student (stuid varchar, major varchar, onscholarship varchar, PRIMARY KEY (stuid))
SQL: select stuid from student where major = 600 intersect select stuid from sportsinfo where onscholarship = 'y'