in M2_UGL_2 of Agentic AI course-qty_delta → stock change (+ for insert/restock, – for sale, 0 for price updates). So to calculate answer for this question-Which color of product has the highest total sales? —Only -ve values should be considered
Hi vaaCoder,
This got me by surprise too, and at first I thought something was wrong with the SQL. But note the WHERE action = ‘sale’ SQL snippet. This leads to only negative values being considered, which are then summed after being turned into positive values by ABS().