test
Sql
code posted
created at 21 May 22:45
Edit
|
Back
1 |
SELECT `products`.`name` AS `product_name`, SUM(`account_intels`.`connected_host_count`) AS `connected_host_count` FROM `account_intels` INNER JOIN `accounts` ON (`accounts`.`id` = `account_intels`.`id`) INNER JOIN `account_product_levels` ON (`account_product_levels`.`account_id` = `accounts`.`id`) INNER JOIN `products` ON (`products`.`id` = `account_product_levels`.`apm_product_id`) GROUP BY `products`.`name` ORDER BY `products`.`name` ASC |
445 Bytes in 2 ms with coderay