I have this SQL script:
create view transactview as (
select SUM(quantity) as venta,tag,shift_id,pump,nozzle from transactions
where tag in (100,200,300,400) group by tag,shift_id,pump,nozzle
union select SUM(quantity) as venta,'-1',shift_id,pump,nozzle from transactions
where tag not in (100,200,300,400) group by shift_id,pump,nozzle )
And I do not understand the function of the column '-1' in the second "Select" or because it is there.
Thanks