Cleaned up some queries in md.sql.

This commit is contained in:
Pedro Pinto committed 2020-11-10 10:46:52 -05:00
1 parent a906eb951e
commit 63a2ba032d
1 file changed
+6 -6
+6 -6
View File
@@ -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;