Skip to content

Instantly share code, notes, and snippets.

@bh2smith
Created January 13, 2023 12:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bh2smith/fb1e178bc41dd54d718171097706bbf2 to your computer and use it in GitHub Desktop.
Save bh2smith/fb1e178bc41dd54d718171097706bbf2 to your computer and use it in GitHub Desktop.
Orderbook Uninternalized Batches
with solutions as (
  select 
    (json -> 'solutions' ->> -1)::jsonb as winning_solution
  from solver_competitions
  where id >= 4929771  -- The first batch containing the field `uninternalizedCallData`
)

select 100.0 * sum(case when winning_solution -> 'uninternalizedCallData' is null then 1 else 0 end) / count(*) as proportion_uninternalized
from solutions

Results in ~71%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment