Select
(SELECT COUNT (*) from DEVICE0 where status! = 0),
(SELECT COUNT (*) from Device1 where status! = 0),
(SELECT COUNT (*) from Device2 where status! = 0),
(SELECT COUNT (*) from device3 where status! = 0),
(SELECT COUNT (*) from Device4 where status! = 0),
(SELECT COUNT (*) from device5 where status! = 0),
(SELECT COUNT (*) from Device6 where status! = 0),
(SELECT COUNT (*) from Device7 where status! = 0),
(SELECT COUNT (*) from Device8 where status! = 0),
(SELECT COUNT (*) from device9 where status! = 0)
As Count
Select
(SELECT COUNT (*) from DEVICE0 where status! = 0) +
(SELECT COUNT (*) from Device1 where status! = 0) +
(SELECT COUNT (*) from Device2 where status! = 0) +
(SELECT COUNT (*) from device3 where status! = 0) +
(SELECT COUNT (*) from Device4 where status! = 0) +
(SELECT COUNT (*) from device5 where status! = 0) +
(SELECT COUNT (*) from Device6 where status! = 0) +
(SELECT COUNT (*) from Device7 where status! = 0) +
(SELECT COUNT (*) from Device8 where status! = 0) +
(SELECT COUNT (*) from device9 where status! = 0)
As Count
MySQL one SQL query multiple table data volume