You've probably heard people say that you can't compare yourself to other writers. In truth, you can. But you shouldn't. Why? Think about this. Your book comes out and you watch your release day sales. Your rank is good and you even make some best seller lists on Amazon. Great, right? Yes. But then you go to that place. The one where you wonder how So-and-so's book did on it's release day, which happens to be the same day as yours. Don't check! Seriously, don't.
Writer envy is never good. Writers should support each other, and we should also celebrate our own successes, no matter how they compare to others. Who cares if So-and-so's book did better out of the gate? Good for So-and-so. You aren't them. Your journey will be your own. Congratulate So-and-so and then be happy that people are reading your book.
The same goes for when you're querying. We all see other writers get agents and wonder when it will happen for us. Don't compare the number of rejections you've gotten. Don't think about how many months you've been querying compared to your friend. Be happy for other writers and keep pushing forward with your own work.
How do you avoid writer envy and/or the urge to compare yourself to others?