GitHub repository: karawash/combine-mysql-queries-without-Union
Created: 2017-01-07T01:00:17Z
Description: Union queries is the most used solution for combining two queries. But some people prefer to use a single query method even if the structure is complex. As an example, when we have a table consists of thousands of rows sometimes it is enough to show the top few rows. Also, the rest rows could be shown as one summarized row (sum up rest). In case of using Union, it is easy to call two queries: one to get the top rows && second to get the last summary row. This example returns the same result but in single query without using Union.