Advanced¶
48 |Grouping By¶
50 |Grouping by
51 |Last Before¶
54 |Using Kleisli and Lifted¶
57 |If you wrap these you get a few benefits:
58 |-
59 |
- The resulting columns have more readable names 60 |
- You can use the resulting functions as methods 61 |
- They add on the group bys of their source. 62 |
How it Works¶
67 |Basically the internal representation of a query is as a graph. Query combinators are just transformations on this graph. Before generating the SQL, LambdaQuery performs a reduction algorithm on this graph, and then the reduced graph is compiled to SQL. To see the SQL of the unreduced graph, use the reduce=False
option for the Query.sql
method.