I have a query like this
SELECT COUNT(u.user_id) AS count1 FROM users WHERE user_id>1001
UNION
SELECT COUNT(c.hits) AS count2 FROM source c WHERE loginid LIKE 'fb%';
Result
count1
250
56
How can it be made in a single row like this
count1 count2
250 56
You can achieve this using a sub-query: