diff options
| author | mo khan <mo.khan@gmail.com> | 2020-02-04 17:53:41 -0700 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-02-04 17:53:41 -0700 |
| commit | 696c45a9fb5e4d5c17cc5efcf373eaf38589b754 (patch) | |
| tree | d0a12cc7f7fca47cdfcdc06d3ddfa2d61a7fadae /assignments/2 | |
| parent | 28c3005b2d51c74c904c28253d1e5762b4397ebb (diff) | |
Update assignment 2
Diffstat (limited to 'assignments/2')
| -rw-r--r-- | assignments/2/README.md | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/assignments/2/README.md b/assignments/2/README.md index 441ac71..a0765cb 100644 --- a/assignments/2/README.md +++ b/assignments/2/README.md @@ -191,6 +191,7 @@ ORDER BY e.name ASC; * An index on the `emp-no` column on the `ProjAssigned` table will improve the join performance. * An index on the `salary` column will improve the filter performance. * An index on the `name` column will improve the order by performance. +* An addition index on the primary key columns is not needed because primary keys already have a unique index. **Write SQL queries to create the indexes you defined above.** @@ -330,7 +331,7 @@ ORDER BY ta.salary ASC; SELECT DISTINCT(t.travel_agent_name) FROM Transaction t GROUP BY t.travel_agent_name -HAVING COUNT(t.travel_agent_name) > 5; +HAVING COUNT(t.travel_agent_name) >= 5; ``` **Display the names of all travel agents who have arranged at least ten journeys to "Ottawa".** @@ -341,5 +342,5 @@ FROM Transaction t INNER JOIN Customer c on t.cust_name = c.name WHERE c.destination = 'Ottawa' GROUP BY t.travel_agent_name -HAVING COUNT(t.travel_agent_name) > 10; +HAVING COUNT(t.travel_agent_name) >= 10; ``` |
