You have foundation of the building, columns, and the roof. Now try building the roof without those other two.
Endgame vs Opening

I have this book from the great Capablanca, Chess fundamentals, where he, as the book implies, tries to teach the player the fundamentals of chess.
He does this by going ending > middlegame > openings and then repeating the circle while notching the difficulty up some. And what strikes me straight away, is that the endings are alot harder than the rest, reading through some of the examples in this book has really opened my eyes to the extreme lack of understanding the endgame I have. Silmans comlete endgame course is not enough to get a grasp of the endgame, if you only do the chapters aimed at your class.
I'm not sure where I was going with this, but I definately feel that my opening understanding is decent, learned from just watching various master games, while my endgame is definately lacking. The endgame hasn't been as easy to absorb from master games that openings are, after a few you invariably start to see the common ideas in the openings, and you also get a light grasp of the ideas in the various lines even in the same defence. While the notations I feel are usually lacking in the endgame, in many cases it's nothing more than endless streams of variations with no explaining of the ideas. Which is understandable since complicated endgames can be extremely hard to break down and describe, as Capablanca said, in many cases it can only be learned through practice or a coach.
So what I'm trying to say is, from now on, I will definately direct more study thowards the endgame, mostly since it's the main part of the game I feel benefits the last from master games. Where'as openings and strategy, and to some extent tactical vision is benefited greatly from just going through notated master games.
Short answer: Endgames > openings.
Six-time Dutch champion GM Loek van Wely on opening study:
"With many Dutch youth players, opening knowledge is heavily over-developed. It is better for them to gain more understanding in the middle- and endgame by studying chess books.
This irritates me now and then. They know all kinds of opening variations. It’s as if they are reciting a lesson. And as soon as it’s time to play real chess, they often understand nothing from this opening.
Take the Sveshnikov Sicilian. Even with my rating, I hardly understand it. It would be better for them to study the Dragon or the King’s Indian. They can learn something there. I only started to study openings seriously when I had a 2400 rating."

Having a rock-solid understanding of openings can give you an advantage, but it won't guarantee you a win.
Having a rock-solid understanding of endgames will guarantee you a win if you can get to a won endgame.
Assuming you have a solid understanding of tactics and middlegame, you are more likely to improve your winning chances by studying endgame than you are by studying openings.

Well in my case when I get an opening advantage I usually keep it and make good use of it, so it helps me a lot. Still, I have to concede endgames are more fundamental to one's game, and not knowing at least the basics can lead to disaster.
These are some good reasons and explanations about the endgame over openings, here's why I think the endgame is more important: In the opening, you would tend to memorize exact moves, without thinking, and without knowing what it means; In the endgame, there's more space to use, you can use your pieces in more of a variety. Plus, there's an extra piece in the endgame you can use, the king; in the opening, one of your goals to keep your king safe, which is as far away from the center as possible, in the endgame, it's a powerful piece in which you try to activate it and win the game for you. Playing the endgame gives you a better understanding of the pieces, which will help you in the opening and middlegame.

Look at your last 10 losses objectively. In which phase of the game would you say you "lost" the game in the majority of them ? This will help guide you on which phase you are weaker in and thus which phase you should work on more. This does NOT mean you shouldnt work on the other two phases however.

Speaking of Capablanca, wasn't he the one who said you should study endgames first, so that you know what you're aiming for in the earlier phases of the game?

Really depends on your current and "goal" playing strength and how much "time" you have to invest in chess to begin with. A practical split of the work you put into could be a mix of:
- Studying "all" the endgames people in your current and "next" rating class KNOW COLD. (Silman's new book helps with figure out which ones)
- If you're NOT a Federation-rated expert or titled player, knowing JUST enough about an opening system to get you into an equal middlegame at the very least, no matter what. As you play more, you incrementally update your opening repertoire.
What should one do more? Well it seems logical that "must know" knowledge should precede "good to know" knowledge.
For example, Would you (as an intermediate player) rather invest a weekend learning basic rook and pawn endgames or spend it doing a deep dive into a variation in the Najdorf, assuming all your opponents in the next tournament even bothered to play with(or against) a Sicilian? Given that most players past the intermediate stage tend to run into rook endgames a lot more, the numbers make such endgame knowledge even more of a "must know".
Endgame IS the foundation, since it provides the aim of both opening and middle game. Take, for example, the exchange Lopez where White's entire strategy is based on having a kingside majority with which to create a passed pawn in the endgame, and the many openings where pawn structure is set up with an eye to the endgame.

Playing devil's advocate to many of the "endgame, obviously" answers. I guess one has to acknowledge the differences in "fun factor" that opening study brings about in comparison to endgame theory.
One tends to want to make studying fun (or else, why do it?).
Exploring a new opening with the right books can show you lines where it may be very easy for one player to go horribly wrong ... I am personally guilty of drooling over these at times and thinking "Oh, I have GOT to play this in my next game". This "know the pattern /plan/attacking idea and you're dangerous" habit can be addictive + lazier (and fun) than studying a king and pawn endgame where you STILL have to get off your tail and brute-force calculate multiple moves, regardless of the endgame knowledge you acquired.

"Playing the endgame gives you a better understanding of the pieces, which will help you in the opening and middlegame."
I hear this a lot, but any examples? It never seemed to help me in that way, didn't help with making outposts for my knights, nothing. The endgame mostly helps with the endgame and keeping in mind what kinds of pawn structures etc would be favorable if you are about to transition into an endgame.

Playing devil's advocate to many of the "endgame, obviously" answers. I guess one has to acknowledge the differences in "fun factor" that opening study brings about in comparison to endgame theory.
One tends to want to make studying fun (or else, why do it?).
Exploring a new opening with the right books can show you lines where it may be very easy for one player to go horribly wrong ... I am personally guilty of drooling over these at times and thinking "Oh, I have GOT to play this in my next game". This "know the pattern /plan/attacking idea and you're dangerous" habit can be addictive + lazier (and fun) than studying a king and pawn endgame where you STILL have to get off your tail and brute-force calculate multiple moves, regardless of the endgame knowledge you acquired.
That is so true....

I'd say the middlegame is most important. You are on your own there, no books to guide you, no moves to memorize. The best way to practice the middlegame is to simply play a lot, and analyze one's own games. The middlegame plan should be relevant to the opening one uses, i.e. for King's Indian Defence players the kingside attack will be key, as well as neutralizing white on the queenside. These plans must be practiced over and over in real games, otherwise one may survive the opening and perish soon afterwards.
"Playing the endgame gives you a better understanding of the pieces, which will help you in the opening and middlegame."
I hear this a lot, but any examples? It never seemed to help me in that way, didn't help with making outposts for my knights, nothing. The endgame mostly helps with the endgame and keeping in mind what kinds of pawn structures etc would be favorable if you are about to transition into an endgame.
In the endgame, you rely on one certain piece, the knight for instance. You'll be using that piece a lot, and by doing that you'll get more familiar with what it can do. Instead, would you rather just make the usual developing moves for your pieces, such as Nf3 or Bc4, or make an awkward move like Na3 which gives the knight better potential depending on the circumstances?

Perhaps the endgame could help with that, but I learned the same thing (considering where a piece moves based on its potential) from learning about middlegame plans.

What about endgame theory being immutable? More applicable to chess960 also, if you care like most people don't since chess960 doesn't seem to have made the big splash it maybe should have.
Endgame study seems good for learning to think of pieces in terms of the territory they control or block from the enemy.

"Playing the endgame gives you a better understanding of the pieces, which will help you in the opening and middlegame."
I hear this a lot, but any examples? It never seemed to help me in that way, didn't help with making outposts for my knights, nothing. The endgame mostly helps with the endgame and keeping in mind what kinds of pawn structures etc would be favorable if you are about to transition into an endgame.
My example would be Bruce Pandolfini's little book (literally little...it's a non standard size book, very small, 3x5 inches roughly) of endgame puzzles -- I think it's called Pandolfini's puzzlers. They are all two move endgame puzzles... White to move and win in two... many of the puzzles involve domination of one piece by another. That book did wonders for my ability to see domination themes, and just to see tactics in the endgame in general. Not classic endgame study, to be sure, but quite valuable for endgame-y tactics.

Ok, endgame vs opening, which do you think is more important to study? I think the endgame is much more important, what are your thoughts about it?
All are important. It is a matter of how deep you need to go into each of them, which part, and when. You can go back and forth from opening to middlegame and endgame, or you can do it simultaneously.
In beginner level you may want to study a little about opening (basic principles), a little about endgame (basic checkmates), and more about middlegame (tactics).
In Intermediate level you may want to study a little about opening (basic opening ideas), a little about middlegame (more advanced tactics), and more about endgame (pawn ending, rook ending).
In advanced level you may want to study a little about middlegame (calculation), a little about endgame, and more about opening.
You can do it simultaneously, for example you can learn about specific opening, learn the middlegame structure (and ascociated strategy) of that opening, and learn the typical ending of that particular opening.
Ok, endgame vs opening, which do you think is more important to study? I think the endgame is much more important, what are your thoughts about it?