title: Percentage of total in SQLite
body: <p>I know this is a ridiculously obvious question, but I'm not getting the way SQL queries need to be combines. I have a table named Customers and I need to calculate the percentage of total customers that have the value x as 99. There are only three columns in the table.</p>
  
  <p>So far I've got <code>SELECT COUNT (*) FROM customer WHERE x=99</code> and <code>SELECT COUNT (*) FROM customer</code>, but I'm not sure how to divide one by the other in a single query. I have tried <code>SELECT (COUNT (*) FROM t_customer))/(Count (*) FROM t_customer WHERE customer_x=99))</code> but obviously I'm doing it very wrong! I'm using SQLite3. Any help would be much appreciated</p>