Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started
Data Visualization Techniques
00:00
5 left

Data Visualization Techniques

MediumSQL · PostgreSQL

Problem

What techniques do you use for data visualization?

For this SQL exercise, prepare a visualization-ready summary from the available customer and order data. Include only completed orders and preserve NULL values where the source data produces them.

Output

  1. One row per region and calendar month represented by completed orders.
  2. Columns: region, month, completed_orders, revenue, and average_order_value.
  3. Sort by month ascending, then region ascending, with NULL regions first.

Schema

customers
ColumnTypeDescription
customer_idPKINTUnique customer identifier
customer_nameVARCHAR(100)Customer display name
regionVARCHAR(50)Customer sales region
orders
ColumnTypeDescription
order_idPKINTUnique order identifier
customer_idINTCustomer associated with the order
order_dateDATEDate the order was placed
statusVARCHAR(20)Order processing status
amountNUMERIC(10,2)Order amount
Tablescustomersorders
Interviewer

Your question is Data Visualization Techniques. Start with the requirements and the two tables in the Question tab.

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.
CodePostgreSQL
You need to log in / sign up to run or submit.Ln 1
Run your query to see results here.