# Even-ID February Signups

> A very specific slice of a very specific cohort.

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

Domain: SQL · Difficulty: easy · Seniority: L3

## Problem

The data quality team flagged a cohort anomaly in the signup pipeline. Pull the full user profile for every February signup whose user ID is an even number.

## Worked solution and explanation

### Why this problem exists in real interviews

This combines date extraction (February) with modular arithmetic (even IDs). It tests multi-condition WHERE construction.

---

### Break down the requirements

#### Step 1: Filter for February signups

`strftime('%m', signup_date) = '02'` extracts the month and checks for February.

#### Step 2: Filter for even user IDs

`user_id % 2 = 0` selects even-numbered IDs.

---

### The solution

**Dual filter: date extraction plus modular arithmetic**

```sql
SELECT *
FROM users
WHERE strftime('%m', signup_date) = '02'
  AND user_id % 2 = 0
ORDER BY user_id
```

> **Cost Analysis**
>
> `strftime()` prevents index usage on `signup_date`. A range filter is faster: `signup_date >= '2026-02-01' AND signup_date < '2026-03-01'`.

> **Interviewers Watch For**
>
> Candidates who mention the index implications of function calls on indexed columns show production awareness.

> **Common Pitfall**
>
> Using `LIKE '%-02-%'` on the date string is fragile and can match day 02.

---

## Common follow-up questions

- How would you make this work for any year's February? _(Tests that the filter correctly ignores the year.)_
- What index would optimize this? _(Tests computed index or range scan design.)_
- What if user_id were a UUID? _(Tests that modular arithmetic only works on numeric types.)_

## Related

- [All practice problems](https://datadriven.io/problems)
- [Mock interview mode](https://datadriven.io/interview/even_id_february_signups)
- [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.