feat: refs #7564 Added volume column #2664

Merged
guillermo merged 11 commits from 7564-ticketVolume into dev 2024-08-30 11:57:10 +00:00
1 changed files with 2 additions and 2 deletions
Showing only changes of commit 2b12e046e4 - Show all commits

View File

@ -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;