title: how to run complex sql of cassandra via node js
body: <p>I am trying to run complex sql of cassandra from node.js and using cassandra express package for it and below is query:</p>
  
  <pre><code>client.execute("select distinct c.objekt PSP, b.bestellung purchase_order, b.details, b.bestellnettowert Budget, c.Interim_Amounts, c.belegdatum, b.cost_centre
                                  from
                                              (select objekt, sum("Wert/KWahr") Interim_Amounts, belegdatum, bestellung from bdr.cj74 where year(belegdatum) = '2016' group by objekt, belegdatum, bestellung) c,
                                              (select bestellung, "Lieferant/Lieferwerk" details, bestellnettowert, belegdatum, "PSP-Elm", "Kostenst." cost_centre  from bdr.opexcapex where year(opexcapex.belegdatum) = '2016') b
                                  where b."PSP-Elm" = c.objekt
                                              and year(c.belegdatum) = year(b.belegdatum)
                                              and c.bestellung = b.bestellung", [],
  
  function(err, result) {
  </code></pre>
  
  <p>If I run simple select statement it is working and any help would be great!</p>