Magento has filterable condition which help to sort out the result.Let Look How it works
addAttributeToFilter is a function that can be called on a product collection in Magento. it adds a condition to the WHERE part of the MySQL query used to extract a product collection from the database
addAttributeToFilter is a function that can be called on a product collection in Magento. it adds a condition to the WHERE part of the MySQL query used to extract a product collection from the database