PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches

Quick Overview

This question evaluates a candidate's ability to perform SQL-based data manipulation and time-series analysis, emphasizing joins, aggregation, time-bucketing, and definition of growth metrics to measure feature adoption.

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

Analyze Pirate Theme Usage Growth Over Time

Company: Shopify

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: Medium

Interview Round: Technical Screen

themes +----+--------------+-----------+ | id | name | is_pirate | +----+--------------+-----------+ | 1 | Pirate Red | true | | 2 | Classic Blue | false | | 3 | Pirate Gold | true | +----+--------------+-----------+ ​ theme_usage +----------+------------+---------+---------+ | usage_id | date | user_id | theme_id| +----------+------------+---------+---------+ | 101 | 2024-04-01 | 501 | 1 | | 102 | 2024-04-02 | 502 | 1 | | 103 | 2024-04-02 | 503 | 3 | +----------+------------+---------+---------+ ​ revenue +----------+--------+ | usage_id | amount | +----------+--------+ | 101 | 4.99 | | 102 | 4.99 | | 103 | 6.99 | +----------+--------+ ​ users +---------+---------+ | user_id | country | +---------+---------+ | 501 | US | | 502 | CA | | 503 | UK | +---------+---------+ ​ calendar +------------+---------+ | date | month | +------------+---------+ | 2024-04-01 | 2024-04 | | 2024-04-02 | 2024-04 | | 2024-05-01 | 2024-05 | +------------+---------+ ##### Scenario A mobile app sells visual themes; five tables track themes, user activity, revenue, users, and a calendar. Leadership wants to know if Pirate-themed content is gaining traction. ##### Question Write a SQL query that shows whether Pirate theme usage is growing over time. Define and compute your own growth metric (e.g., monthly revenue, monthly active users, cumulative installs, etc.). 2) Return a month-by-month time series that can be charted. 3) Briefly explain why the metric you chose captures growth. ##### Hints JOIN theme_usage → themes to filter is_pirate, JOIN calendar for month buckets; GROUP BY month; use window functions or lag to compute growth rates.

Quick Answer: This question evaluates a candidate's ability to perform SQL-based data manipulation and time-series analysis, emphasizing joins, aggregation, time-bucketing, and definition of growth metrics to measure feature adoption.

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)