select CountryCode,Language, floor(max(percentage)) as speakers
from countrylanguage
group by CountryCode;
直观我希望语言与表countrylanguage中的最大百分比相对应。然而,这似乎不起作用。我应该在这里改变什么才能使它发挥作用? 更多信息:
desc countrylanguage;
+-------------+---------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+---------------+------+-----+---------+-------+
| CountryCode | char(3) | NO | PRI | | |
| Language | char(30) | NO | PRI | | |
| IsOfficial | enum('T','F') | NO | | F | |
| Percentage | float(4,1) | NO | | 0.0 | |
+-------------+---------------+------+-----+---------+-------+
答案 0 :(得分:2)
std::function