-
-
Save a2ndrade/08bb7417b901e904d3b4 to your computer and use it in GitHub Desktop.
Atomic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| / data sample | |
| V:"abcdefghijklmnopqrstuvwxyz" / universe of values | |
| e:1 1 2 3 4 4 4 4 4 4 4 5 6 6 6 6 6 6 8 8 / entity column | |
| v:V@(#e)?#V / value column | |
| t:1+!#v / transaction column | |
| historical:+`e`v`t!(e;v;t) / historical table | |
| / snapshot table as-of transaction *15* | |
| whereAsOfTx:&~t>15 | |
| asOfE:e[whereAsOfTx] | |
| whereLatestE:-1+*:'1_=asOfE,#asOfE | |
| uniqueE:e[whereLatestE] | |
| latestV:v[whereLatestE] | |
| whereSortedV:<latestV | |
| eSortedByV:uniqueE[whereSortedV] | |
| sortedV:latestV[whereSortedV] | |
| snapshot:(+(,`e)!,eSortedByV)!+(,`v)!,sortedV / snapshot table |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment