I don't know what possessed the Danish queen to invite him in the first place, but now that he canceled the visit, I can't imagine anyone in Denmark will shed any tears over missing out on that.
Greenland sure got a lot of publicity from it, so they can't be too unhappy, although it might also focus more international attention on their mining deals moving forward. And for the US getting access to the rare earth metals in Greenland, I could see it going either way, Trump's little stunt could still give the US an edge, or could hurt more than it helps.