select data.weekbeginning, tc, spxtc from (select weekbeginning, count(ticker_symbol) as tc from vw_earnings_upcoming group by weekbeginning) as data left outer join (select weekbeginning, count(ticker_symbol) as spxtc from vw_earnings_upcoming where ticker_symbol in (select ticker_symbol from vw_todays_etf_holdings where etf_ticker = 'spy') group by weekbeginning) as data2 on data.weekbeginning = data2.weekbeginning order by data.weekbeginning

Number of Earnings Reports by Week

Week
Beginning
Number of
Earnings
Announcements
Number of
SPX Earnings
Announcements
8/20/2018 374 20 Sectors Stocks Returns Pre-Earnings Returns
8/27/2018 228 6 Sectors Stocks Returns Pre-Earnings Returns
9/3/2018 276 2 Sectors Stocks Returns Pre-Earnings Returns
9/10/2018 100 2 Sectors Stocks Returns Pre-Earnings Returns
9/17/2018 56 4 Sectors Stocks Returns Pre-Earnings Returns
9/24/2018 107 10 Sectors Stocks Returns Pre-Earnings Returns
10/1/2018 73 6 Sectors Stocks Returns Pre-Earnings Returns