请告知为什么小组不在这里工作。 我希望它按setup_time分组:
mysql> select i_connection, avg(setup_time) from CDR_Vendors where i_env = 9 group by i_connection order by setup_time asc limit 15;
+--------------+-----------------+
| i_connection | avg(setup_time) |
+--------------+-----------------+
| 0 | 0.0000 |
| 351 | 0.0000 |
| 235 | 11.9830 |
| 376 | 77.3151 |
| 396 | 168.3036 |
| 318 | 99.0741 |
| 319 | 126.4138 |
| 317 | 366.6881 |
| 545 | 2523.9878 |
| 551 | 4811.5482 |
| 485 | 3410.2093 |
| 289 | 692.0000 |
| 239 | 4314.1667 |
| 510 | 3322.8444 |
| 546 | 2041.7491 |
+--------------+-----------------+
答案 0 :(得分:0)
select i_connection, avg(setup_time) from CDR_Vendors where i_env = 9 group by setup_time order by setup_time asc limit 15;
您可以按' i_connection'进行分组。