3 ms·
Views help with this. Write one view for selecting customers, with all the joins, sub-queries and case-when logic. Then select from this view order by birth d
by panarky 6y ago
Views help with this.
Write one view for selecting customers, with all the joins, sub-queries and case-when logic.
Then select from this view order by birth date, and select from the same view by sex.
Yes, the limit/offset paging clause will be duplicated, but all the joins, sub-queries and case-when stuff can be DRY'd in a single view.