diff --git a/src/data_files/files/spartan/md.sql b/src/data_files/files/spartan/md.sql index a5b036859..6246ba5e6 100644 --- a/src/data_files/files/spartan/md.sql +++ b/src/data_files/files/spartan/md.sql @@ -281,16 +281,15 @@ select from top_of_books; -drop view if exists per_symbol_event_counts; -create view per_symbol_event_counts as - +drop view if exists p_of_1sec_price_echo; +create view p_of_1sec_price_echo as with total_events as ( select symbol, count(*) total_count from - price_echoes_t + price_echoes group by symbol), echo_events as ( @@ -298,9 +297,9 @@ select count(*) echo_count, symbol from - price_echoes_t + price_echoes where - (t_time-bid_echo_t_time) < 1000*1000*1000*10 + (t_time-bid_echo_t_time) < 1000*1000*1000*1 group by symbol) select total_events.symbol, @@ -314,3 +313,4 @@ where total_events.symbol=echo_events.symbol order by p; +