PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches

Quick Overview

This question evaluates the ability to design time-based usage metrics and compute monthly revenue through data manipulation using SQL or Python, focusing on aggregating event and transaction records by calendar month.

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

Measure Pirate-Theme Usage and Revenue Growth Over Time

Company: Shopify

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: Medium

Interview Round: Technical Screen

theme_usage +-----------+------------+-------------+ | user_id | theme_name | created_at | +-----------+------------+-------------+ | 101 | pirate | 2024-01-05 | | 102 | pirate | 2024-01-06 | | 101 | pirate | 2024-02-14 | | 110 | pirate | 2024-02-20 | | 103 | pirate | 2024-03-01 | +-----------+------------+-------------+ ​ theme_transactions +-----------+------------+--------+ | order_id | created_at | amount | +-----------+------------+--------+ | 1 | 2024-01-05 | 2.99 | | 2 | 2024-01-06 | 2.99 | | 3 | 2024-02-14 | 2.99 | | 4 | 2024-02-20 | 2.99 | | 5 | 2024-03-01 | 2.99 | +-----------+------------+--------+ ##### Scenario Mobile personalization platform tracks several tables (installs, purchases, etc.) for a "pirate" theme and wants to understand whether its usage and revenue are growing over time. ##### Question Define an appropriate metric to measure pirate-theme usage growth and write the SQL that produces that metric by calendar month. 2. Write SQL that shows monthly revenue for the pirate theme (not cumulative). ##### Hints Think in calendar months; group by DATE_TRUNC('month', …). Treat growth as either active users or installations month-over-month.

Quick Answer: This question evaluates the ability to design time-based usage metrics and compute monthly revenue through data manipulation using SQL or Python, focusing on aggregating event and transaction records by calendar month.

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

  • Analyze Pirated Theme Usage Impact - Shopify (medium)
  • Compute pirated-theme usage and revenue loss - Shopify (easy)
  • Calculate Pirated Usage and Revenue Loss - Shopify (hard)
  • Justify and harden your analytics and BI stack - Shopify (Medium)
  • Determine Growth of Pirated Theme Installations Over Years - Shopify (Medium)