on 2018 Jun 28 2:51 PM
Hello All,
We would like to merge the 2 Queries listed below to get a single output count of the following query through HAC.
How can we run this using 'UNION ALL' Operator ?
Please provide a way on how we can achive this.
Query 1:select count(Distinct{pk}) from { b2bcustomer as c join order as o on {c.pk}={o.user} and {c.loginDisabled}='0' and {c.active}='1'and {c.subcribedNewsletter} = '1'} where {o.date} between '2016-05-01 00:00:00.000' and '2017-04-30 00:00:00.000'and {o.versionId} is null
Query 2: select count(Distinct{pk}) from { b2bcustomer as c join order as o on {c.pk}={o.user} and {c.loginDisabled}='0' and {c.active}='1'} where {o.date} between '2017-05-01 00:00:00.000' and '2018-05-01 00:00:00.000'and {o.versionId} is null
Thanks and Regards,
Shahalam Khan.
Request clarification before answering.
| User | Count |
|---|---|
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.