if table1 and table2 have a common column and you have join condition in place then
here's the syntax:
sum(if datepart('field1',date)=datepart('field2',date) then sales)
in your case it would be
sum(if datepart('table2.queuedate',date)=datepart('table1.ind',date) then sales)
hope it helps.