left(number,7)
如何从子查询数据中获取关联失败的count(*)
数据?
例如我这样做:
SELECT * FROM table1 WHERE outcome = 'Fail' AND left(number,7) =
(SELECT count(*) as total, left(number,7) as prefix
FROM table1 where outcome like '%Passed%'
group by prefix order by total desc limit 250)
这不会起作用,因为子查询中有两个字段..那么如何解决这个问题?