We gave (in the past) knowledge to David and Solomon: And they both said: "Praise be to Allah, Who has favoured us above many of his servants who believe!"
وَلَقَدْ آتَیْنَا دَاوُودَ وَسُلَیْمَانَ عِلْمَ وَقَالَ لْحَمْدُ لِلَّاهِ لَّذِی فَدَّلَنَا عَلَا کَثِیرِ مِّنْ عِبَادِهِ لْمُؤْمِنِینْ
(And We verily gave knowledge) and understanding through prophethood and judgeship (unto David) the son of Jesse (and Solomon) the son of David, (and they said) both of them: (Praise be to Allah) thanks and gratitude to Allah, (Who hath preferred us) through knowledge and prophethood (above many of His believing slaves!