You seem to have the right mindset. Taking rejections can get brutal at times and it's good to know when you need to do more work on your query. I suspect queries are among the most important letters we ever write. A few paragraphs to convince someone that they want to read your story and agent it.
What genre are you working in? Have you checked out any query writing sites?