Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with tmp as (
- SELECT unnest(
- array[
- '欣维尔',
- '美泰克'
- ]
- ) sub_name
- )
- SELECT
- count(*) over(partition by tmp.sub_name) c,
- tmp.*,
- sup.sup_code,
- sup.sup_name
- FROM tmp
- LEFT JOIN "t_srm_sup_info" sup
- ON sup.sup_name like '%' || tmp.sub_name || '%'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement