In pre-flop all in situations, QQ is the better hand.
AA/KK have it dominated, and AK is a coinflip. Everything else is dominated.
AK is either dominated by AA/KK, or in a coin flip (it does dominate AQ/AJ, if you can get them to go all in pre-flop against you, but so does QQ).
AK is a great hand because it dominates so many premium hands (hands that everyone plays, so the chances of running into them are high). AQ, AJ, AT, KQ, KJ, KT. Because of this it plays best in a raised pot (it is a valuable hand, and you do want a good amount of money in the middle + being the pre-flop aggressor is always good), you want to raise an amount that all of the hands you dominate will call, this way you're way ahead of most of your opponent's range. By going all in pre-flop, their range becomes more defined as the hands that have you dominated. For instance KQ isn't going all in pre-flop against you, but AA/KK are. Basically when you get it all in pre-flop, you're usually hoping for a coinflip when you have AK.
Pre-flop I'll actually fold AK when confronted with an all in bet because it does so bad against the possible hands, the only way I call an all in is if there is enough money already in the pot and I don't think I'm up against AA/KK, then I'll call and take the coin flip. I might be the one to make an all in bet, but only if there's a lot of money in the pot and I don't think I'm up against AA/KK, here I'm relying on my fold equitty and accepting that when I do get called it's going to be a coinflip.
QQ on the other hand I very rarely fold pre-flop, if I don't put my opponent on aces or kings, I'm willing to go all in because I dominate so many hands that will call me.
On the flop I also preffer QQ. AK will often miss and you've got to rely on your c-bet taking down the pot (sometimes A high is ahead, but it can be difficult to know when), QQ on the other hand is fairly straightforward, if no A or K hits, you play it the same way as you would if you had pocket aces. If an A or K hits, usually you just play it as a WA/WB situation, an added advantage of this is that you can induce bets on the turn from weaker hands.