Count Using Case Sql Function Datediff Redshift