每当GROUP BY信息发生变化时,是否可以在执行查询时重复数据库表的列的名称?我的查询按列分组。
SELECT name.fname as First_Name,
name.sales as Sales,
name.city as City
FROM name
GROUP BY city
ORDER BY name.fname;
答案 0 :(得分:0)
我想你想要这个:
SELECT name.fname as First_Name,
name.sales as Sales,
name.city as City
FROM name
ORDER BY city, fname;