我将此查询与虚拟列一起使用New_Users
SELECT `r`.`deal_id` as Deal_ID,
concat("2013\-05\-15") as start_date,
concat("2013\-05\-16") as end_date,
abs(0) AS New_Members
FROM (`ws_deal` r)
WHERE New_Members != 0
ORDER BY `deal_id`"
我在 'where 子句' SQL.sql 1 118 中有一个错误“1 Unknown column 'New_Members'”
如果我没有使用New_Members != 0
并且如果查询是
SELECT `r`.`deal_id` as Deal_ID,
concat("2013\-05\-15") as start_date,
concat("2013\-05\-16") as end_date,
abs(0) AS New_Members
FROM (`ws_deal` r)
ORDER BY `deal_id`
LIMIT 12"
我得到一个结果。
Deal_ID start_date end_date New_Members
407 2013-05-15 2013-05-16 0
408 2013-05-15 2013-05-16 0
409 2013-05-15 2013-05-16 0
410 2013-05-15 2013-05-16 0
411 2013-05-15 2013-05-16 0
412 2013-05-15 2013-05-16 0
413 2013-05-15 2013-05-16 0
414 2013-05-15 2013-05-16 0
415 2013-05-15 2013-05-16 0
416 2013-05-15 2013-05-16 0
417 2013-05-15 2013-05-16 0
我的问题是为什么我不能过滤这个结果。我怎样才能过滤这个。(无论如何New_Member != 0
,您可能会认为不需要过滤器。但是我需要通过过滤器来实现这一点,而这是在大查询集中动态生成的查询)
非常感谢