When I run the following statements I get the following results:
Code:
select * from aaa.extendeddata where aaa.extendeddata.stbId in ('R1881445299');
Result: 8

Code:
select * from aaa.invidifilelist where aaa.invidifilelist.stbId in ('R1881445299');
Result: 18

However when I run the following I get this result:
Code:
select 
    count(ext.stbId), 
    count(inv.stbId) 
from (select * from aaa.extendeddata where aaa.extendeddata.stbId in ('R1881445299')) as ext, 
       (select * from aaa.invidifilelist where aaa.invidifilelist.stbId in ('R1881445299')) as inv;
Result: 144, 144

My question is why do I get the correct results when I run the sub queries but when I combine them I get the results multiplied by each other?