SELECT cbp.`ISBN10` as `ISBN`, (SELECT AVG(Price) as price FROM cbpricing AS cba WHERE cba.`ISBN10` = cbp.`ISBN10` AND cba.MerchantName = 'Amazon Marketplace' AND cba.SellerRating >= 4.3 AND cba.RatingCount >= 1000 ORDER BY cba.Price ASC LIMIT 12) * .6 as `NewDataPrice`, (SELECT rent_price FROM biblio.base b LEFT JOIN biblio.inventory inv ON inv.book_id = b.id LEFT JOIN biblio.inventory_rentals invr ON invr.inventory_id = inv.id WHERE b.isbn = cbp.`ISBN10` ORDER BY invr.rent_date DESC LIMIT 1) as LastRentalPrice, LastRentalPrice > NewDataPrice AS LostMoney FROM cbpricing AS cbp GROUP BY cbp.`ISBN10`;