CREATE TABLE 0_denorm_order_details_queue (
	id INT,
	stock_id VARCHAR(20),
	order_id  INT,
	quantity DOUBLE, -- quantity in the order
	quantity_before DOUBLE, -- sum  of quantity of other orders which have priority
	priority DATETIME,
	primary key (id),
	key stock_id (stock_id, priority)
)
;
