Denmark has several oil and gas fields. It's tiny compared to Norway but not completely insignificant.

It's largely insignificant when the question is "why is Denmark rich". Same goes for Sweden.