title: PLSQL - Count of all characters within a string
body: <p>I want to be able to generate a count of all characters in a given string from the result of an Oracle PLSQL query.</p>
  
  <p>For instance, given the string "strings", output would be as such</p>
  
  <pre><code>character | count
  -----------------
  g         | 1
  i         | 1
  n         | 1
  r         | 1
  s         | 2
  t         | 1
  </code></pre>
  
  <p>My thinking was something along the lines of </p>
  
  <pre><code>SELECT COLUMN, COUNT(COLUMN) FROM TABLE GROUP BY COLUMN
  </code></pre>
  
  <p>but that would require converting a string into a set of characters which is where I'm stuck.</p>
  
  <p>Ideally this extends to a count of all ASCII characters not just A-Z, in order to perform analysis on the contents of the database.</p>
  
  <p>I'm curious if there's a better way to do this than creating a procedure and whitelisting characters to count and running that on a given string.</p>