VidhayV
6 years agoQrew Member
Summarize data from one table with requirements from another table
Hello,
I have two tables that are not linked.
Sales
Promo Line Items
The sales table has the sales data (sku, price, date, qty)
The promo line items has details of the promos (sku, promo price, promo start date, promo end date)
I am looking for a way to get the sum of qty sold with the filters sku, promo price, start date, end date applied)
For example, sku CAR would have 50 entries in the sales table between Jan 1st and Jan 31st with prices ranging from $100-$105.
sku CAR is also there in the promo line items as CAR, $101.50, Jan 10th, Jan 12th.
I would like to get a report from the sales table based on the fields in the promo line items.
Thank you
I have two tables that are not linked.
Sales
Promo Line Items
The sales table has the sales data (sku, price, date, qty)
The promo line items has details of the promos (sku, promo price, promo start date, promo end date)
I am looking for a way to get the sum of qty sold with the filters sku, promo price, start date, end date applied)
For example, sku CAR would have 50 entries in the sales table between Jan 1st and Jan 31st with prices ranging from $100-$105.
sku CAR is also there in the promo line items as CAR, $101.50, Jan 10th, Jan 12th.
I would like to get a report from the sales table based on the fields in the promo line items.
Thank you