{"slug":"a-share-level-2-market-data","qid":"bid_churn","label":"How many distinct best bid prices fit in one three second interval (AAPL, 16 September 2026)","post_title":"What A-share Level 2 Data Actually Contains","post_url":"/blog/a-share-level-2-market-data#q-bid_churn","columns":["distinct_best_bids","windows","share_of_windows_pct"],"rows":[{"distinct_best_bids":1,"windows":2553,"share_of_windows_pct":24.8},{"distinct_best_bids":2,"windows":1688,"share_of_windows_pct":16.4},{"distinct_best_bids":3,"windows":1231,"share_of_windows_pct":12},{"distinct_best_bids":4,"windows":1078,"share_of_windows_pct":10.5},{"distinct_best_bids":5,"windows":918,"share_of_windows_pct":8.9},{"distinct_best_bids":6,"windows":690,"share_of_windows_pct":6.7},{"distinct_best_bids":7,"windows":536,"share_of_windows_pct":5.2},{"distinct_best_bids":8,"windows":376,"share_of_windows_pct":3.7},{"distinct_best_bids":9,"windows":273,"share_of_windows_pct":2.7},{"distinct_best_bids":10,"windows":934,"share_of_windows_pct":9.1}],"shape":"ranking","sql":"WITH windows AS\n(\n    SELECT\n        toStartOfInterval(toTimeZone(sip_timestamp, 'America/New_York'), INTERVAL 3 SECOND) AS win,\n        uniqExact(bid_price)                                                                AS distinct_bids\n    FROM global_markets.cache_stocks_quotes\n    WHERE ticker = 'AAPL'\n      AND sip_timestamp >= '2026-09-16 08:00:00'\n      AND sip_timestamp <  '2026-09-17 00:00:00'\n      AND bid_price > 0\n    GROUP BY win\n)\nSELECT\n    toUInt16(least(distinct_bids, 10))                        AS distinct_best_bids,\n    count()                                                   AS windows,\n    round(100.0 * count() / (SELECT count() FROM windows), 1) AS share_of_windows_pct\nFROM windows\nGROUP BY distinct_best_bids\nORDER BY distinct_best_bids","computed_at":"2026-10-07T15:17:10.719186+00:00","elapsed":0.003475136}