SELECT json_build_object( 'schema_version',(SELECT max(version_id) FROM goose_db_version WHERE is_applied), 'ready_with_current_facts',count(*) FILTER (WHERE status='ready' AND accepted_at IS NOT NULL AND first_ready_at IS NOT NULL), 'ready_missing_first_fact',count(*) FILTER (WHERE status='ready' AND accepted_at IS NOT NULL AND first_ready_at IS NULL), 'negative_durations',count(*) FILTER (WHERE first_ready_at