Newbie - incorrect syntax error near the word where
===

    select o.id, o.Name, o.StageName, o.[Type],o.Account__c,o.SalesPerson__c, o2.AccountId__c,o2.Sales_Person__c, o2.InvoiceDate__c
    from customers.dbo.sales as o Inner Join
    customers.dbo.account as a on a.Id = o.AccountId INNER JOIN
    (Select MAX(Id)Id, AccountId 
    from customers.dbo.order__c
    where Sales_Person__c <> NULL) as o1 INNER JOIN
    Customers.dbo.Order__c as o2 on o2.Id = o1.Id
    Where (o.SalesPerson__c = NULL) and (o.[Type] = 'Renewal') and (o.StageName NOT LIKE 'Closed%')

Not sure what I did wrong.  I'm getting the following error:
Incorrect syntax near the keyword 'Where'

I'm trying to get the most recent Order for each account.  Any help would be greatly appreciated.