Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Monthly GPU Revenue Summary

EasySQL · PostgreSQL00:00
I
Practice interviewer
In session
5 left
00:00

Your question is Monthly GPU Revenue Summary. 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

You are given a table of NVIDIA GPU order transactions and asked to use SQL to analyze business performance. Write a query that returns total revenue by month for completed orders only. The result should show the month in YYYY-MM format and the summed revenue for that month, ordered from highest revenue to lowest.

Schema

gpu_orders
ColumnTypeDescription
order_idPKINTUnique order identifier
customer_nameVARCHAR(100)Customer name
product_lineVARCHAR(50)NVIDIA product line purchased
order_dateDATEDate the order was placed
order_statusVARCHAR(20)Status of the order such as completed or cancelled
revenueDECIMAL(10,2)Revenue recognized for the order
Tablesgpu_orders
Your solutionPostgreSQL
You need to log in / sign up to run or submit.
Run a query to see results