The Pharisee compared himself with the tax collector. He fell into the sin of pride, was not justified, and even deteriorated to the point of "holding everyone else in contempt" (Lk 18:9).
Cain compared himself with Abel and became resentful and crestfallen (Gn 4:6). "Cain attacked his brother Abel and killed him" (Gn 4:8), becoming the first murderer.
Aaron and Miriam compared themselves to Moses. "So angry was the Lord against them that when He departed, and the cloud withdrew from the tent, there was Miriam, a snow-white leper!" (Nm 12:9-10)
Saul compared himself to David. "Saul was jealous of David. The next day an evil spirit...came over Saul, and he raged in his house" (1 Sm 18:9-10). Saul tried to kill David, was eventually involved in the occult, and finally committed suicide.
Some religious leaders compared themselves with Jesus. They became so jealous they handed Jesus over to be crucified (Mt 27:18). They took part in the worst murder ever.
The high priest and Sadducees compared themselves with the apostles. They became so jealous they arrested the apostles, threw them into jail, and threatened to kill them (Acts 5:17-18).
Comparing ourselves with others is a "no-win situation." It leads to either pride or jealousy, which in turn leads to self-hatred. If we believe our heavenly Father loves us, we have no need to compare ourselves with others. Through Jesus and in the Spirit, be secure in your Father's love.