human
Schema:
genre (g_name, rating, most_popular_in)
artist (artist_name, country, gender, preferred_genre)
files (f_id, artist_name, file_size, duration, formats)
song (song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution)
Please answer with SQL.
assistant
Sure, I understand.
human
What are the minimum, maximum and average values of the ratings?
assistant
SELECT MIN( rating ) , MAX( rating ) , AVG ( rating ) FROM song;
human
Which songs have a higher rating than the average, list the song names.
assistant
SELECT song_name FROM song WHERE rating > ( SELECT AVG ( rating ) FROM song ) ;