7983-testToMaster_2438 #2977
|
@ -1,5 +1,5 @@
|
|||
-- Calculamos todos los volumenes de todos los tickets una sola vez
|
||||
CREATE OR REPLACE TEMPORARY TABLE tTicketVolume
|
||||
CREATE OR REPLACE TEMPORARY TABLE tmp.tTicketVolume
|
||||
(PRIMARY KEY (id))
|
||||
ENGINE = MEMORY
|
||||
SELECT t.id, SUM(s.quantity * ic.cm3delivery / 1000000) volume
|
||||
|
@ -13,4 +13,4 @@ UPDATE vn.ticket t
|
|||
JOIN tTicketVolume tv ON tv.id = t.id
|
||||
SET t.volume = tv.volume;
|
||||
|
||||
DROP TEMPORARY TABLE tTicketVolume;
|
||||
DROP TEMPORARY TABLE tmp.tTicketVolume;
|
||||
|
|
Loading…
Reference in New Issue