SELECT g.id, g.title, g.price * b.quantity AS price, i.img, c.color, s.size, b.quantity FROM basket b
JOIN goods g ON g.id = b.goods_id
JOIN images i ON i.goods_id = g.id
JOIN colors c ON c.id = b.color_id
JOIN sizes s ON s.id = b.size_id