title: Parsing URL for Specific Part of Path
body: <p>How would I go about extracting a specific part of the path using <code>PARSE_URL</code>? For example, if I query...</p>
  <pre><code>&gt; WITH cte AS (   
  &gt; SELECT CONCAT('http://', COLUMN1) AS URL   FROM VALUES
  &gt;      ('www.url1.com/test'), 
  &gt;      ('www.url1.com/test2/'), 
  &gt;      ('www.url1.com/test/sub_test/') ) 
  &gt; SELECT URL, 
  &gt;        PARSE_URL(URL) AS parts,
  &gt;        PARSE_URL(URL):path::text AS path,
  &gt;        TRIM(PARSE_URL(URL):path::text, '/') AS path
  &gt; FROM cte;
  </code></pre>
  <p>For <code>www.url1.com/test/sub_test</code>, the <code>path</code> is <code>test/sub_test</code>, but how would I extract just <code>sub_test</code>?</p>