Joining Two Files
Combine data from two files based on matching column values - like VLOOKUP, but more powerful.
When to Use Joins
You have two files with related data. For example:
- orders.csv - order_id, customer_id, amount, date
- customers.csv - customer_id, name, email, region
You want to see customer names alongside their orders.
Step 1: Upload Both Files
Upload both files. They appear as separate tabs at the top of the screen.
Step 2: Open the Join Operation
Make sure you're on the tab for your primary file (orders). Click + and select Join.
Step 3: Configure the Join
| Setting | Value |
|---|---|
| Join table | Select "customers" from the dropdown |
| Join type | LEFT (keeps all orders, adds customer info where available) |
| Left column | customer_id (from orders) |
| Right column | customer_id (from customers) |
Step 3: Understand Join Types
| Type | Keeps | When to Use |
|---|---|---|
| INNER | Only rows with matches in both tables | You only want complete records |
| LEFT | All rows from left table + matches from right | Most common - keep all your data, add info where available |
| RIGHT | All rows from right table + matches from left | Less common - usually just swap which table is primary |
| FULL OUTER | All rows from both tables | You want to see everything, including unmatched rows |
Step 4: Review and Apply
Preview the SQL to verify it looks right, then click Apply. The result combines columns from both files.
SELECT a.*, b.name, b.email, b.region
FROM orders a
LEFT JOIN customers b ON a.customer_id = b.customer_id
Tips
- If your join produces more rows than expected, you may have duplicate keys in the right table
- Use Remove Duplicates on the join key column first if needed
- After joining, use Select Columns to pick only the columns you need