PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches

Quick Overview

This question evaluates proficiency in SQL-based data manipulation and analytics, focusing on computing time-based cohort percentages and conducting year-over-year trend analysis of merchant behavior.

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

Determine Growth of Pirated Theme Installations Over Years

Company: Shopify

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: Medium

Interview Round: Onsite

merchants +-------------+------------+ | merchant_id | join_date | +-------------+------------+ | 1 | 2020-01-02 | | 2 | 2020-03-11 | | 3 | 2021-05-20 | | 4 | 2021-07-15 | | 5 | 2022-02-22 | +-------------+------------+ ​ themes +----------+------------+ | theme_id | is_pirated | +----------+------------+ | 101 | TRUE | | 102 | FALSE | | 103 | TRUE | | 104 | FALSE | | 105 | TRUE | +----------+------------+ ​ merchant_themes +-------------+----------+------------+ | merchant_id | theme_id | install_dt | +-------------+----------+------------+ | 1 | 101 | 2020-01-02 | | 1 | 102 | 2020-06-01 | | 2 | 103 | 2021-02-10 | | 3 | 104 | 2021-07-01 | | 4 | 105 | 2022-03-11 | +-------------+----------+------------+ ##### Scenario Shopify wants to understand if the proportion of merchants installing pirated storefront themes is growing over time. ##### Question Write a SQL query that returns, for each calendar year, the percentage of active merchants who installed at least one pirated theme. From this result, determine whether adoption of pirated themes is increasing year-over-year. ##### Hints Join theme installations to theme attributes, aggregate distinct merchant_ids by year, then compare year-over-year percentages.

Quick Answer: This question evaluates proficiency in SQL-based data manipulation and analytics, focusing on computing time-based cohort percentages and conducting year-over-year trend analysis of merchant behavior.

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)
  • Analyze Pirate Theme Usage Growth Over Time - Shopify (Medium)