Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

SQL Fundamentals

MediumSQL · PostgreSQL00:00
Practice interviewer
In session
5 left
00:00

Your question is SQL Fundamentals. Start with the requirements and the one table on the right.

Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.

You need to log in / sign up to run or submit.

Problem

What is your experience with SQL?

To demonstrate your SQL experience, write a query using the provided orders table. Include only completed orders with a known customer name, then summarize the results by customer.

Output

  1. One row per customer, with customer_name, completed_order_count, and total_completed_amount.
  2. Sort by total completed amount descending, then customer name ascending for ties.

Schema

orders
ColumnTypeDescription
order_idPKINTUnique order identifier
customer_nameVARCHAR(100)Customer name associated with the order
statusVARCHAR(20)Current order status
order_amountDECIMAL(10,2)Order amount in dollars
order_dateDATEDate the order was placed
Tablesorders
Your solutionPostgreSQL
You need to log in / sign up to run or submit.
Run a query to see results