You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@kylin.apache.org by fengbin <fe...@didachuxing.com> on 2018/04/20 10:38:24 UTC

转发:Error result with this SQL

原始邮件
发件人:fengbinfengbin@didachuxing.com
收件人:dev@kylin.apache.org
发送时间:2018年4月20日(周五) 18:38
主题:Error result with this SQL


This SQL result is error.
SELECT COUNT(DISTINCT VIEW_TAXI_RIDE.PASSENGER_ID)
FROM VIEW_TAXI_RIDE
WHERE
VIEW_TAXI_RIDE.create_day = '2018-04-10'
AND VIEW_TAXI_RIDE.STATUS IN (6,7)
AND VIEW_TAXI_RIDE.PASSENGER_ID IN
( SELECT DISTINCT v.PASSENGER_ID FROM view_taxi_ride v WHERE v.create_day = '2018-04-11' AND v.STATUS IN (6,7) )


Bug this SQL result is right.
select intersect_count(passenger_id, create_day, array['2018-04-10','2018-04-11']) from VIEW_TAXI_RIDE where STATUS IN (6,7)