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.

Exemplo de resposta esperada

É assim que se parece uma resposta correta: ela tem seu próprio número de linhas e não precisa coincidir com as tabelas do esquema. Sua resposta precisa retornar os mesmos nomes de colunas do exemplo: use AS para renomeá-las se for preciso.

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

O resultado da sua consulta aparecerá aqui

Focus radio
Paused · SomaFM · Fluid