don-tay / simpledb

Subset of SQL-compliant DBMS
0 stars 0 forks source link

Bug Bounty 3: Sorting and order by #35

Open tishyakhanna97 opened 2 years ago

tishyakhanna97 commented 2 years ago

Lab 3

don-tay commented 2 years ago

Test query

select sid,sname from student order by sname
select sid,sname from student order by sname desc
select SId, Sname, GradYear from student order by GradYear asc, Sname desc

Incorrect query:

select dname,count(sid) from student, dept where majorid=did group by dname order by dname desc
Running hash join
 dname countofsid
-----------------
compsci         7
drama         6
 math         4