There are a series of three queries that are run in this order:
SELECT dbo_IMINVTRX_SQL.item_no, dbo_IMINVTRX_SQL.Loc, dbo_IMINVTRX_SQL.trx_dt, dbo_IMINVTRX_SQL.doc_type, dbo_IMITMIDX_SQL.activity_cd, dbo_IMINVTRX_SQL.quantity, dbo_IMITMIDX_SQL.prod_cat, dbo_IMITMIDX_SQL.mat_cost_type...