Query editor
-- Test 1: rows 68,803 in both tables, no restarts occurred during data gathering-- Test 2: rows 74,100 | 74,079 -> 21 missing events during the restarts -> some were quick starts & shutdowns, need to investigate missing data.with dune_data as (select*-- count(*)from friendtech_base.FriendtechSharesV1_evt_Tradewhereevt_block_number >= {{lower_block}}and evt_block_number <= {{upper_block}}-- order by evt_block_number-- limit 5), supabase_data as (select *from dune.sliceanalytics_friendtech.dataset_events_data_sb awhereblocknumber >= {{lower_block}}and blocknumber <= {{upper_block}})select-- a.*-- , b.id-- DISTINCTa.evt_block_number --, a.evt_block_timefrom dune_data aLEFT OUTER JOIN supabase_data b on a.evt_tx_hash = b.transactionhashWHEREb.id is NULL-- and evt_block_number >= 5376388-- and evt_block_number <= 5377648ORDER BY evt_block_number-- Correction script successfully filled in data gap 5376388 -> 5377648-- Test 2: 234 rows of data missing, Database correct block range 5343338 -> 5421853-- Block ranges: [(5388106, 5388113, 7), (5390008, 5390010, 2), (5394086, 5394094, 8), (5401215, 5401220, 5), (5413863, 5413883, 20), (5414791, 5414806, 15), (5417965, 5417996, 31), (5418123, 5418152, 29)]-- Test 3: Post Dune Query sleep & deletion updates, test range 5319183 -> 5462128-- required corrections 5342456 -> 5342479 (~2 min span, 2023-10-16 16:38) & single block 5343337 (2023-10-16 17:07)-- Both Spans occurred from Dune backfill script-- Test 4: Backfill ~101923 rows: Dune: 267,771 , Supabase: 268,268 -> supabase likely has duplicates-- verify that supabase only has unique event data or identify duplicates-- Duplicate Checking-- select-- DISTINCT -- 268,268 down to 169,946-- trader, subject, isbuy-- , shareamount, ethamount, protocolethamount-- , subjectethamount, supply-- , transactionhash, blocknumber-- from dune.sliceanalytics_friendtech.dataset_events_data_sb-- where-- blocknumber >= {{lower_block}}-- and blocknumber <= {{upper_block}}