Question: Write an SQL query that has a group - by and a join operators. Capture two query plans for the same query. One query plan

Write an SQL query that has a group-by and a join operators. Capture two query plans for the same query. One query plan where the join is performed before the group-by and the other query plan has the group-by performed before the join. To make the query optimizer change its decision, you can alter the schema of the tables (e.g., create/drop indexes) and/or insert/delete rows into/from the tables. Please submit the SQL query, and all SQL statements that create/alter the schema of tables and/or insert/delete rows. Please submit the screenshots of the two query plans.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!