Query Union only looks in the first table of the union, but does not filter, but puts it in the first positions my code: https://github.com/keneve/keneve/blob/main/gestion_cobros some idea?
1 Answers
Hello,
To work correctly, you need to make current union query as subquery of one select query. e.g.
SELECT * FROM (
SELECT * FROM clients WHERE gender = 'male'
UNION ALL
SELECT * FROM clients WHERE gender = 'female'
) as temp
This will apply the filter and sorting parameters to the outer most query and will give desired result.
Your Answer

