I created an cube in Apache kylin where 'ft' is my facttable and 'ls' is one of the dimensiontables. Both are joint on the column 'lid'. My query
select ft.sid, ls.lid, ls.pos
from(
select sid, lid
from ft
where lid = '1500221'
group by lid, sid
) as ft inner join (
select lid, pos
from ls
where pos = '14'
) as ls on (ft.lid = ls.lid)
returns one row like
1500 1500221 14
So far, so good. Leaving out the first where-condition, my result is also one row, but this time another...
select ft.sid, ls.lid, ls.pos
from(
select sid, lid
from ft
group by lid, sid
) as ft inner join (
select lid, pos
from ls
where pos = '14'
) as ls on (ft.lid = ls.lid)
returns
0140 0140110 14
Both are correct results, but the second query should return more than just one row and at least the result of the first query also.
Does anyone knows what is going wrong here?
Thanks in advance, Søren