Best query advice ever is Janet Reid's Query Shark blog. She has a good template. Keep it professional and short. A query is not a cover letter and not a synopsis. It'll be an email these days, so format is straight forward business.
Generally, get to the point with your book specifics as Janet lists first paragraph. This is a formal business letter. Give a one or two short paragraph description of work (a bit more than a log line) and follow up w your writing credentials. Read Janet's advice if your creds are light.
THE GOAL OF A QUERY IS GET THEM TO ASK FOR PAGES. You don't get into long explanations anywhere, but make it zing. There are definite self-destruct word choices and phrases to avoid. No cute, "How will she save the world?" questions. See Query Shark. Add her via tweet too.
A synopsis is usually an attachment, I assume. Specifically, it is single spaced and present tense. It is and isn't a listing of your plot points. And it needs to 'show' your voice and writing personality style for the work you are submitting. It shows you can be concise and professional. It will show your plot ability and that you can handle a long form work. And keep normal margins. Don't cheat. *smile* And don't hide the ending. You put it all out there.
My fav quote on synopsis was our Neurovore who said, "If I could tell my 400,000 word manuscript in two pages, I would have."
Honestly, if the editor or agent goes ape shit on synopsis ability, s/he and I will never get along anyway. I'd consider them ready for a mental ward. Not all agents ask for them and prefer those 1st 50 pages if they are interested, but here's their world...
Anyone can polish up the 1st 50 or pay someone to do it. A synopsis will show him/her that you can sustain it, understand plot structure, can create 3D characters, employ tension over the whole novel, and make the reader care/invest in your story.
And I don't think you'll sell your novel with either, but you might sell them on you. That's your goal. Aim for perking his/her interest in you..
Best wishes!