I have table with multiple result per days for particular project_name (SUCCESS, FAILURE, ABORTED, UNSTABLE). I would like to select only days where only FAILURE status occurs - nothing else. There are some days with multiple status (after FAILURE it can be solved and get status with different time and set to SUCCESS). How can I select only days with FAILURE status?
my query:
SELECT
date_trunc('day', time) AS group_day,
build_result,
project_name
FROM project_status
WHERE project_name = 'project_x'
GROUP BY date_trunc('day', time), project_name, build_result