Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/svg/2.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中选择count_Mysql - Fatal编程技术网

从mysql中选择count

从mysql中选择count,mysql,Mysql,我有一个表,其中包含id用户名等字段。。。。附件 我的问题是: 为了统计不同用户附加的简历数量,我尝试了子查询,但没有得到所需的输出 SELECT ID,UserName,Count(attachresume) AS [No Of Resume] From Table1 Group By ID,UserName 此查询: SELECT distinct user, COUNT(attachresume) FROM table_name GROUP BY user 到目前为止,您尝试了什么?从

我有一个表,其中包含id用户名等字段。。。。附件

我的问题是:

为了统计不同用户附加的简历数量,我尝试了子查询,但没有得到所需的输出

SELECT ID,UserName,Count(attachresume) AS [No Of Resume]
From Table1
Group By ID,UserName
此查询:

SELECT distinct user, COUNT(attachresume) FROM table_name GROUP BY user

到目前为止,您尝试了什么?从中选择count1选择distinct user fromtablex@asprin输出是完美的,如果我希望输出为:不同的用户,没有恢复的用户