0

每当 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;
4

1 回答 1

0

我想你想要这个:

SELECT  name.fname as First_Name,  
  name.sales as Sales, 
  name.city as City 
FROM name 
ORDER BY city, fname;
于 2012-11-14T18:41:20.440 回答