Most data incidents are caught by three cheap questions:
- Is it fresh? — when did the newest row arrive?
- Is it all there? — does today's row count look like yesterday's?
- Is it valid? — do the values obey the rules the business assumes?
SQL
SELECT
max(loaded_at) AS newest_row,
count(*) AS todays_rows
FROM orders
WHERE loaded_at::date = current_date;
Run the questions where the data lands, not where it's consumed — a dashboard is the most expensive place to discover a broken pipeline.