Knowing how to write a query is a little bit like grammar. There's a right way and a wrong way of doing things, and the trick is to know when the wrong way is the right way.
As a novelist, I can guarantee you've written fragments. Now the grammar rule is that a fragment is a big no-no. However, fragments may be the best way of writing in a specific situation. As a novelist, you know when you can get away with breaking the rule and making a fragment work for you.
If there is a 'rule' about endings in query letters, then the rule would be don't include it. Save it for the synopsis. But, there are times when you want to either break the rule or bend it a bit. The trick is thinking through what the effect is and what you're trying to accomplish.
Now, for most books, the ending is fairly obvious. We might not know the details, but we pretty much know where your book is going. For example, when was the last time you read a mystery where there isn't a solution to the murder? Now I know when I start a mystery, there will be a solution. I will not be left hanging out there with no solution.
If I was pitching or querying a murder, I'd never reveal the ending. An agent or editor knows I'll have an ending where the murderer will be found and all will be made right with the world. If I don't, you know how fast the agent or editor is going to hit the reject button (and I'd probably be well advised never to contact that agent or editor ever again).
Some books, however, don't have an obvious answer. Either the twist is so bizarre that the general concept of the ending is going to cause readers problem (the murder where the murderer is never found) or the plot of the book presents some issues.
The next book of mine I'll be querying is The Next Step. The protagonist in this book is an 87-year-old widower with Alzheimer's, cancer, and thinking of suicide and what is the best way to die. Because the book is entirely about this dilemma, I decided that showing an agent that I had an ending was important, so my query has the ending.
Best of luck,
Jim Clark-Dawe