SELECT strftime('%d', o."CloseDate") 'Day', SUM(case when (strftime('%Y-%m', o."CloseDate") = '2015-05') then ifnull(o."Amount",0) else 0 end) 'Amount (Prev Month)', SUM(case when (strftime('%Y-%m', o."CloseDate") = '2015-06') then ifnull(o."Amount",0) else 0 end) 'Amount (Current Month)' FROM "Opportunity" o WHERE o."IsClosed"=true AND o."IsWon"=true AND o."CloseDate">='2015-05-01' and o."CloseDate"<='2015-06-30' GROUP BY strftime('%d', o."CloseDate")
Skyvia Query allows you to run SQL queries against databases and cloud applications from web browser. Access and manage your data from anywhere, build reports, arrange your data in the most informative way and simplify your decision-making process easily!