PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Data Manipulation (SQL/Python)/Coinbase

Compute adoption, latency, and cross-region transactions

Last updated: Mar 29, 2026

Quick Overview

This question evaluates proficiency in SQL-based data manipulation and analytics, including calculating cohort adoption and transaction rates, performing date arithmetic for time-to-first-transaction, identifying cross-region transactions, and computing distributional percentiles.

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

Compute adoption, latency, and cross-region transactions

Company: Coinbase

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: Medium

Interview Round: Onsite

Invented schema: users(user_id INT PRIMARY KEY, user_region STRING, adopted_at TIMESTAMP NULL) transactions(txn_id INT PRIMARY KEY, user_id INT, txn_ts TIMESTAMP, txn_region STRING) Sample rows: users user_id | user_region | adopted_at 1 | US | 2025-07-15 10:00:00 2 | US | null 3 | EU | 2025-08-02 09:12:00 4 | APAC | 2025-08-20 18:30:00 5 | EU | 2025-08-25 12:00:00 6 | US | 2025-08-30 23:59:00 transactions txn_id | user_id | txn_ts | txn_region 101 | 1 | 2025-08-01 08:00:00 | US 102 | 1 | 2025-08-16 10:00:00 | CA 103 | 3 | 2025-08-10 12:10:00 | EU 104 | 4 | 2025-08-25 07:45:00 | APAC 105 | 4 | 2025-08-26 07:45:00 | US 106 | 5 | 2025-08-30 07:45:00 | EU 107 | 6 | 2025-09-01 00:10:00 | US Write ANSI SQL for the following: A) Adoption_rate and transaction_rate per user_region for the month 2025-08-01 to 2025-08-31 (inclusive). Definitions: adoption_rate = users with adopted_at in August 2025 divided by total users in that region; transaction_rate = distinct users in that region having ≥1 transaction with txn_ts in August 2025 divided by total users in that region. Return region, adoption_rate, transaction_rate. B) For each user, compute days_to_first_txn = DATE_DIFF(first transaction timestamp, adopted_at) in days. Only include users with non-null adopted_at and first transaction timestamp ≥ adopted_at. Return user_id and days_to_first_txn, and also a separate query that returns the p10, p50, p90 of days_to_first_txn. C) Define a cross-region sale as any transaction where txn_region ≠ the user’s first_txn_region (the region of the earliest transaction in the user’s lifetime, not limited to August). Return all transactions with txn_ts in 2025-08-01..2025-08-31 flagged with is_cross_region plus columns: txn_id, user_id, txn_ts, txn_region, first_txn_region.

Quick Answer: This question evaluates proficiency in SQL-based data manipulation and analytics, including calculating cohort adoption and transaction rates, performing date arithmetic for time-to-first-transaction, identifying cross-region transactions, and computing distributional percentiles.

Related Interview Questions

  • 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)
  • Calculate Cumulative Sum for Each Integer in Table - Coinbase (Medium)
Coinbase logo
Coinbase
Oct 13, 2025, 9:49 PM
Data Scientist
Onsite
Data Manipulation (SQL/Python)
2
0

Invented schema: users(user_id INT PRIMARY KEY, user_region STRING, adopted_at TIMESTAMP NULL) transactions(txn_id INT PRIMARY KEY, user_id INT, txn_ts TIMESTAMP, txn_region STRING) Sample rows: users user_id | user_region | adopted_at 1 | US | 2025-07-15 10:00:00 2 | US | null 3 | EU | 2025-08-02 09:12:00 4 | APAC | 2025-08-20 18:30:00 5 | EU | 2025-08-25 12:00:00 6 | US | 2025-08-30 23:59:00 transactions txn_id | user_id | txn_ts | txn_region 101 | 1 | 2025-08-01 08:00:00 | US 102 | 1 | 2025-08-16 10:00:00 | CA 103 | 3 | 2025-08-10 12:10:00 | EU 104 | 4 | 2025-08-25 07:45:00 | APAC 105 | 4 | 2025-08-26 07:45:00 | US 106 | 5 | 2025-08-30 07:45:00 | EU 107 | 6 | 2025-09-01 00:10:00 | US Write ANSI SQL for the following: A) Adoption_rate and transaction_rate per user_region for the month 2025-08-01 to 2025-08-31 (inclusive). Definitions: adoption_rate = users with adopted_at in August 2025 divided by total users in that region; transaction_rate = distinct users in that region having ≥1 transaction with txn_ts in August 2025 divided by total users in that region. Return region, adoption_rate, transaction_rate. B) For each user, compute days_to_first_txn = DATE_DIFF(first transaction timestamp, adopted_at) in days. Only include users with non-null adopted_at and first transaction timestamp ≥ adopted_at. Return user_id and days_to_first_txn, and also a separate query that returns the p10, p50, p90 of days_to_first_txn. C) Define a cross-region sale as any transaction where txn_region ≠ the user’s first_txn_region (the region of the earliest transaction in the user’s lifetime, not limited to August). Return all transactions with txn_ts in 2025-08-01..2025-08-31 flagged with is_cross_region plus columns: txn_id, user_id, txn_ts, txn_region, first_txn_region.

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Data Manipulation (SQL/Python)•More Coinbase•More Data Scientist•Coinbase Data Scientist•Coinbase Data Manipulation (SQL/Python)•Data Scientist Data Manipulation (SQL/Python)
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.