PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches

Quick Overview

This question evaluates competency in cumulative aggregation and ordering within SQL and related data-manipulation tools, focusing on calculating running totals across rows. It is commonly asked to measure practical application skills in the Data Manipulation (SQL/Python) domain, testing query formulation, efficiency and aggregation semantics at a practical application level.

  • Medium
  • Coinbase
  • Data Manipulation (SQL/Python)
  • Data Scientist

Calculate Cumulative Sum for Each Integer in Table

Company: Coinbase

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: Medium

Interview Round: Onsite

numbers +-----+ | num | +-----+ | 1 | | 2 | | 13 | | 14 | | 15 | +-----+ ##### Scenario You have a table containing one integer per row; for each row you must output the cumulative sum of all values that are ≤ the current row’s value. ##### Question Write SQL that returns each number and the sum of all numbers less than or equal to it. ##### Hints Window functions such as SUM() OVER with appropriate ordering solve this in one scan.

Quick Answer: This question evaluates competency in cumulative aggregation and ordering within SQL and related data-manipulation tools, focusing on calculating running totals across rows. It is commonly asked to measure practical application skills in the Data Manipulation (SQL/Python) domain, testing query formulation, efficiency and aggregation semantics at a practical application level.

Last updated: Mar 29, 2026

Loading coding console...

PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.

Related Coding Questions

  • Compute adoption, latency, and cross-region transactions - Coinbase (Medium)
  • Write SQL: sum values ≤ each row’s value - Coinbase (Medium)
  • Write SQL and Python for funnels/retention - Coinbase (Medium)
  • Implement filters and cursor pagination - Coinbase (Medium)
  • Compute delivery metrics and top-K queries - Coinbase (Medium)