Surah Al-Anbya 21:79
فَفَهَّمْنَـٰهَا سُلَيْمَـٰنَ ۚ وَكُلًّا ءَاتَيْنَا حُكْمًا وَعِلْمًا ۚ وَسَخَّرْنَا مَعَ دَاوُۥدَ ٱلْجِبَالَ يُسَبِّحْنَ وَٱلطَّيْرَ ۚ وَكُنَّا فَـٰعِلِينَ
And We gave understanding of it [i.e., the case] to Solomon, and to each [of them] We gave judgement and knowledge. And We subjected the mountains to exalt [Us], along with David and [also] the birds. And We were doing [that].
Translation: Saheeh International
Tafsir
And We gave understanding of this that is the judgement to Solomon. It is said that both of their decisions were the result of independent judgement exercised by both and that David consulted Solomon; …
Excerpt from Tafsir al-Jalalayn, commentary on 21:79, via Quran.com. The reader has the full commentary and 9 more tafsirs.