title: Using coalesce with sequelize on node.js
body: <p>I have the following query:</p>
  <pre><code>select coalesce(round(sum(vdamesatual) / 
         (select count(*)
          from feriados
          where month(data)=month(current_date) and 
          day(data)&lt;day(current_date) and
          diadasemana in(2,3,4,5,6) and
          feriadonacional=0 and 
          uf &lt;&gt; (select distinct uforigem from baseprodutos where Empresa = 'test'))
         * 
         (select count(*)
          from feriados
          where month(data)=month(current_date) and 
          day(data)&gt;=day(current_date) and
          diadasemana in(2,3,4,5,6) and
          feriadonacional=0 and 
          uf &lt;&gt; (select distinct uforigem from baseprodutos where Empresa = 'test'))),0) as projecao
  from baseprodutos
  where Empresa = 'test' and
  UFDest = 'uf' and
  Fabricante = 'sample';
  </code></pre>
  <p>As you can see I have a coalesce right after the first select, and I am having trouble finding the right way to write this with sequelize; Would you have some suggestion?</p>