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."
The Saheeh International Quran Translation
وَلَقَدْ ءَاتَيْنَا دَاوُۥدَ وَسُلَيْمَٰنَ عِلْمًا وَقَالَا ٱلْحَمْدُ لِلَّهِ ٱلَّذِى فَضَّلَنَا عَلَىٰ كَثِيرٍ مِّنْ عِبَادِهِ ٱلْمُؤْمِنِينَ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."