Advertisement
Pandaaaa906

Untitled

Mar 30th, 2023 (edited)
637
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. with tmp as (
  2.     SELECT unnest(
  3.     array[
  4.     '欣维尔',
  5.     '美泰克'
  6.     ]
  7.     ) sub_name
  8. )
  9.  
  10. SELECT
  11. count(*) over(partition by tmp.sub_name) c,
  12. tmp.*,
  13. sup.sup_code,
  14. sup.sup_name
  15. FROM tmp
  16.  
  17. LEFT JOIN "t_srm_sup_info" sup
  18. ON sup.sup_name like '%' || tmp.sub_name || '%'
  19.  
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement