Improved deals query for the index page. Added notes with explanation on the solution