title: Druid aggregate functions
body: <p>I am using druid to create a UI for generating reports. For the scripting, I am using the following codes:</p>
  
  <pre><code>        {
        "type" : "doubleSum",
        "name" : "impressions",
        "fieldName" : "impressions"
      },
      {
        "type" : "doubleSum",
        "name" : "clicks",
        "fieldName" : "clicks"
      },
      {
        "type" : "doubleSum",
        "name" : "pvconversions",
        "fieldName" : "pvconversions"
      },
      {
        "type" : "doubleSum",
        "name" : "pcconversions",
        "fieldName" : "pcconversions"
      }
  </code></pre>
  
  <p>I need two more fields: </p>
  
  <pre><code>Total Conversions = pvconversions+pcconversions
  CTR = Clicks / Impressions
  </code></pre>
  
  <p>I havent been able to find anything regarding this matter about how to write them.
  Can anyone help.</p>
  
  <p>Thanks  </p>