# Low Severity DQ Checks

> Low severity checks. All of them.

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

Domain: SQL · Difficulty: easy · Seniority: L3

## Problem

The data engineering team is auditing whether low-severity checks are still worth running. Pull all fields for every data quality check classified as 'low' severity.

## Worked solution and explanation

### Why this problem exists in real interviews

Working against dq_checks, this problem tests query construction on the tbl_name and col_name columns. Interviewers use it as a fundamentals check because a subtle mis-grouping or filter placement changes the output without raising an error.

---

### Break down the requirements

#### Step 1: Read from `dq_checks`

The query targets `dq_checks` with 8 columns. Identify which columns are needed for the output.

#### Step 2: Filter to the target rows

Apply the `WHERE` filter to restrict the working set before aggregation. Filtering early reduces the number of rows that downstream operations process.

#### Step 3: Return the result set

Select the required columns with any necessary aliasing or formatting.

---

### The solution

**Equality filter on categorical column**

```sql
SELECT check_id, tbl_name, col_name, rule, passed, fail_pct, run_at, severity
FROM dq_checks
WHERE severity = 'low'
```

> **Cost Analysis**
>
> The query scans 400K rows from `dq_checks`.

> **Interviewers Watch For**
>
> Candidates who verbalize their approach before typing, naming the output columns and expected row count, consistently perform better.

> **Common Pitfall**
>
> Returning more columns than the prompt asks for can trigger a "wrong schema" failure in automated grading. Match the output specification exactly.

---

## Common follow-up questions

- What happens to your result if dq_checks.severity contains NULLs for some rows? _(Tests whether the candidate accounts for NULL behavior in aggregates and comparisons on severity.)_
- How would you verify that your aggregation on dq_checks.check_id is not double-counting due to duplicate rows? _(Tests data quality awareness and deduplication strategies.)_
- With millions of distinct values in dq_checks.check_id, what index strategy would you use to keep this query performant? _(Tests indexing knowledge specific to high-cardinality columns like check_id.)_

## Related

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