Surah An-Naml

27:15

وَلَقَدْ ءَاتَيْنَا دَاوُۥدَ وَسُلَيْمَٰنَ عِلْمًۭا ۖ وَقَالَا ٱلْحَمْدُ لِلَّهِ ٱلَّذِى فَضَّلَنَا عَلَىٰ كَثِيرٍۢ مِّنْ عِبَادِهِ ٱلْمُؤْمِنِينَ

And We had certainly given to David and Solomon knowledge, and they said, "Praise [is due] to Allah, who has favored us over many of His believing servants."

Tafsir 27:15

I granted David and his son Solomon knowledge, part of which was the language of birds. David and Solomon said, in gratitude to Allah: “All praise is for Allah who has given us virtue over many of his believing servants, through prophethood and subjugating the jinns”.