Writing a query to find MAX number in PL/SQL
- by user2461116
I am suppose to Write a query that will display the largest number of movies rented by one member and that member's name. Give the output column a meaningful name such as MAXIMUM NUMBER.
This is what I have.
select max(maximum_movies)
from (select count(*)maximum_movies
from mm_member join mm_rental on
mm_rental.member_id = mm_member.member_id
group by first, last);
I got the maximum number but the output should be like this.
First Last Maximum_movies
John Doe 4
But the output is
Maximum_movies
4
Any suggestions?