SQLSQL LabPostgreSQL practice
00:0039 / 45
O02Intermediatecalculated fields

Largest pipeline data loss

For succeeded runs, return the ten runs losing the most records as run_id, customer_id, source_name, and records_lost. Sort loss descending, then run_id.

Data available

Use this table

1 table
Table 1

pipeline_runs

Data ingestion jobs from four upstream sources.

  • run_idintegerPK
  • customer_idintegerFK
  • source_nametext
  • statustext
  • started_attimestamptz
  • completed_attimestamptzNULL
  • records_ininteger
  • records_outintegerNULL
Query editor

PostgreSQL

Run query
Result stream

Output

Run your query to inspect its result.
Contextual coach

Ask about this attempt

Run or check a query first. The coach only comments on a real error or grader mismatch.

Field notes

Hints & explanation

Try to solve it cold. Two progressive hints are available.