Well, that is a feature of Yahoo Mail which is simply not possible in the Apple Mail app. Many third party email clients offer other sorting options and features which is one reason why I don't use Apple Mail. Equally Apple Mail has features other email clients don't have such as easy compatibility with other Apple products and some third party extensions like SpamSieve.
You need to choose the one that suits your workflow and personal needs/preferences.
My email client groups mail into Personal, Notifications, Newsletters and Invitations by Today, Yesterday, Last Week ect. That suits me and its cross platform ie. available on my other portable devices.