# Authors With Successful Deploys

> Who deployed successfully?

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

Domain: SQL · Difficulty: easy · Seniority: L3

## Problem

The release team needs a list of every engineer who has landed at least one successful deployment. Return a deduplicated list of authors, excluding records where the author field is empty.

## Worked solution and explanation

### Why this problem exists in real interviews

The `deploy_logs` schema makes this a clean test of filtering and projection. Columns like `svc_name`, `version`, `env_name` introduce enough ambiguity that only candidates who clarify assumptions produce correct results.

---

### Break down the requirements

#### Step 1: Filter `deploy_logs` to qualifying rows

Apply the WHERE clause to keep only rows matching the prompt criteria. This reduces the working set before deduplication.

#### Step 2: Deduplicate with DISTINCT

`SELECT DISTINCT author` removes duplicate values, producing one row per unique entry.

#### Step 3: Sort the output

Order by `author` for deterministic, readable results.

---

### The solution

**Distinct-filter for authors successful deploys**

```sql
SELECT DISTINCT author
FROM deploy_logs
WHERE status = 'success'
ORDER BY author
```

> **Cost Analysis**
>
> The main table has 200K rows.

> **Interviewers Watch For**
>
> Clean, readable SQL with correct column references signals production readiness. Candidates who verbalize their approach before coding score higher on communication.

> **Common Pitfall**
>
> Returning extra columns not asked for, or missing a required column, are both common mistakes that fail automated grading.

---

## Common follow-up questions

- What happens to your results if `svc_name` in `deploy_logs` contains trailing whitespace or mixed casing? _(Tests awareness of text normalization issues that silently fragment GROUP BY results.)_
- If `deploy_logs` were partitioned by date, would your query need to scan all partitions or could it prune? How would you verify? _(Tests understanding of partition pruning and EXPLAIN output.)_
- The `svc_name` column in `deploy_logs` has a zipf distribution, meaning a few values dominate. How does that skew affect your query plan and parallelism? _(Tests understanding of data skew: the optimizer may choose a bad plan when histogram statistics are stale.)_
- Could you express this same logic as a single query without CTEs or subqueries? What readability trade-off does that introduce? _(Tests whether the candidate can flatten nested logic and understands when decomposition aids maintainability.)_

## Related

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