Aditya
1
https://learninghub.kx.com/forums/topic/nearly-same-query-but-different-result
Hey
these two query should be providing same output. Please help me understand why they are different.
select trips : count i by date from jan09 lj `date xkey select date, avgtemp from weather
jan09C:select trips: count i by date from jan09
jan09C lj `date xkey select date, avgtemp from weather
q interprets right-to-left, so what your first expression is actually doing is executing the lj on jan09 before selecting from it.
What it's therefore doing is counting the number of rows from the combined table.
The second expression is selecting the table *then* executing the join, which is why you now see the avgTemps.
Aditya
3
Thanks a lot
this makes sense