How to use RANK() method in View

SELECT M.* FROM (
SELECT PURCHID , CREATEDBY AS [PO Sent By] , min(CREATEDDATETIME) AS [PO Confirmation Date]
,RANK() OVER (PARTITION BY PURCHID ORDER BY CREATEDDATETIME ASC) AS Seq
from VendPurchOrderJour group by PURCHID,CREATEDBY,CREATEDDATETIME ) M
WHERE M.Seq = 1