Advertisement
Pandaaaa906

Untitled

Oct 9th, 2022 (edited)
1,598
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT
  2. t.*,
  3. tmp.j,
  4. tmp.j->>'navHandleIndex' nav,
  5. decode_url_part(tmp.j->>'keyword') keyword
  6. FROM "test_regex_url" t
  7.  
  8. LEFT JOIN (
  9.     SELECT
  10.     id,
  11.     json_object(ARRAY_AGG(inner_tmp.j)) j
  12.     FROM (
  13.         SELECT
  14.         id,
  15.         (regexp_matches(value, '([a-zA-Z]+)\=([^&]+)', 'g')) j
  16.         FROM "test_regex_url"
  17.     ) inner_tmp
  18.     GROUP BY id
  19. ) tmp
  20. on t.id=tmp.id
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement