Would anyone know how to write the following from SQL in BQL?

```
   SELECT        *
    FROM            (SELECT        *, DENSE_RANK() OVER (PARTITION BY LotSerialNbr
                          ORDER BY LastModifiedDateTime DESC) AS rankid
                          FROM            dbo.INTranSplit
                          WHERE        DocType = 'R') A
    WHERE        rankid = 1

```

I am attempting to get only the most recent inventory receipt from INTranSplit when there are multiple receipts for the same serial number.
Thanks