Question is, how to get count records in union query?
For example, we have this query:
select count(*) from hdxbh_content
union all
select count(*) from slam_users
As a result, we will have two records:
| count(*) |
|---|
| 904 |
| 1 |
And we want to get result as one record, 905, how?
Like this:
select ((select count(*) from hdxbh_content) + (select count(*) from slam_users)) count
Taken from here.