Puis-je combiner ces 2 instructions SQL? En cours d'exécution 2 requêtes. J'essaie de me resserrer un peu.MySQL - Puis-je combiner ces 2 instructions SQL? Combiner JOIN et AVG?
premier:
SELECT * FROM (`cars`)
JOIN `brands` ON `brands`.`br_id` = `cars`.`brand_id`
WHERE `cars`.`id` = '185707'
seconde:
SELECT ROUND(AVG(rating)) as avg_rating
FROM car_ratings WHERE car_id = 185707