programming-examples/sql/View/9. Write a query to create a view that shows all of the customers who have the highest grade.sql

7 lines
227 B
MySQL
Raw Permalink Normal View History

2019-11-18 14:05:53 +01:00
/*9. Write a query to create a view that shows all of the customers who have the highest grade.*/
CREATE VIEW highgrade
AS SELECT *
FROM customer
WHERE grade =
(SELECT MAX (grade)
FROM customer);