{"slug":"trade-condition-codes-explained","qid":"ineligible_mix","label":"Share of a session's prints carrying price-ineligible conditions","post_title":"Trade Condition Codes Explained","post_url":"/blog/trade-condition-codes-explained#q-ineligible_mix","columns":["ticker","odd_lot_pct","late_or_derived_pct","extended_hours_pct"],"rows":[{"ticker":"NVDA","odd_lot_pct":85.14,"late_or_derived_pct":2.4,"extended_hours_pct":3.53},{"ticker":"KO","odd_lot_pct":80.97,"late_or_derived_pct":5.57,"extended_hours_pct":1.48},{"ticker":"MSFT","odd_lot_pct":73.99,"late_or_derived_pct":3.08,"extended_hours_pct":4.18},{"ticker":"AAPL","odd_lot_pct":65.83,"late_or_derived_pct":3.9,"extended_hours_pct":2.57},{"ticker":"SPY","odd_lot_pct":46.8,"late_or_derived_pct":1.49,"extended_hours_pct":3.21}],"shape":"ranking","sql":"WITH\n    (SELECT groupArray(toInt32(id))\n       FROM global_markets.stocks_condition_codes\n      WHERE asset_class = 'stocks'\n        AND type = 'sale_condition'\n        AND name ILIKE '%odd lot%')                       AS odd_lot_codes,\n    (SELECT groupArray(toInt32(id))\n       FROM global_markets.stocks_condition_codes\n      WHERE asset_class = 'stocks'\n        AND type = 'sale_condition'\n        AND multiSearchAnyCaseInsensitive(name,\n              ['form t', 'extended trading hours']))      AS extended_codes,\n    (SELECT groupArray(toInt32(id))\n       FROM global_markets.stocks_condition_codes\n      WHERE asset_class = 'stocks'\n        AND type = 'sale_condition'\n        AND multiSearchAnyCaseInsensitive(name,\n              ['out of sequence', 'prior reference', 'derivatively priced',\n               'average price', 'price variation', 'seller'])\n        AND NOT multiSearchAnyCaseInsensitive(name,\n              ['form t', 'extended trading hours']))      AS late_or_derived_codes\nSELECT\n    ticker,\n    round(100 * countIf(hasAny(conditions, odd_lot_codes))         / count(), 2) AS odd_lot_pct,\n    round(100 * countIf(hasAny(conditions, late_or_derived_codes)) / count(), 2) AS late_or_derived_pct,\n    round(100 * countIf(hasAny(conditions, extended_codes))        / count(), 2) AS extended_hours_pct\nFROM global_markets.stocks_trades\nWHERE ticker IN ('AAPL', 'KO', 'MSFT', 'NVDA', 'SPY')\n  AND sip_timestamp >= toDateTime('2026-06-17 08:00:00', 'UTC')\n  AND sip_timestamp <  toDateTime('2026-06-18 00:00:00', 'UTC')\nGROUP BY ticker\nORDER BY odd_lot_pct DESC","computed_at":"2026-08-07T15:25:48.877752+00:00","elapsed":0.00378023}