Home › Forums › kdb+ › Question about query that stuck the KDB process › Re: Question about query that stuck the KDB process
-
Using parse helps to see what is happening.
Parsing a simplified version of your query helped to show the order of execution in the parse tree:
q)-1 .Q.s1 last value last parse "select sums(size)/sum(size) from tab"; ((/;`size);+;(sum;`size))
The q equivalent can then be shown to have the same parse tree
q)-1 .Q.s1 parse"size/[sums;sum size]"; ((/;`size);+;(sum;`size))