{
  "app": {
    "name": "Mokabla",
    "url": "https://www.mokabla.com",
    "description": "Real interview questions from companies in Egypt, organised by company. Access is sold per company for 30 days."
  },
  "page": {
    "kind": "question",
    "title": "Question · subscriber-churn-query",
    "humanPath": "/en/c/orange/subscriber-churn-query",
    "humanOnly": false
  },
  "identity": {
    "class": "declared",
    "agent": "ClaudeBot",
    "operator": "Anthropic",
    "verified": false,
    "reason": "The user agent is ClaudeBot (Anthropic), which identifies itself as an AI agent.",
    "signals": [
      "Known agent user agent"
    ],
    "claimable": false
  },
  "state": {
    "question": {
      "slug": "subscriber-churn-query",
      "title": "Subscriber Churn Query",
      "difficulty": "medium",
      "tags": [
        "sql",
        "data",
        "technical",
        "data-eng"
      ],
      "is_free": true,
      "locked": false,
      "frequency": 0.75,
      "last_reported_at": "2026-07-17T16:54:46.104500Z",
      "url": "https://www.mokabla.com/en/c/orange/subscriber-churn-query",
      "agent": {
        "page": "https://www.mokabla.com/agent/en/c/orange/subscriber-churn-query",
        "question": "https://www.mokabla.com/agent/_call/get_question?company=orange&question=subscriber-churn-query"
      },
      "company": {
        "slug": "orange",
        "name_en": "Orange Egypt / Orange Business"
      },
      "body_md": "## Problem\nTwo tables from the billing warehouse:\n\n- `subscribers(msisdn, plan, activated_on)`\n- `monthly_usage(msisdn, month, data_mb, voice_min)`, one row per subscriber per month **only if** they used anything\n\nDefine a subscriber as **churned in month M** if they had a usage row in month M-1 but none in M. Write a query that returns, for each month of 2026 up to June, the number of churned subscribers and the churn rate as a percentage of the previous month's active subscribers, rounded to two decimals.\n\n## Examples\n**Example 1**\nJanuary has 4 active subscribers; in February three of them have usage rows and one does not. February row: `2026-02, 1, 25.00`.\n\n**Example 2**\nA subscriber active in January, absent in February, back in March. They count as churned in February and as active again in March, but they must **not** count as churned in March.\n\n## Constraints\n- `month` is stored as `'YYYY-MM'` text\n- Standard SQL (window functions and CTEs allowed, SQLite-compatible preferred)\n- Months where nobody churned should still appear with 0 and 0.00\n\n## What they look for\nA self-join or `LEFT JOIN` between month M-1 and M on `msisdn` with a NULL check, a months spine so empty months appear, and correct rate denominators. The month-arithmetic on a text column is the practical annoyance they want you to handle cleanly.",
      "follow_ups_md": "- Extend the definition to 'no usage for two consecutive months'.\n- How would you attribute churn to a plan?\n- The table has 30M rows per month; what does the plan look like and what index helps?"
    },
    "paid": false,
    "access": "Question bodies are paid content: a person buys 30 days of access per company (200 EGP or 200 points) in the human app. Agents get titles, tags and difficulty; bodies only for free questions."
  },
  "actions": [
    {
      "name": "get_question",
      "description": "One question with its body. Bodies are paid content unless the question is free.",
      "permission": "allow",
      "sideEffect": "read",
      "input": {
        "company": "string",
        "question": "string"
      },
      "href": "https://www.mokabla.com/agent/_call/get_question?company=orange&question=subscriber-churn-query",
      "ready": true,
      "missing": [],
      "humanPath": "https://www.mokabla.com/en/pricing"
    },
    {
      "name": "list_questions",
      "description": "The questions reported at a company: titles, tags, difficulty, whether each is free or paid.",
      "permission": "allow",
      "sideEffect": "read",
      "input": {
        "company": "string",
        "page": "number?"
      },
      "href": "https://www.mokabla.com/agent/_call/list_questions?company=orange",
      "ready": true,
      "missing": []
    },
    {
      "name": "buy_access",
      "description": "Buy 30 days of access to a company.",
      "permission": "block",
      "reason": "This action is for people only",
      "ruleId": "R1",
      "sideEffect": "payment",
      "input": {
        "company": "string"
      },
      "href": "https://www.mokabla.com/agent/_call/buy_access?company=orange",
      "ready": true,
      "missing": [],
      "humanPath": "https://www.mokabla.com/en/pricing"
    },
    {
      "name": "post_comment",
      "description": "Comment on a question.",
      "permission": "block",
      "reason": "This action is for people only",
      "ruleId": "R1",
      "sideEffect": "write",
      "input": {
        "question": "string",
        "text": "string"
      },
      "href": "https://www.mokabla.com/agent/_call/post_comment?question=subscriber-churn-query",
      "ready": false,
      "missing": [
        "text"
      ],
      "humanPath": "https://www.mokabla.com/en/companies"
    }
  ],
  "navigate": [
    {
      "label": "This question, as data (free questions only)",
      "href": "https://www.mokabla.com/agent/_call/get_question?company=orange&question=subscriber-churn-query"
    },
    {
      "label": "All questions at this company",
      "href": "https://www.mokabla.com/agent/_call/list_questions?company=orange"
    },
    {
      "label": "The company page",
      "href": "https://www.mokabla.com/agent/en/c/orange"
    },
    {
      "label": "Subscriber Churn Query · page",
      "href": "https://www.mokabla.com/agent/en/c/orange/subscriber-churn-query"
    }
  ],
  "notices": [
    {
      "severity": "info",
      "message": "This classification is final for the session: it came from a strong signal, not a guess. The human pages are not served to agents."
    },
    {
      "severity": "info",
      "message": "Unverified agents are read-only. Signed requests (Web Bot Auth) are the path to write access."
    }
  ],
  "meta": {
    "requestId": "ag_54a6b60ef056",
    "policyVersion": "mokabla-2026-11-03",
    "generatedAt": "2026-11-03T17:41:40.062Z",
    "jsonUrl": "https://www.mokabla.com/agent/en/c/orange/subscriber-churn-query?format=json",
    "manifestUrl": "https://www.mokabla.com/.well-known/agentgate.json",
    "humanUrl": "https://www.mokabla.com/en/c/orange/subscriber-churn-query",
    "humanClaimUrl": "https://www.mokabla.com/agent/_claim/human?to=%2Fen%2Fc%2Forange%2Fsubscriber-churn-query"
  }
}