Complete the code to create a union of two tables named Sales2023 and Sales2024.
UNION([1], Sales2024)The UNION function combines rows from two tables. Here, Sales2023 is the first table to union with Sales2024.
Complete the code to join Customers and Orders tables on CustomerID.
JOIN Customers ON Customers.CustomerID = [1].CustomerIDThe JOIN is between Customers and Orders tables using the CustomerID field from Orders.
Fix the error in the join condition to correctly join Products and Categories on CategoryID.
JOIN Products ON Products.CategoryID = [1].CategoryIDThe join should be between Products and Categories tables on the CategoryID field.
Fill both blanks to create a left join between Employees and Departments on DepartmentID.
LEFT JOIN [1] ON Employees.DepartmentID = [2].DepartmentID
We join Employees with Departments on DepartmentID. Both blanks refer to Departments table.
Fill all three blanks to create an inner join between Orders and Customers on CustomerID and select CustomerName.
SELECT [1] FROM Orders JOIN [2] ON Orders.CustomerID = [3].CustomerID
The SELECT clause chooses CustomerName. The join is between Orders and Customers on CustomerID.