select all the highest money making movies from each studio IN mysql TABLE -


i have table has studio, title, , worldwide column in mysql table. want select highest money making movies each studio. how can achieve this? please me. thank you

edit

i have following code doesn't work properly

select studio, max(cast(worldwide int)* 1000000), title top_movies group studio; 

select studio_name, movie_name, total_money top_movies  join      (       select studio, max(total_money) tmoney       top_movies        group studio     ) b    on top_movies.studio = b.studio   , top_movies.total_money = b.tmoney 

Comments

Post a Comment

Popular posts from this blog

gridview - Yii2 DataPorivider $totalSum for a column -

java - Suppress Jboss version details from HTTP error response -

Sass watch command compiles .scss files before full sftp upload -