The Pharisees heard that the Sadducees weren't able to answer Jesus. So the Pharisees got together.
References for Matthew 22:34
One of them was an authority on the law. So he tested Jesus with a question.
"Teacher," he asked, "which is the most important commandment in the Law?"
Jesus replied, " 'Love the Lord your God with all your heart and with all your soul. Love him with all your mind.'(Deuteronomy 6:5)
This is the first and most important commandment.
And the second is like it. 'Love your neighbor as you love yourself.'(Leviticus 19:18)
Everything that is written in the Law and the Prophets is based on these two commandments."