Skip to content

sql windows functions #1760

Apr 18, 2024 · 25 comments · 6 replies
Discussion options

You must be logged in to vote

Now that qsv_cumsum is implemented we can actually run the code in my April 27, 2024 post above fixing the syntax errors that were overlooked because we could not actually run it then. (^ is the line continuation character on Windows)

qsv join State data.csv Abbreviation us-states-example.csv | ^
qsv luau map --colindex "Rate (%)" "col[9]" | ^
qsv luau map --colindex "Amount with Tax" "string.format('%.2f', Amount*(1+col[9]/100))" | ^
qsv luau map "Running Total - Before Tax" "string.format('%.2f', qsv_cumsum(Amount))" | ^
qsv luau map --colindex "Running Total - After Tax" "string.format('%.2f', qsv_cumsum(Amount*(1+col[9]/100)))" | ^
qsv select !4-12 | ^
qsv table

giving

Order ID     A…

Replies: 25 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@jqnatividad
Comment options

Comment options

You must be logged in to vote
1 reply
@jqnatividad
Comment options

Comment options

You must be logged in to vote
1 reply
@jqnatividad
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@jqnatividad
Comment options

Comment options

You must be logged in to vote
1 reply
@jqnatividad
Comment options

Comment options

You must be logged in to vote
1 reply
@jqnatividad
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by jqnatividad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1754 on April 19, 2024 20:24.