New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.7] Support UNION aggregate queries #26365

merged 1 commit into from Nov 4, 2018


None yet
2 participants

staudenmeir commented Nov 2, 2018

Adds support for UNION aggregate queries:

select count(*) as aggregate from (
    (select * from `posts`) union (select * from `videos`)
) as `temp_table`

This allows the pagination of UNION queries:


Simple queries like the first example work on SQL Server, pagination doesn't. SQL Server's OFFSET implementation makes this more compIex. I will leave that for another day.

Fixes #24941 and #2968.

@taylorotwell taylorotwell merged commit 9c737f8 into laravel:5.7 Nov 4, 2018

2 checks passed

continuous-integration/styleci/pr The analysis has passed
continuous-integration/travis-ci/pr The Travis CI build passed

@staudenmeir staudenmeir deleted the staudenmeir:union-aggregate branch Nov 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment