Answer the question
In order to leave comments, you need to log in
Why doesn't PostgreSQL use indexes?
There is a request:
SELECT region,
COUNT(*) as total,
COUNT(*) FILTER (WHERE t1.insert_status = 'success' ) as completed,
COUNT(*) FILTER (WHERE t1.insert_status IS NULL AND t1.insert_status IS NULL ) as waiting,
COUNT(*) FILTER (WHERE t1.insert_status = 'failed' ) as insert_failed
FROM xml_files_2 t1
WHERE t1.section_name = 'payments' AND
t1.processed_date >='2010-01-28' AND t1.processed_date <='2021-08-28'
GROUP BY region;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question