Something like this?
select by xxx from reverse table
Von: firstname.lastname@example.org [mailto:email@example.com] Im Auftrag von Carfield Yim
Gesendet: Dienstag, 5. Januar 2016 01:55
An: Kdb+ Personal Developers
Betreff: [personal kdb+] Get first row from a group
Hi, if I like to select the last row from a group, I can just do
select by xxx from table
if there similar syntax to select the first row? Other than using "first" for all elements?
You received this message because you are subscribed to the Google Groups "Kdb+ Personal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firstname.lastname@example.org.
To post to this group, send email to email@example.com.
Visit this group at https://groups.google.com/group/personal-kdbplus.
For more options, visit https://groups.google.com/d/optout.
What's wrong with
select from table where i=(first;i) fby keycol
Just have to be careful of using "i" with partitioned tables.
Also, the above can be easily changed to grab last, or first 2 rows per key etc. And can be used for multiple keys
select from table where i=(first;i) fby (keycol1;keycol2)
Tel: +44 (0)28 3025 2242
Tel: +1 (212) 447 6700
Tel: +61 (0)2 9236 5700