Denmark does not have significant oil reserves; you may be thinking of Norway. The Danish economy is based on some weird mixture of: shipping (Maersk), entertainment (Lego), brewing (Carlsberg), and banking (Danske Bank et al.). There is a goal of making wind turbines a major industrial sector as well.
Though it is worth noting that Denmark is one of Europe's top oil producers, and is a net exporter. So Denmark does have economically significant reserves.
It's a net exporter, but a fairly small one. From what I can find, oil-related royalties contribute about 3% of the state budget. I can believe that still results in a fairly high ranking, but it's not exactly funding the country with that. The Texas state government gets more like 5% from oil, and hasn't succeeded in setting up a social-democratic system...
(That said, I do not see a problem with a guaranteed basic income..when people can make more easily.)