Introduction to Relational Databases in SQL
Timo Grossenbacher
Data Journalist
From the PostgreSQL documentation.
CREATE TABLE weather ( temperature integer, wind_speed text);
SELECT temperature * wind_speed AS wind_chill FROM weather;
operator does not exist: integer * text
HINT: No operator matches the given name and argument type(s).
You might need to add explicit type casts.
SELECT temperature * CAST(wind_speed AS integer) AS wind_chill
FROM weather;
Introduction to Relational Databases in SQL