# Platform Team Mobile Flags

> Mobile flags under platform ownership.

Canonical URL: <https://datadriven.io/problems/platform_team_mobile_flags>

Domain: SQL · Difficulty: easy · Seniority: L3

## Problem

Which feature flags are owned by the 'platform' team and have 'mobile' in the flag name? Show the owner and the flag name.

## Worked solution and explanation

### Why this problem exists in real interviews

This analytics problem uses the `feat_flags` table to evaluate pattern matching with LIKE. Watch how the `flag_name` and `owner` columns interact in the grouping and filtering logic.

---

### Break down the requirements

#### Step 1: Apply both filters

`WHERE owner = 'platform' AND flag_name LIKE '%mobile%'` combines exact match and substring match.

#### Step 2: Return owner and flag name

`SELECT owner, flag_name` returns the two requested columns.

---

### The solution

**Pattern-match for platform team mobile flags**

```sql
SELECT owner, flag_name
FROM feat_flags
WHERE owner = 'platform'
  AND flag_name LIKE '%mobile%'
```

> **Cost Analysis**
>
> With `feat_flags` (400 rows), this query scans a small dataset. No indexing is needed for this volume. At production scale, an index on the primary filter column would improve performance.

> **Interviewers Watch For**
>
> Interviewers evaluate whether you translate the English requirements into the correct SQL clauses on the first attempt. They watch for clean syntax, correct column references, and whether you verify edge cases before declaring the query complete.

> **Common Pitfall**
>
> The most common mistake is misreading the prompt's filtering or grouping requirements. Double-check which columns to group by, which to aggregate, and whether the output should be filtered with `WHERE` (before grouping) or `HAVING` (after grouping).

---

## Common follow-up questions

- What would happen to your result if `feat_flags.owner` contained duplicate values that you did not expect? _(Tests whether the candidate considers data quality issues in `owner` and uses DISTINCT or deduplication where needed.)_
- The `rollout` column in `feat_flags` is heavily skewed toward a few popular values. How would data skew affect parallel execution of your query? _(Tests understanding of skew in `feat_flags.rollout` and its impact on distributed query performance.)_
- Your LIKE pattern may prevent index usage on `feat_flags`. How would you restructure the filter to be index-friendly? _(Tests understanding of leading-wildcard LIKE and its impact on index scans.)_

## Related

- [All practice problems](https://datadriven.io/problems)
- [Mock interview mode](https://datadriven.io/interview/platform_team_mobile_flags)
- [SQL Interview Questions](https://datadriven.io/sql-interview-questions)
- [Data Engineering Interview Prep Guide](https://datadriven.io/data-engineer-interview-prep)
- [Daily Challenge](https://datadriven.io/daily)

---

Source: DataDriven (https://datadriven.io). 100% free data engineering interview prep. Live code execution against Postgres 16, Python 3.11, and Spark sandboxes. No paywall, no premium tier, no signup gate.