Sunan Ibn Majah, Book 1, Hadith 56 (In-Book) ⓘ
It was narrated that 'Abdullah bin 'Amr said: "The Messenger of Allah said: 'Knowledge is based on three things, and anything beyond that is superfluous: a clear Verse, an established Sunnah, or the rulings by which the inheritance is divided fairly.'"
حَدَّثَنَا مُحَمَّدُ بْنُ الْعَلاَءِ الْهَمْدَانِيُّ، حَدَّثَنِي رِشْدِينُ بْنُ سَعْدٍ، وَجَعْفَرُ بْنُ عَوْنٍ، عَنِ ابْنِ أَنْعُمٍ، - هُوَ الإِفْرِيقِيُّ - عَنْ عَبْدِ الرَّحْمَنِ بْنِ رَافِعٍ، عَنْ عَبْدِ اللَّهِ بْنِ عَمْرٍو، قَالَ قَالَ رَسُولُ اللَّهِ ـ صلى الله عليه وسلم ـ " الْعِلْمُ ثَلاَثَةٌ فَمَا وَرَاءَ ذَلِكَ فَهُوَ فَضْلٌ آيَةٌ مُحْكَمَةٌ أَوْ سُنَّةٌ قَائِمَةٌ أَوْ فَرِيضَةٌ عَادِلَةٌ " .
also referenced under: Hadith 54 (Reference) & Volume 1, Book 1, Hadith 54 (DarusSalam)