{
  "id": 8865614,
  "title": "SQL Interview Question: Find App Store Power Purchasers with Two-Level GROUP BY",
  "url": "https://urgent.news/2026/09/21/sql-interview-question-find-app-store-power-purchasers-with-two-level",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-21T06:30:32.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/rahmanfrr/sql-interview-question-find-app-store-power-purchasers-with-two-level-group-by-42l4"
  },
  "original_language": "en",
  "account": "The SQL interview question asks to identify App Store power purchasers based on their in-app purchase activity during April, May, and June 2023. A power purchaser is defined as someone who made at least 3 purchases in each of the three months. The query returns the user ID, email address, and total amount spent by each power purchaser, sorted by total amount in descending order. If two users have the same total amount, the user with the smaller ID appears first. The query follows a two-level grouping strategy: first, grouping by user and month to identify months with 3 or more purchases, and second, grouping those good months by user to find who has purchases in all three months.",
  "summary": "Some SQL problems look simple until you read the rules twice. This one is tagged Apple and rated hard, and it teaches a useful pattern: grouping the results of a grouping . Let's solve it step by step. The Problem in Plain English What is a power purchaser? A power purchaser is a customer who made at least 3 in-app purchases in each of these months: April 2023 May 2023 June 2023 Miss the mark in…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}