Skip to content

sql windows functions #1760

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

You must be logged in to vote

I found a workaround if there are only a small number of rows in each group (which is my case). It is fairly awkward and complex, it is probably pretty inefficient, it involves generating a bunch of temporary files which w ould later have to be deleted and it seems it can't be represented as single pipeline but it seems to work on this small example.

Suppose we have this file1.csv

Name,Value
A,1
A,11
B,2
C,3

The code follows assuming MS-Windows. First we create ordinary sequence numbers in tmp1.csv and then make a copy in temp2 except we make the names distinct from tmp1.csv. We then join tmp1.csv and tmp2.csv by group (the Name column) and only keep rows for which the index in the secon…

Replies: 24 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
Answer selected by jqnatividad
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

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.