Free for PREMIUM members
create table avg_helper as
select product_id pid, avg(item_cost) a from transaction_table t
where t.condition_id not in (47,61)
group by product_id;
create index avg_helper_pid on avg_helper (pid);
update product_table p set avg_cost = (select a from avg_helper h where p.product_id=h.pid);
drop table avg_helper;
Open in new window
We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!