group by 分組去重查詢


數據庫中的數據是這樣的:

 

想要看看有幾種類型,可以用group by:

  select * from activiti.act_ru_task 
 where PROC_INST_ID_ in (select PROC_INST_ID_ FROM activiti.act_ru_execution where BUSINESS_KEY_ in 
 (select  a.app_id from  bill_data.t_org_br_apply_info a left join user.t_user_info b on a.user_id=b.id where a.app_id in 
 (select b.app_id from bill_data.t_org_br_apply_person b  where 
b.tel_1 like '%15910383%' or
b.tel_1 like '%15910384%')))
 group by NAME_;

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM