Search ⌘K
Salesforce
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_...

Foundations Track
Easy
15 min
query basics

Company labels are directional practice context, not official interview guidance.

Timer 00:00
Back to practice

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 INT
order_date DATE
customer_id INT
order_idorder_datecustomer_id
12024-07-0110
12024-07-0112
22024-07-0110
22024-07-0115
32024-07-0212
32024-07-0218
Editor
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.