mysql“;groupconcat“;加上;如果;“中的条件”;其中;
我需要找到一个解决方案,在那里我可以使用带有“groupconcat”的IF条件 这是投掷错误 错误1111(HY000):组函数的使用无效 注意:-此选择查询用作内部查询 使用groupcontact和where条件获取结果bug id的任何解决方案都得到了答案mysql“;groupconcat“;加上;如果;“中的条件”;其中;,mysql,if-statement,group-concat,Mysql,If Statement,Group Concat,我需要找到一个解决方案,在那里我可以使用带有“groupconcat”的IF条件 这是投掷错误 错误1111(HY000):组函数的使用无效 注意:-此选择查询用作内部查询 使用groupcontact和where条件获取结果bug id的任何解决方案都得到了答案 select GROUP_CONCAT( DISTINCT bug_id) from bugs where sum( IF((timediff(delta_ts,creation_ts) > "00:02:00") &
select GROUP_CONCAT( DISTINCT bug_id) from bugs where
sum( IF((timediff(delta_ts,creation_ts) > "00:02:00") && (priority="P1") ,1,0))
select
GROUP_CONCAT(
DISTINCT bug_id)
from bugs
where (
IF(
(timediff(delta_ts,creation_ts) > "00:02:00") && (priority="P1")
&& (product_id=237)
&&(bugs.resolution='FIXED')
&&(bug_status="RESOLVED")
&&(bugs.creation_ts >='2013-06-14 09:00:00'
and bugs.creation_ts <= '2013-06-16 08:59:59') ,1,0)) ;
选择
组_CONCAT(
不同的错误(id)
来自臭虫
何处(
如果(
(timediff(delta,creation)>“00:02:00”和&(priority=“P1”)
&&(产品编号=237)
&&(bugs.resolution='FIXED')
&&(bug_status=“已解决”)
&&(bugs.creation>='2013-06-14 09:00:00'
和bugs.creation\ts您可以创建一个sql fiddle链接器吗?错误1111(HY000):组函数的无效使用从bugs中选择组CONCAT(不同的bug\u id),其中sum(IF((timediff(delta\u ts,creation)>“00:02:00”)&&(priority=“P1”),1,0)和bugs.creation\ts
select
GROUP_CONCAT(
DISTINCT bug_id)
from bugs
where (
IF(
(timediff(delta_ts,creation_ts) > "00:02:00") && (priority="P1")
&& (product_id=237)
&&(bugs.resolution='FIXED')
&&(bug_status="RESOLVED")
&&(bugs.creation_ts >='2013-06-14 09:00:00'
and bugs.creation_ts <= '2013-06-16 08:59:59') ,1,0)) ;
+--------------------------------+
| GROUP_CONCAT( DISTINCT bug_id) |
+--------------------------------+
| 3743304 |
+--------------------------------+
1 row in set, 65535 warnings (5.86 sec)