MS-access查询:按姓名和年龄分组,并获取没有重复数据(姓名和年龄)的详细信息,请在详细信息下方查找
表架构:
id: integer
name: varchar(100)
age: integer
city: varchar(100)
表中的记录:
------------------------------------
id| name | age | city
------------------------------------
1 | ram | 25 | bhopal
2 | brajesh | 30 | indore
3 | ram | 25 | indore
4 | ram | 26 | bhopal
5 | ram | 27 | mumbai
6 | brajesh | 30 | mumbai
7 | brajesh | 26 | dehli
------------------------------------
预期结果 :
------------------------------------
name | age | city | city
------------------------------------
ram | 25 | bhopal | indore
brajesh | 30 | indore | mumbai
------------------------------------
其他格式的预期输出:
预期结果 :
------------------------------------
name | age | city
------------------------------------
ram | 25 | bhopal, indore
brajesh | 30 | indore, mumbai
------------------------------------