Here’s my query:
SELECT (SELECT COUNT(`id`) FROM `table1` WHERE `id` = '1') AS `count1`,
(SELECT COUNT(`id`) FROM `table2` WHERE `id` = '1') AS `count2`,
(SELECT COUNT(`id`) FROM `table3` WHERE `id` = '1') AS `count3`
How can I get the sum of count1, count2, count3?
Is there any way I can do it in the query above?
Sure. Simply add the values together: