This visual execution trace shows how MongoDB's $first and $last accumulators work inside an aggregation pipeline. Documents are first sorted by date, then grouped by store. For each group, $first picks the amount from the earliest date document, and $last picks the amount from the latest date document. The execution table tracks each document processed, the group it belongs to, and how $first and $last values update. The variable tracker shows these values step-by-step. Key moments clarify why $first stays the same after the first document and how sorting affects results. The quiz tests understanding of these steps and the importance of sorting. This helps beginners see how $first and $last pick values from grouped documents in order.