title: How to most efficiently explore the contents of a column of url query-strings
body: <p>I have a SQL table column of URL querystrings such as <code>"?foo=true&amp;bar=false"</code></p>
  
  <p>I want to create a <code>SQL</code> query that will tell me the names of all the query parameters observed in the column, as well as all the distinct observed values of the parameters.</p>
  
  <p>For example, the result would look like:</p>
  
  <pre><code>foo    true, false
  bar    true, false
  foobar 1, 2, 5, true
  </code></pre>
  
  <p>What is the most efficient algorithm to return such a result using <code>SQL</code>, possibly with and the regex capabilities afforded by the re2 library (<a href="https://github.com/google/re2/wiki/Syntax" rel="nofollow noreferrer">https://github.com/google/re2/wiki/Syntax</a>)?</p>