When PostgreSQL cannot run a query, it does not guess. It stops and tells you why:
text
ERROR: relation "customer" does not exist
SELECT * FROM customer
^- ERROR: says what is wrong. A relation is a table (Lesson 2).
- The
^points at the place in the query where PostgreSQL found the problem. - Some errors add a HINT: line with a suggestion.
The editor holds three broken queries. Run them all, read the first error, fix it and run again. A run stops at the first statement that fails, so fix them one by one.
- Fix the query on
customer. - Fix the query on
products. - Fix the last query. Its error says
syntax error at or near. The word afternearis the first word that PostgreSQL could not fit into a query. The mistake is often just before it.