don-tay / simpledb

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

Support for Distinct clause #26

Closed xinyee20 closed 2 years ago

xinyee20 commented 2 years ago

Changes in this PR

Overview

xinyee20 commented 2 years ago

Test queries 1) select did from dept, course Projection result:

 did
----
 10
 10
 10
 10
 10
 10
 20
 20
 20
 20
 20
 20
 30
 30
 30
 30
 30
 30

Distinct result:

 did
----
 10
 20
 30

2) select distinct courseid from section Distinct result:

 courseid
---------
      12
      32
      62

3) select distinct sectid,courseid from section Distinct result:

 sectid courseid
----------------
    13      12
    23      12
    33      32
    43      32
    53      62