Working with Tables and Views
ACME_ANALYTICS_PROD
DATA
DET
(Deal Execution Table)Inner Join - Only Matching Records
Left Outer Join - Keep All Left Records
Customer Table: 1000 customers Orders Table: 500 orders from 300 customers Left Join Result: 1000 customers (700 show no orders, 300 show order data)
When to use: When your primary concern is the complete dataset from your
main table, but you want to enrich it with available data from another source.Right Outer Join - Keep All Right Records
Customer Table: 1000 customers Orders Table: 500 orders (50 from deleted/unknown customers) Right Join Result: 500 orders (450 with customer data, 50 without)
When to use: When you need complete
data from your secondary table and want to see what primary table data is
available to enrich it.Full Outer Join - Keep Everything
Total Revenue = Quantity × Price
Revenue = Quantity × Price
Days_Open = TODAY() - Created_Date
Risk_Level = IF(Amount > 10000, "High", "Low")
Full_Name = CONCAT(First_Name, " ", Last_Name)
Total_Orders = COUNT(Orders.ID)
Sales_Pipeline_Q4_2024