Salesforce
Foundations Track · Easy · 15 min
Customers Sharing Same
Salesforce is reviewing customers sharing same through a scorecard. Return each customer pair that purchased the same order on the same day. Output customer_...
Company labels are directional practice context, not official interview guidance.
Objective
Practice query basics through a Salesforce-tagged business scenario.
Approach
Use this track to lock in clean query structure, basic filtering logic, and confidence with grouped output.
Company context
Company labels are directional practice context, not official interview guidance.
Salesforce is reviewing customers sharing same through a scorecard. Return each customer pair that purchased the same order on the same day. Output customer_a_id and customer_b_id sorted by both columns.
shared_orders
| order_id | order_date | customer_id |
|---|---|---|
| 1 | 2024-07-01 | 10 |
| 1 | 2024-07-01 | 12 |
| 2 | 2024-07-01 | 10 |
| 2 | 2024-07-01 | 15 |
| 3 | 2024-07-02 | 12 |
| 3 | 2024-07-02 | 18 |
SQL workspace
Run queries against the protected question data, then submit once the result shape looks right.
Sign in to run SQL
Create a free account or sign in before running queries against protected question data.