Advertisement
Guest User

Untitled

a guest
Jan 24th, 2020
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.58 KB | None | 0 0
  1. with tls as(
  2.    select
  3.       spanid,
  4.       traceid,
  5.       Max(intV) as query_width
  6.    from
  7.       zipkin.zipkin_flat_annotation
  8.    where
  9.       ds = '2020-01-23' and
  10.       endpoint.servicenamejob = 'gizmoduck' and
  11.       label='query_width'
  12.     group by spanid, traceid
  13. )
  14. select
  15.     tfeuri,
  16.     avg(query_width) as avg_query_width
  17. from
  18.     zipkin.zipkin_trace_index t1
  19.     join tls t2 on t1.traceid = t2.traceid
  20. where
  21.     t1.ds = '2020-01-23'
  22.     and tfehost = 'api.twitter.com'
  23.     and isprodonly = true
  24. group by
  25.     tfeuri
  26. order by avg_query_width desc
  27. limit 4;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement