title: Use select to do math(Sqlite)
body: <p>I'm trying to do a simple math in sqlite3.<br>
  Here's my code:<br></p>
  
  <pre><code>sqlite&gt; select (select count(noise_value) from noise where noise_value&lt;20)/total(select count(noise_value) from noise);
  Error: near "select": syntax error
  </code></pre>
  
  <p>I got an error! But the code below works:<br></p>
  
  <pre><code>sqlite&gt; select (select count(noise_value) from noise where noise_value&lt;20)/total(1);
  5.0
  </code></pre>
  
  <p>I just want to compute the result of A/B. <br>
  How can I fix the first code snippet? Help!</p>