--- source: prqlc/prqlc/tests/integration/queries.rs expression: tokens input_file: prqlc/prqlc/tests/integration/queries/invoice_totals.prql snapshot_kind: text --- Tokens( [ 0..0: Start, 0..56: Comment(" clickhouse:skip (clickhouse doesn't have lag function)"), 56..57: NewLine, 57..58: NewLine, 58..130: DocComment(" Calculate a number of metrics about the sales of tracks in each city."), 130..131: NewLine, 131..135: Ident("from"), 136..137: Ident("i"), 137..138: Control('='), 138..146: Ident("invoices"), 146..147: NewLine, 147..151: Ident("join"), 152..154: Ident("ii"), 154..155: Control('='), 155..168: Ident("invoice_items"), 169..170: Control('('), 170..172: Eq, 172..182: Ident("invoice_id"), 182..183: Control(')'), 183..184: NewLine, 184..190: Ident("derive"), 191..192: Control('{'), 192..193: NewLine, 197..201: Ident("city"), 202..203: Control('='), 204..205: Ident("i"), 205..206: Control('.'), 206..218: Ident("billing_city"), 218..219: Control(','), 219..220: NewLine, 224..230: Ident("street"), 231..232: Control('='), 233..234: Ident("i"), 234..235: Control('.'), 235..250: Ident("billing_address"), 250..251: Control(','), 251..252: NewLine, 252..253: Control('}'), 253..254: NewLine, 254..259: Ident("group"), 260..261: Control('{'), 261..265: Ident("city"), 265..266: Control(','), 267..273: Ident("street"), 273..274: Control('}'), 275..276: Control('('), 276..277: NewLine, 281..287: Ident("derive"), 288..293: Ident("total"), 294..295: Control('='), 296..298: Ident("ii"), 298..299: Control('.'), 299..309: Ident("unit_price"), 310..311: Control('*'), 312..314: Ident("ii"), 314..315: Control('.'), 315..323: Ident("quantity"), 323..324: NewLine, 328..337: Ident("aggregate"), 338..339: Control('{'), 339..340: NewLine, 348..358: Ident("num_orders"), 359..360: Control('='), 361..375: Ident("count_distinct"), 376..377: Ident("i"), 377..378: Control('.'), 378..388: Ident("invoice_id"), 388..389: Control(','), 389..390: NewLine, 398..408: Ident("num_tracks"), 409..410: Control('='), 411..414: Ident("sum"), 415..417: Ident("ii"), 417..418: Control('.'), 418..426: Ident("quantity"), 426..427: Control(','), 427..428: NewLine, 436..447: Ident("total_price"), 448..449: Control('='), 450..453: Ident("sum"), 454..459: Ident("total"), 459..460: Control(','), 460..461: NewLine, 465..466: Control('}'), 466..467: NewLine, 467..468: Control(')'), 468..469: NewLine, 469..474: Ident("group"), 475..476: Control('{'), 476..480: Ident("city"), 480..481: Control('}'), 482..483: Control('('), 483..484: NewLine, 488..492: Ident("sort"), 493..499: Ident("street"), 499..500: NewLine, 504..510: Ident("window"), 511..520: Ident("expanding"), 520..521: Control(':'), 521..525: Literal(Boolean(true)), 526..527: Control('('), 527..528: NewLine, 536..542: Ident("derive"), 543..544: Control('{'), 544..568: Ident("running_total_num_tracks"), 569..570: Control('='), 571..574: Ident("sum"), 575..585: Ident("num_tracks"), 585..586: Control('}'), 586..587: NewLine, 591..592: Control(')'), 592..593: NewLine, 593..594: Control(')'), 594..595: NewLine, 595..599: Ident("sort"), 600..601: Control('{'), 601..605: Ident("city"), 605..606: Control(','), 607..613: Ident("street"), 613..614: Control('}'), 614..615: NewLine, 615..621: Ident("derive"), 622..623: Control('{'), 623..643: Ident("num_tracks_last_week"), 644..645: Control('='), 646..649: Ident("lag"), 650..651: Literal(Integer(7)), 652..662: Ident("num_tracks"), 662..663: Control('}'), 663..664: NewLine, 664..670: Ident("select"), 671..672: Control('{'), 672..673: NewLine, 677..681: Ident("city"), 681..682: Control(','), 682..683: NewLine, 687..693: Ident("street"), 693..694: Control(','), 694..695: NewLine, 699..709: Ident("num_orders"), 709..710: Control(','), 710..711: NewLine, 715..725: Ident("num_tracks"), 725..726: Control(','), 726..727: NewLine, 731..755: Ident("running_total_num_tracks"), 755..756: Control(','), 756..757: NewLine, 761..781: Ident("num_tracks_last_week"), 781..782: NewLine, 782..783: Control('}'), 783..784: NewLine, 784..788: Ident("take"), 789..791: Literal(Integer(20)), 791..792: NewLine, ], )