title: How can I display enum string key instead of integer value in SQL query?
body: <p>I am pretty new to SQL.  I assume this is fairly simple, but I haven't been able to find a straightforward answer online.  </p>
  
  <p>I am writing a simple SQL query to group database records by an enum column, and display the count of each value.  It works fine, but the output is displaying the enum integer, where I want it to display the string key of that enum value.  </p>
  
  <p>Here is an example of the SQL query: </p>
  
  <pre><code>SELECT COUNT(a.sound) as "Sound Count", a.sound
  FROM animals a
  GROUP BY a.sound
  </code></pre>
  
  <p>Here is the enum definition:</p>
  
  <pre><code>enum sound: {
    bark: 0,
    meow: 1, 
    moo: 2
  }
  </code></pre>
  
  <p>And here is the output of the query: </p>
  
  <pre><code>Sound Count     Sound
  
  2               0
  4               1
  3               2
  </code></pre>
  
  <p>Whereas I really want: </p>
  
  <pre><code>Sound Count     Sound
  
  2               bark
  4               meow
  3               moo
  </code></pre>