当我检查它时,它不会删除重复的值。为什么?
示例)Group by a
,Group by a,b,c
Group by a
和Group by a,b,c
之间有区别吗?
我这样写SQL查询::
SELECT COUNT(CustomerID), Country
FROM Customers
GROUP BY Country;
结果::
Table: Customers
COUNT(CustomerID) Country
---------------------------------
3 Argentina
2 Austria
2 Belgium
9 Brazil
3 Canada
2 Denmark
2 Finland
到
SELECT COUNT(CustomerID), Country
FROM Customers
GROUP BY Country, CustomerID;
Table: Customers
COUNT(CustomerID) Country
---------------------------------
1 Germany
1 Mexico
1 Mexico
1 UK
1 Sweden
1 Germany
1 France
为什么不绑定来自Column_name的相同值更改的查询? 它沿column_name显示所有值。 我想知道是否行得通。谢谢。