There are a few different things to keep in mind when writing a query letter:
-open with a hook
-give the facts (word count, genre, novel title)
-sell yourself as the author (credentials, followers, events, and how you promote yourself and your book)
-saying thank you
-and pasting chapters of your novel ONLY if requested
-and your contact info!
See my old video on query letters here: https://www.youtube.com/watch?v=XdoJFobZ4mk
And how to find agents: http://www.agentquery.com/