{"slug":"etf-creation-and-redemption","qid":"trade_sizes","label":"One session of SPY prints, sorted into trade size buckets","post_title":"How ETF Creation and Redemption Works","post_url":"/blog/etf-creation-and-redemption#q-trade_sizes","columns":["bucket","trade_count","pct_of_prints","pct_of_volume"],"rows":[{"bucket":"1 to 99","trade_count":806032,"pct_of_prints":83.01,"pct_of_volume":34.17},{"bucket":"100 to 999","trade_count":161615,"pct_of_prints":16.64,"pct_of_volume":39.63},{"bucket":"1,000 to 9,999","trade_count":3290,"pct_of_prints":0.34,"pct_of_volume":8.2},{"bucket":"10,000 and up","trade_count":106,"pct_of_prints":0.01,"pct_of_volume":18}],"shape":"ranking","sql":"WITH\n    tape AS\n    (\n        SELECT size\n        FROM global_markets.stocks_trades\n        WHERE ticker = 'SPY'\n          AND sip_timestamp >= '2026-06-17 13:30:00'\n          AND sip_timestamp <  '2026-06-17 20:00:00'\n          AND size > 0\n    ),\n    day_total AS\n    (\n        SELECT\n            sum(size) AS all_shares,\n            count()   AS all_prints\n        FROM tape\n    )\nSELECT\n    multiIf(t.size < 100,   '1 to 99',\n            t.size < 1000,  '100 to 999',\n            t.size < 10000, '1,000 to 9,999',\n                            '10,000 and up')        AS bucket,\n    count()                                         AS trade_count,\n    round(100 * count() / any(d.all_prints), 2)     AS pct_of_prints,\n    round(100 * sum(t.size) / any(d.all_shares), 2) AS pct_of_volume\nFROM tape AS t\nCROSS JOIN day_total AS d\nGROUP BY bucket\nORDER BY min(t.size)","computed_at":"2026-08-07T16:57:14.392807+00:00","elapsed":0.002545731}