Step 3: Define the query - select tables