Question: Can someone help me, i don't know why my SQL script wont run? can any one see why?
Here it is

```
SELECT
     vi.`id` as 'VehicleId', vi.`class_type` as 'VehicleClass',vi.`registration_number` as 'VehicleRegistrationNumber',
     vr.`role_name` as 'VehicleRole',
     vm.`name` as 'VehicleMake',
     vmo.`name` as 'VehicleModel',
     ud.`name` as 'Depot location',

WHERE vehicle_role = 'High Volume Jet Vac'

FROM 
   unify_rebuild.vehicle_information as vi

LEFT JOIN 
  unify_rebuild.vehicle_role as vr
ON
  vi.unit_role = vr.role_id

LEFT JOIN
  unify_rebuild.vehicle_manufacturer as vm
ON
  vi.make = vm.id

LEFT JOIN
  unify_rebuild.vehicle_model as vmo
ON
  vi.model = vmo.id

LEFT JOIN
  unify_rebuild.unify_depot as ud
ON
  vi.depot_current_location = ud.id

```

I am trying to make one master table by joining data into the one so i can then display it on my web app, if anyone can see anything wrong i would greatly appreciate some pointers.

Answer: 
Have you tried to execute your query? I'm pretty sure that you'll receive some interesting errors in order to fix it.

The WHERE clause needs to be at the end of your query (after FROM and the JOINS) and you need to remove the last comma of your SELECT statement.
```
SELECT vi.id VehicleId
     , vi.class_type VehicleClass
     , vi.registration_number VehicleRegistrationNumber
     , vr.role_name VehicleRole
     , vm.name VehicleMake
     , vmo.name VehicleModel
     , ud.name 'Depot location'
  FROM vehicle_information vi
  LEFT 
  JOIN vehicle_role vr
    ON vi.unit_role = vr.role_id
   AND vr.role_name  = 'High Volume Jet Vac'
  LEFT 
  JOIN vehicle_manufacturer vm
    ON vi.make = vm.id
  LEFT 
  JOIN vehicle_model vmo
    ON vi.model = vmo.id
  LEFT 
  JOIN unify_depot ud
    ON vi.depot_current_location = ud.id

```