Query editor
WITH combined_counts AS (SELECTcall_block_date,COUNT(CASE WHEN account_payer = '4p16wya1Vw2u9w22oah4yXQgySb6eWKRRLMsEXCreish' THEN 1 END) AS sponsored_price_feeds_count,COUNT(CASE WHEN account_payer != '4p16wya1Vw2u9w22oah4yXQgySb6eWKRRLMsEXCreish' THEN 1 END) AS non_sponsored_price_feeds_count,(SELECT COUNT(*)FROM pyth_solana.pyth_solana_receiver_call_postUpdateAtomicWHERE DATE(call_block_date) = DATE(pyth_solana.pyth_solana_receiver_call_postUpdate.call_block_date)) AS post_update_atomic_countFROM pyth_solana.pyth_solana_receiver_call_postUpdateWHERE call_block_date < CURRENT_DATEGROUP BY call_block_date),totals AS (SELECTcall_block_date,sponsored_price_feeds_count,non_sponsored_price_feeds_count,post_update_atomic_count,sponsored_price_feeds_count + non_sponsored_price_feeds_count + post_update_atomic_count AS total_countFROM combined_counts)SELECT *FROM totalsORDER BY call_block_date;