{
  "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 · sql-select-and-joins",
    "humanPath": "/en/c/nokia/sql-select-and-joins",
    "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": "sql-select-and-joins",
      "title": "SQL Select and Joins",
      "difficulty": "easy",
      "tags": [
        "sql",
        "oa",
        "swe"
      ],
      "is_free": true,
      "locked": false,
      "frequency": 0.25,
      "last_reported_at": "2025-05-27T09:13:37.284195Z",
      "url": "https://www.mokabla.com/en/c/nokia/sql-select-and-joins",
      "agent": {
        "page": "https://www.mokabla.com/agent/en/c/nokia/sql-select-and-joins",
        "question": "https://www.mokabla.com/agent/_call/get_question?company=nokia&question=sql-select-and-joins"
      },
      "company": {
        "slug": "nokia",
        "name_en": "Nokia Egypt"
      },
      "body_md": "## What they ask\nAlongside the algorithm items, the Cairo online assessment has a short SQL block. Nothing exotic: SELECT with filters, aggregation, and the difference between join types. Some items are multiple choice (which query returns rows with no match on the right side?), others ask you to type the query.\n\nQuestions in this area, for example, using two tables:\n\n- `employees(id, name, dept_id, salary)`\n- `departments(id, name, city)`\n\n1. List every department in Cairo together with its employee count, including departments that currently have zero employees.\n2. Return the names of employees who earn more than the average salary of their own department.\n3. Explain, in one sentence each, what `INNER JOIN`, `LEFT JOIN` and `FULL OUTER JOIN` return for these two tables.\n\n## Example\nFor item 1, a department \"Research\" in Cairo with no employees should still appear with count 0, which is the whole point: an inner join would drop it.\n\n## What they look for\n- Knowing that `LEFT JOIN` plus `COUNT(e.id)` (not `COUNT(*)`) gives a true zero for empty departments.\n- Correlated subquery or a window function for item 2, and the ability to say which one you would pick and why.\n- Reading the question carefully: filters that belong in `ON` versus `WHERE` change the result of an outer join, and the MCQs probe exactly that.",
      "follow_ups_md": "- Rewrite item 2 with a window function instead of a subquery.\n- What index would speed up item 1 on a large `employees` table?"
    },
    "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=nokia&question=sql-select-and-joins",
      "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=nokia",
      "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=nokia",
      "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=sql-select-and-joins",
      "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=nokia&question=sql-select-and-joins"
    },
    {
      "label": "All questions at this company",
      "href": "https://www.mokabla.com/agent/_call/list_questions?company=nokia"
    },
    {
      "label": "The company page",
      "href": "https://www.mokabla.com/agent/en/c/nokia"
    },
    {
      "label": "SQL Select and Joins · page",
      "href": "https://www.mokabla.com/agent/en/c/nokia/sql-select-and-joins"
    }
  ],
  "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_73b331968a82",
    "policyVersion": "mokabla-2026-11-03",
    "generatedAt": "2026-11-03T17:39:49.130Z",
    "jsonUrl": "https://www.mokabla.com/agent/en/c/nokia/sql-select-and-joins?format=json",
    "manifestUrl": "https://www.mokabla.com/.well-known/agentgate.json",
    "humanUrl": "https://www.mokabla.com/en/c/nokia/sql-select-and-joins",
    "humanClaimUrl": "https://www.mokabla.com/agent/_claim/human?to=%2Fen%2Fc%2Fnokia%2Fsql-select-and-joins"
  }
}