Skip to content
Discussion options

You must be logged in to vote

And its now available!
#3115

qsv/tests/test_sqlp.rs

Lines 3827 to 3917 in 0e05622

fn sqlp_rank_funcs() {
let wrk = Workdir::new("sqlp_rank_funcs");
wrk.create(
"data.csv",
vec![
svec!["id", "category", "value"],
svec!["1", "A", "20"],
svec!["2", "A", "10"],
svec!["3", "A", "25"],
svec!["4", "B", "10"],
svec!["5", "B", "40"],
svec!["6", "B", "25"],
svec!["7", "C", "35"],
],
);
let mut cmd = wrk.command("sqlp");
cmd.arg("data.csv").arg(
r#"SELECT
value,
ROW_NUMBER() OVER (ORDER BY value DESC, category DESC) AS row_num,
RANK() OVER (ORDER BY value DESC, category DESC) …

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

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

Comment options

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

Comment options

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

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 #2452 on January 20, 2025 16:33.