I'm new to postgreSQL. I'm trying to execute some simple queries but i'm having an error i'm stuck with. Following is a simple query
select e.street, e.city
from employee e join works w join managers m on e.Lastname=w.Lastname
and w.Lastname=m.MLastname
where w.companyname='Union Pacific';
The error that is being thrown while executing this query is
ERROR: syntax error at or near "where"
LINE 4: where w.companyname='Union Pacific';
^
********** Error **********
ERROR: syntax error at or near "where"
SQL state: 42601
Character: 124
I couldn't understand this error. Need some help.