Query the Top Ten Customers by Recent Spend

Read the full interview experience this question came from →

Quick Overview

Write one PostgreSQL query that ranks the ten users with the greatest completed-order spend in a fixed 30-day half-open window. Join users, orders, and line items, aggregate quantity times charged unit price, and break equal totals by user ID.

Query the Top Ten Customers by Recent Spend

Company: Visa

Role: Software Engineer I

Category: Data Manipulation (SQL/Python)

Difficulty: medium

Interview Round: Online Assessment

Overview: Write one PostgreSQL query that ranks the ten users with the greatest completed-order spend in a fixed 30-day half-open window. Join users, orders, and line items, aggregate quantity times charged unit price, and break equal totals by user ID.

Read the full Visa Software Engineer I interview experience this question came from

Visa logo
Visa
Aug 8, 2026
mediumSoftware Engineer IOnline AssessmentData Manipulation (SQL/Python)
3
0
Loading...