title: sqlite3 - MAX() function does not return the maximum value of a column
body: <p>Operating on a table of the following format:</p>
  
  <pre><code>name                      size        solution_length  solution_forks  backtravel_parallel  backtravel_perp  forks_to_dead  dead_overlap  weighted_dead_length
  ------------------------  ----------  ---------------  --------------  -------------------  ---------------  -------------  ------------  --------------------
  AldousBroder_5_33342.txt  5           14               4               0                    0                4              26            444
  AldousBroder_5_05916.txt  5           28               4               4                    0                4              28            728
  </code></pre>
  
  <p>This is how I would get the maximum value of a column.</p>
  
  <pre><code>sqlite&gt; SELECT MAX(weighted_dead_length) FROM mazes_100k;
  
  MAX(weighted_dead_length)
  -------------------------
  996
  </code></pre>
  
  <p>However, it doesn't seem to be the true maximum:</p>
  
  <pre><code>sqlite&gt; SELECT COUNT(*) FROM mazes_100k WHERE weighted_dead_length = 1000;
  
  COUNT(*)
  ----------
  15
  </code></pre>
  
  <p>Why is it that if I try counting the number of rows with the value of a column <em>higher</em> than what was returned by MAX() I still get some hits? It seems as if MAX() doesn't return the true maximum of a column.</p>
  
  <p>By trial an error, using COUNT(), it seems that the true maximum is 1004 - how can I get MAX() to return that?</p>
  
  <p>Thanks!</p>