Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm not sure to understand your question.
If you want for every Key the Title of the first DataSourceOrder and the most recent BudgetDate you can use the peek function. An example:
// test data
T:
LOAD
CEIL(RAND()*5) as Key,
CEIL(RAND()*8) as DataSourceOrder,
DATE(makedate(2020) + FLOOR(RAND()*365*3)) as BudgetDate,
'Title ' & rowno() as Title,
ROWNO() as ID
AutoGenerate 100;
// flag the first record when the key change
//
F:
NOCONCATENATE
LOAD
*,
IF(Key <> PEEK('Key'), 1, NULL()) as FirstTitle_By_DataSourceOrderAndBudgetDateDesc
RESIDENT
T
ORDER BY
Key,
DataSourceOrder,
BudgetDate DESC
;
DROP TABLE T;