SQL practice / Salesforce
Free SQL interview practice

Salesforce SQL interview questions. All free.

12 SQL practice questions in our Salesforce collection, part of our 188-question bank across 23 companies. Write SQL against practice datasets and get checked in your browser. Free, no card or trial.

No account needed to start. Draft SQL stays in this browser; create an account to sync solved history.

1 Easy · 6 Medium · 5 Hard

Independent practice resource. Not affiliated with or endorsed by Salesforce.

Inside the Salesforce set

SQL topics you can practice.

These topics come from the questions in this set. Pick one to open the matching problems.

Easy · 5 min

Average Deal Size and Revenue by Product Line

Write a query to analyze won opportunities (Closed Won) in Q1 2026 by product line. Return product_line, avg_deal_size, total_revenue, won_count. Order by total_revenue descending.

Tables: opportunities, opportunity_line_items, products
Medium · 10 min

High-Engagement Customer Identification

Identify high-engagement accounts in Q1 2026: those with 20+ activities and 5+ different activity types. Return account_id, account_name, total_activities, activity_type_count, total_engagement_minutes. Order by total_activities descending.

Tables: accounts, activities
Hard · 15 min

Opportunity Conversion Rates by Stage and Region

For opportunities created in Q1 2026, calculate win rates by billing region and stage. Join accounts, opportunities, and opportunity_stages to get region and stage details. Return billing_region, stage_name, stage_order, opportunity_count, won_count, win_rate_pct. Order by billing_region, stage_order.

Tables: accounts, opportunities, opportunity_stages
The bank

Salesforce SQL questions. Start typing SQL.

12 Salesforce problems, each with its own dataset. Click one and you’re in the workspace, free, right in your browser.

How it works

Solve in the browser. Checked instantly.

  1. 1
    Pick a problemPractice questions for data science and analytics interviews, each with its own tables, difficulty, and time target.
  2. 2
    Write and run SQLA full database engine loads in the tab. No setup, nothing to install — query the practice dataset immediately.
  3. 3
    Submit for a verdictPass and move to the next problem. Miss and you unlock the expected output and a reference solution.
Average Deal Size and Revenue by Product LineSalesforce

Your dataset

opportunities

opportunity_id (VARCHAR) · account_id (VARCHAR) · amount (DECIMAL) · close_date (DATE) · stage_name (VARCHAR) · is_won (BOOLEAN)

opportunity_line_items

line_item_id (VARCHAR) · opportunity_id (VARCHAR) · product_id (VARCHAR) · quantity (INTEGER) · unit_price (DECIMAL)

products

product_id (VARCHAR) · product_name (VARCHAR) · product_line (VARCHAR)

Try this Salesforce question
12
Salesforce questions
188
questions in the full bank
$0
free access

Solve one now. Build your solved history.

Start free, no account needed. When you create one, everything you’ve solved comes with you — solved marks, streaks, and concept ratings on your dashboard.

Practice Salesforce SQL free

Create a free account to sync solved history →