title: CASE WHEN labels not applying correctly
body: <p>My CASE WHEN categories are not applying correctly. You can see here that it's assigning these tracks a pace value of '1' when their tempos are above 120. I defined in the CASE WHEN statement that '1' is only for tempos below '40'</p>
  <pre><code>SELECT track_name, tempo, 
      CASE 
           WHEN tempo &lt; '40' THEN '1'
           WHEN tempo &gt;= '40' AND tempo &lt; '50' THEN '2'
           WHEN tempo &gt;= '50' AND tempo &lt; '60' THEN '3'
           WHEN tempo &gt;= '60' AND tempo &lt; '70' THEN '4'
           WHEN tempo &gt;= '70' AND tempo &lt; '80' THEN '5'
           WHEN tempo &gt;= '80' AND tempo &lt; '90' THEN '6'
           WHEN tempo &gt;= '90' AND tempo &lt; '100' THEN '7'
           WHEN tempo &gt;= '100' AND tempo &lt; '110' THEN '8'
           WHEN tempo &gt;= '110' AND tempo &lt; '120' THEN '9'
           WHEN tempo &gt;= '120' AND tempo &lt; '130' THEN '10'
           WHEN tempo &gt;= '130' AND tempo &lt; '140' THEN '11'
           WHEN tempo &gt;= '140' AND tempo &lt; '150' THEN '12'
           ELSE NULL
      END  AS Pace
  FROM unpopular_songs 
  ;
  </code></pre>
  <p><a href="https://i.stack.imgur.com/eL53o.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eL53o.png" alt="this shows the incorrect output" /></a></p>