Surah An-Naml 27:15
وَلَقَدْ ءَاتَيْنَا دَاوُۥدَ وَسُلَيْمَـٰنَ عِلْمًا ۖ وَقَالَا ٱلْحَمْدُ لِلَّهِ ٱلَّذِى فَضَّلَنَا عَلَىٰ كَثِيرٍ مِّنْ عِبَادِهِ ٱلْمُؤْمِنِينَ
And We had certainly given to David and Solomon knowledge, and they said, "Praise [is due] to Allāh, who has favored us over many of His believing servants."
Translation: Saheeh International
Tafsir
And verily We gave David and Solomon his son knowledge of rendering decisive judgement between people and knowledge of the speech of birds and of other things and they said giving thanks to God ‘Praise be to God Who has favoured us with prophethood and the disposal of jinn humans and devils to our service over many of …
Excerpt from Tafsir al-Jalalayn, commentary on 27:15, via Quran.com. The reader has the full commentary and 9 more tafsirs.