Q:

SQL Server : select where row was X but is not now X

I have a table like this:
WOTranID   WOID   Status      DateCreated
----------------------------------------------
1          5      Ready        6/6/2015
2          5      Pending      6/5/2015
3          7      Pending      6/9/2015
4          8      Scheduled    6/10/2015

What I need is to select all WOID where the status was pending but is not currently pending. 
Thank you for your help. 
Edit: Using the example table above I would only like to return WOID 5. 

A:

First, select all WOIDs which have had a status of pending, then intersect that with the list of WOIDs whose current status is not pending (using row_number() to select the latest status per WOID).   
(Select Distinct WOID
from MyTable
where Status = 'Pending')

intersect 

(Select WOID
from
  (Select WOID
    , Status
    , Row_number() over (partition by WOID order by DateCreated desc) as RN
  from MyTable) a
where Status <> 'Pending' and RN = 1)

