Grammar Question

A) During the 1990s, the number of factory outlet malls greatly increased in the United States, at which brand-name goods are sold at discount prices.
B) Factory outlet malls in the United States greatly increased in number during the 1990s, at which brand-name goods are sold at discount prices.
C) Greatly increasing during the 1990s were the number of factory outlet malls in the United, at which brand-name goods are sold at discount prices.
D) The number of factory outlet malls, at which brand-name goods are sold at discount prices, greatly increased in the United States during the 1990s.
E) In the United States, the number of factory outlet malls greatly increased during the 1990s, at which brand-name goods are sold at discount prices.

At which refers to the noun right before it right?
So A) would be refering to United States, B) refering to 1990s?
Is there a difference between at which and which?

Correct, A and B are bad answers for he reasons you stated.

The difference between which and at which can be fundamental to the meaning of your sentence. For example, “Bread is sold at grocery stores” could be rearranged to form “Grocery stores, at which bread is sold…” However, “Grocery stores, which bread is sold” would be something like “Bread is sold grocery stores,” which doesn’t make any sense. Same for any other preposition – they change where the action is being done, how it is being done, to whom, etc.

@bodangles ’ explanation is a good one. Nice.

I have earned the approval of @marvin100 ! Today is a good day.