title: Calculate percentage in InfluxDB
body: <p>I have a table in InfluxDB, I just need to calculate error percentage by</p>
  
  <pre><code>SELECT count(threadName) FROM "requestsRaw" WHERE "runId" ='80' as totalcount 
  
  SELECT count(threadName) FROM "requestsRaw" WHERE "runId" ='80'and errorCount=1 as error
  
  now need to calculate error/totalcount*100.
  </code></pre>
  
  <p>using influxdb query /by graffana . How can achieve it ? is there any way i can use scripting?</p>