MatioYoshitoki opened a new issue #5904:
URL: https://github.com/apache/incubator-doris/issues/5904


   select date_format(a.event_time, '%Y-%m-%d') recharge_date,
          a.user_id,
          b.event_time,
          a.event_time
   from ods_event_recharge a
            inner join ods_event_user_register b on a.user_id = b.user_id and 
a.event_date_id =
                                                                              
date_format(b.event_time, '%Y%m%d');
   
   select date_format(a.event_time, '%Y-%m-%d') recharge_date,
          a.user_id,
          b.event_time,
          a.event_time
   from ods_event_recharge a
            inner join ods_event_user_register b on a.user_id = b.user_id and 
date_format(a.event_time, '%Y%m%d') =
                                                                              
date_format(b.event_time, '%Y%m%d');
   
   
这2个语句中第一个的a.event_date_id为一个int值,内容相当于%Y%m%d格式的日期,比如20210526,a.event_time与b.event_time均为datetime类型。2条语句的查询结果差别巨大。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to