ERROR: invalid input syntax for type date: "" LINE 1: ... sum(amount) AS prof FROM sac.profit1 WHERE date<='' and pmo... ^