ERROR: operator does not exist: timestamp without time zone ~~ unknown LINE 1: ...r)) as total from compras te where fecha_sale like '2013... HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.