The Lab: Tests Still Without Results

The Lab: Tests Still Without Results

You are an administrator at the MedPoint clinic. Doctors order lab tests for patients, and for each order the lab later records the result and the date it became ready. Every morning the head nurse calls the lab about the "stuck" orders — and asks you to export their list automatically instead of scanning the journal by hand. List the orders whose result is not ready yet: the marker is a missing result-ready date (the result_recorded_on field is empty). The test value itself does not matter — rely only on the ready date. Return columns: - order_id — order number; - patient_name — patient name; - test_name — test name; - ordered_on — order date (date format, as stored). Sort by ordered_on ascending first (oldest on top), then by order_id ascending for equal dates.

Expected output sample

This is what a correct answer looks like — its row count is its own, it doesn't have to match the schema tables. Your answer must use the same column names as this sample — alias them with AS if needed.

order_idpatient_nametest_nameordered_on
2Mary SolisFerritin2026-07-01
4Lena KrausGlucose2026-07-02
6Sofia MarinoCRP2026-07-03
PostgreSQLv16

Your query result will appear here

Focus radio
Paused · SomaFM · Fluid