SELECT sku, sum(quantity)
FROM orders
WHERE "location" = 'Location - 1'
group by sku;
This returns 2 columns:
Col1 = Sku
Col2 = sums of quantity for each sku
I have another table that contains skus in Col1. I then want to insert into table2 the values from Col2 where Col1 = table2.col1 (matches on orders.sku and table2.sku, inserts sum value for orders.sku)