The correct order in which energy moves through an ecosystem is:
d) Sun, producer, herbivore, carnivore, decomposer
This sequence reflects the flow of energy starting from the Sun (the primary energy source), to producers (plants that capture solar energy), then to herbivores (primary consumers), followed by carnivores (secondary consumers), and finally to decomposers (organisms that break down dead matter).