Questions from Database Systems


Q: What is the difference between UNION and UNION ALL? Write the

What is the difference between UNION and UNION ALL? Write the syntax for each.

See Answer

Q: Suppose that you have two tables, EMPLOYEE and EMPLOYEE_1

Suppose that you have two tables, EMPLOYEE and EMPLOYEE_1. The EMPLOYEE table contains the records for three employees: Alice Cordoza, John Cretchakov, and Anne McDonald. The EMPLOYEE_1 table contains...

See Answer

Q: Given the employee information in Question 11, what is the query

Given the employee information in Question 11, what is the query output for the UNION ALL query? (List the query output.) Details from Question 11: Suppose that you have two tables, EMPLOYEE and EMPL...

See Answer

Q: What three join types are included in the OUTER JOIN classification?

What three join types are included in the OUTER JOIN classification?

See Answer

Q: Using tables named T1 and T2, write a query example for

Using tables named T1 and T2, write a query example for each of the three join types you described in Question 2. Assume that T1 and T2 share a common column named C1. Data from Question 2: LEFT [OUTE...

See Answer

Q: Use a query to compute the average purchase amount per product made

Use a query to compute the average purchase amount per product made by each customer. (Hint: Use the results of Problem 31 as the basis for this query.) Your output values must match those shown in Fi...

See Answer

Q: What is a subquery, and what are its basic characteristics?

What is a subquery, and what are its basic characteristics?

See Answer

Q: What are the three types of results a subquery can return?

What are the three types of results a subquery can return?

See Answer

Q: What is a correlated subquery? Give an example.

What is a correlated subquery? Give an example.

See Answer

Q: Explain the difference between a regular subquery and a correlated subquery.

Explain the difference between a regular subquery and a correlated subquery.

See Answer