Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select * from student;
- select * from college;
- select * from apply;
- select sid ,sname from student where sid in(select sid from apply where major='CS');
- select sid,sname from student where sizehs in(select sizehs from student where sname in('Jay'));
- select sid,sname from student where sizehs in(select sizehs from student where sname in('Jay')) and sname not in('Jay');
- select sid,sname,gpa from student where gpa not in(select gpa from student where sname in('Irene'));
- select cname from apply where sid in(select sid from student where sname like('J%'));
- select major from apply where sid in(select sid from student where sname in('Irene'));
- select sid,major from apply where major in(select major from apply where sid in(select sid from student where sname in('Irene')));
- select sid,major from apply where major in(select major from apply where sid in(select sid from student where sname in('Irene'))) and sid not in(select sid from student where sname='Irene');
- select count(distinct(cname)) from apply where sid in(select sid from student where sname in('Jay'));
- select sid from apply group by sid having count(cname)>=
- (select count(cname) from apply where sid in(select sid from student where sname in('Jay')));
- select * from student where sid in(select sid from apply where major in(select major from apply where major in 'CS'));
- select * from student where sid in(select sid from apply where major in(select major from apply where major in 'EE'));
- select cname from college union select sname from student;
- select distinct sid from apply minus select distinct sid from apply where cname='Stanford';
- select distinct sid from apply where cname='Stanford' intersect select distinct sid from apply where cname='Berkeley';
- select sname from student where sid in(select sid from apply where cname in(select distinct cname from apply where sid='987'));
- select * from college c1 where exists(select *from college c2 where c1.state=c2.state and );
Add Comment
Please, Sign In to add comment