Q:

SQL not working for pg

I'm trying to use SQL to get information from a Postgres database using Rails.
This is what I've tried:
Select starts_at, ends_at, hours, employee.maxname, workorder.wonum from events where starts_at>'2018-03-14'
inner join employees on events.employee_id = employees.id
inner join workorders on events.workorder_id = workorders.id;

I get the following error:

ERROR:  syntax error at or near "inner"
  LINE 2: inner join employees on events.employee_id = employees.id

A:

You request should look at this :
select starts_at, ends_at, hours, employee.maxname, workorder.wonum 
  from events
 inner join employees on events.employee_id = employees.id
 inner join workorders on events.workorder_id = workorders.id
 where starts_at>'2018-03-14';

