This is a nice part of code that allows Microsoft Outlook to filter based on unread and flagged emails. On the view settings, on the “Filter” menu, SQL tab, just paste the code below.
("urn:schemas:httpmail:read" = 0) OR ("http://schemas.microsoft.com/mapi/proptag/0x10900003" > 1)
Then save the custom view as a new view so as to be selected easily next time you want to use it.