← Back to Dashboard

Day 4: Practice Exercises

Hands-On SQL Assignments

Scenario: You manage a global database. Because of regional laws, customer data is stored in two separate tables: Customers_USA and Customers_UK. Both tables contain the columns: CustomerID, FullName, Email, and Age.

Task 1: Basic Combination

Task 2: Testing the Rules (Troubleshooting)

A junior developer wrote the following query, but SQL Server keeps throwing an error. Explain which rule this violates and rewrite it correctly.

SELECT FullName, Email, SignupDate FROM Customers_USA
UNION
SELECT FullName, Email FROM Customers_UK;

Task 3: Hardcoding and Sorting