# Even-ID June Signups

> Odd IDs, even IDs. The filter is precise.

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

Domain: SQL · Difficulty: easy · Seniority: L3

## Problem

The growth team is investigating a signup anomaly affecting June cohorts. Pull the full user profile for every June signup whose user ID is an even number.

## Worked solution and explanation

### Why this problem exists in real interviews

Like its February counterpart, this tests multi-condition filtering with date extraction and modular arithmetic.

---

### Break down the requirements

#### Step 1: Filter for June signups

Extract month = 6 from `signup_date` using `strftime('%m', signup_date) = '06'`.

#### Step 2: Filter for even IDs

`user_id % 2 = 0` selects even IDs. Combine with AND.

---

### The solution

**Month extraction with modular arithmetic filter**

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

> **Cost Analysis**
>
> Same cost as any date-extraction filter. Range predicates on `signup_date` would be faster.

> **Interviewers Watch For**
>
> This is a straightforward filter question. Speed and accuracy matter.

> **Common Pitfall**
>
> Hardcoding a specific year when the prompt does not specify one.

---

## Common follow-up questions

- How would you count the total instead of listing them? _(Tests wrapping in COUNT(*).)_
- What if signup_date were a Unix timestamp? _(Tests epoch-to-date conversion.)_
- How would you parameterize this for any month? _(Tests parameterized queries.)_

## Related

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