SELECT name from table WHERE scalar subquery is true – Mysql
How could I convert this: SELECT CONCAT (c.first_name, ' ', c.last_name) AS customer, SUM(CAST(p.amount as float)) AS total_amount FROM customer c INNER JOIN payment p ON c.customer_id=p.customer_id GROUP BY c.customer_id ORDER BY total_amount desc LIMIT 1; Into a subquery that…