Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/65.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/69.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
有没有办法在MySQL中列出计算后不同值的内容?_Mysql_Sql_String_Group By_Count - Fatal编程技术网

有没有办法在MySQL中列出计算后不同值的内容?

有没有办法在MySQL中列出计算后不同值的内容?,mysql,sql,string,group-by,count,Mysql,Sql,String,Group By,Count,如果多个客户居住在同一地址,除了计算居住在该地址的客户数量外,是否有办法将客户姓名列在已计算数量的旁边 例如 谢谢大家! 是,与组一致 select count(*) as number_of_customers, group_concat(name) as customer_names from customers where ... 把你的数据样本放在一个文件夹中,编辑你的问题,添加链接,我就试试看。多谢各位@用户14470792请确保投票/接受答案

如果多个客户居住在同一地址,除了计算居住在该地址的客户数量外,是否有办法将客户姓名列在已计算数量的旁边

例如


谢谢大家!

是,与
组一致

select
count(*) as number_of_customers,
group_concat(name) as customer_names
from customers where ...

把你的数据样本放在一个文件夹中,编辑你的问题,添加链接,我就试试看。多谢各位@用户14470792请确保投票/接受答案