You should use ; instead of , in between multiple sheets.
Query should look like this:
=query( {'Aggregated Data'!A2:G; BinCounts!A2:G}, "SELECT A, B, C, E, DAY(B), YEAR(B)" & if(COUNTBLANK(Sheet14!A1:A4)=4,""," WHERE " & TEXTJOIN(" AND ", True, Sheet14!A1:A4) & "WHERE Col1 <>"),1)
Sample query that queries multiple sheets.
Reference:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…