Writing a query to find MAX number in PL/SQL
Posted
by
user2461116
on Stack Overflow
See other posts from Stack Overflow
or by user2461116
Published on 2013-11-04T03:50:58Z
Indexed on
2013/11/04
3:53 UTC
Read the original article
Hit count: 240
plsql
|plsqldeveloper
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?
© Stack Overflow or respective owner