Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Select distinct cadData.id FROM CAD_Data cadData INNER JOIN Sales_Data SD ON cadData.CAD_Acct=SD.CAD_Acct and SD.List_Date = (select max(List_Date) from Sales_Data where Sales_Data.CAD_Acct=cadData.CAD_Acct ) where cadData.GMA_Tag = 101 AND SD.List_Status NOT IN('ACT','OP','PEND','PSHO','pnd') ORDER BY cadData.id asc limit 10
Add Comment
Please, Sign In to add comment