I am trying to write a query where I can get YTD totals for current year and previous Year for a Customer. So I have 2 tables 1 called _sales15 and the other is _sales14. This is what I have but I am not getting the write answer. It's almost like it multiplying the answer by 10.
select _sales15.cmp_name, _sales15.sum(total) as total15, _sales14.sum(total) as total14
from _sales15 left join _sales14 on _sales15.cmp_name= _sales14.cmp_name
where _sales15.month <= 10..
Any Ideas where I am going wrong?