--- source: prqlc/prqlc/tests/integration/queries.rs expression: "# mssql:test\nfrom tracks\nderive d = album_id + 1\ngroup d (\n aggregate {\n n1 = (track_id | sum),\n }\n)\nsort d\ntake 10\nselect { d1 = d, n1 }\n" input_file: prqlc/prqlc/tests/integration/queries/group_sort.prql snapshot_kind: text --- frames: - - 1:25-48 - columns: - !All input_id: 130 except: [] - !Single name: - d target_id: 132 target_name: null inputs: - id: 130 name: tracks table: - default_db - tracks - - 1:63-111 - columns: - !Single name: - d target_id: 138 target_name: null - !Single name: - n1 target_id: 155 target_name: null inputs: - id: 130 name: tracks table: - default_db - tracks - - 1:114-120 - columns: - !Single name: - d target_id: 138 target_name: null - !Single name: - n1 target_id: 155 target_name: null inputs: - id: 130 name: tracks table: - default_db - tracks - - 1:121-128 - columns: - !Single name: - d target_id: 138 target_name: null - !Single name: - n1 target_id: 155 target_name: null inputs: - id: 130 name: tracks table: - default_db - tracks - - 1:129-150 - columns: - !Single name: - d1 target_id: 168 target_name: null - !Single name: - n1 target_id: 169 target_name: null inputs: - id: 130 name: tracks table: - default_db - tracks nodes: - id: 130 kind: Ident span: 1:13-24 ident: !Ident - default_db - tracks parent: 137 - id: 132 kind: RqOperator span: 1:36-48 alias: d targets: - 134 - 135 parent: 136 - id: 134 kind: Ident span: 1:36-44 ident: !Ident - this - tracks - album_id targets: - 130 - id: 135 kind: Literal span: 1:47-48 - id: 136 kind: Tuple span: 1:36-48 children: - 132 parent: 137 - id: 137 kind: 'TransformCall: Derive' span: 1:25-48 children: - 130 - 136 parent: 159 - id: 138 kind: Ident span: 1:55-56 ident: !Ident - this - d targets: - 132 parent: 141 - id: 141 kind: Tuple span: 1:55-56 children: - 138 parent: 159 - id: 155 kind: RqOperator span: 1:100-103 alias: n1 targets: - 157 parent: 158 - id: 157 kind: Ident span: 1:89-97 ident: !Ident - this - tracks - track_id targets: - 130 - id: 158 kind: Tuple span: 1:73-111 children: - 155 parent: 159 - id: 159 kind: 'TransformCall: Aggregate' span: 1:63-111 children: - 137 - 158 - 141 parent: 164 - id: 162 kind: Ident span: 1:119-120 ident: !Ident - this - d targets: - 138 parent: 164 - id: 164 kind: 'TransformCall: Sort' span: 1:114-120 children: - 159 - 162 parent: 166 - id: 166 kind: 'TransformCall: Take' span: 1:121-128 children: - 164 - 167 parent: 171 - id: 167 kind: Literal parent: 166 - id: 168 kind: Ident span: 1:143-144 alias: d1 ident: !Ident - this - d targets: - 138 parent: 170 - id: 169 kind: Ident span: 1:146-148 ident: !Ident - this - n1 targets: - 155 parent: 170 - id: 170 kind: Tuple span: 1:136-150 children: - 168 - 169 parent: 171 - id: 171 kind: 'TransformCall: Select' span: 1:129-150 children: - 166 - 170 ast: name: Project stmts: - VarDef: kind: Main name: main value: Pipeline: exprs: - FuncCall: name: Ident: from span: 1:13-17 args: - Ident: tracks span: 1:18-24 span: 1:13-24 - FuncCall: name: Ident: derive span: 1:25-31 args: - Binary: left: Ident: album_id span: 1:36-44 op: Add right: Literal: Integer: 1 span: 1:47-48 span: 1:36-48 alias: d span: 1:25-48 - FuncCall: name: Ident: group span: 1:49-54 args: - Ident: d span: 1:55-56 - FuncCall: name: Ident: aggregate span: 1:63-72 args: - Tuple: - Pipeline: exprs: - Ident: track_id span: 1:89-97 - Ident: sum span: 1:100-103 span: 1:88-104 alias: n1 span: 1:73-111 span: 1:63-111 span: 1:49-113 - FuncCall: name: Ident: sort span: 1:114-118 args: - Ident: d span: 1:119-120 span: 1:114-120 - FuncCall: name: Ident: take span: 1:121-125 args: - Literal: Integer: 10 span: 1:126-128 span: 1:121-128 - FuncCall: name: Ident: select span: 1:129-135 args: - Tuple: - Ident: d span: 1:143-144 alias: d1 - Ident: n1 span: 1:146-148 span: 1:136-150 span: 1:129-150 span: 1:13-150 span: 1:0-150