EmmyMiao87 commented on issue #8191: URL: https://github.com/apache/incubator-doris/issues/8191#issuecomment-1049830923
WITH basic_data as ( SELECT * FROM dwd_srv_solutionprocess_dd ), id_34 as ( SELECT new_srv_workorder_id as unresolved_id FROM ods_new_srv_outsidelineBase_dd ol group by new_srv_workorder_id having count(1) >=2 ), unresolved as ( SELECT bd.* ,'非一次性解决' as '解决情况' FROM basic_data bd join id_34 on bd.workorderId = id_34.unresolved_id ), solved as ( SELECT *, '一次性解决' as '解决情况' FROM basic_data b WHERE workorderId not in (select workorderId from unresolved) ) select * from solved; -- 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. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org