title: Mysql 'greater than(>)' query always returns 0
body: <p>I am working with a query where I want to display number of upcoming dates. The following query returns 0 even though there are dates greater than current date. Please help me to solve this problem.</p>
  
  <pre><code>SELECT  (case when b.booked_date &gt; cast(now() as date) then sum(1) else sum(0) end) as upcoming_booked_facilities                           
          from    svk_apt_book_facilities b   
          where   b.customer_id = 1
                  and b.association_id = 1        
                  and b.is_active = 1
          group   by b.facility_id
  </code></pre>