CREATE TABLE genre (
    g_name TEXT PRIMARY KEY,
    rating TEXT,
    most_popular_in TEXT
);
CREATE TABLE artist (
    artist_name TEXT PRIMARY KEY,
    country TEXT,
    gender TEXT,
    preferred_genre TEXT,
    FOREIGN KEY ("preferred_genre") REFERENCES genre("g_name")
);
CREATE TABLE files (
    f_id NUMBER PRIMARY KEY,
    artist_name TEXT,
    file_size TEXT,
    duration TEXT,
    formats TEXT,
    FOREIGN KEY ("artist_name") REFERENCES artist("artist_name")
);
CREATE TABLE song (
    song_name TEXT PRIMARY KEY,
    artist_name TEXT,
    country TEXT,
    f_id NUMBER,
    genre_is TEXT,
    rating NUMBER,
    languages TEXT,
    releasedate TIME,
    resolution NUMBER,
    FOREIGN KEY ("genre_is") REFERENCES genre("g_name"),
    FOREIGN KEY ("f_id") REFERENCES files("f_id"),
    FOREIGN KEY ("artist_name") REFERENCES artist("artist_name")
);

Question: Find the distinct names of all songs that have a higher resolution than some songs in English.
SQL: SELECT DISTINCT song_name FROM song WHERE resolution  >  (SELECT min(resolution) FROM song WHERE languages  =  "english")

Question: What are the different names for all songs that have a higher resolution than English songs?
SQL: SELECT DISTINCT song_name FROM song WHERE resolution  >  (SELECT min(resolution) FROM song WHERE languages  =  "english")

Question: What are the names of all songs that have a lower rating than some song of blues genre?
SQL: SELECT song_name FROM song WHERE rating  <  (SELECT max(rating) FROM song WHERE genre_is  =  "blues")

Question: What are the names of the songs that have a lower rating than at least one blues song?
SQL: SELECT song_name FROM song WHERE rating  <  (SELECT max(rating) FROM song WHERE genre_is  =  "blues")

Question: What is the name and country of origin of the artist who released a song that has "love" in its title?
SQL: SELECT T1.artist_name ,  T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name  =  T2.artist_name WHERE T2.song_name LIKE "%love%"

Question: What are the names of the artists who released a song that has the word love in its title, and where are the artists from?
SQL: SELECT T1.artist_name ,  T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name  =  T2.artist_name WHERE T2.song_name LIKE "%love%"

Question: List the name and gender for all artists who released songs in March.
SQL: SELECT T1.artist_name ,  T1.gender FROM artist AS T1 JOIN song AS T2 ON T1.artist_name  =  T2.artist_name WHERE T2.releasedate LIKE "%Mar%"

Question: What are the names and genders of all artists who released songs in the month of March?
SQL: SELECT T1.artist_name ,  T1.gender FROM artist AS T1 JOIN song AS T2 ON T1.artist_name  =  T2.artist_name WHERE T2.releasedate LIKE "%Mar%"

Question: List the names of all genres in alphabetical oder, together with its ratings.
SQL: SELECT g_name ,  rating FROM genre ORDER BY g_name

Question: What are the names of all genres in alphabetical order, combined with its ratings?
SQL: SELECT g_name ,  rating FROM genre ORDER BY g_name

Question: Give me a list of the names of all songs ordered by their resolution.
SQL: SELECT song_name FROM song ORDER BY resolution

Question: What are the names of all songs that are ordered by their resolution numbers?
SQL: SELECT song_name FROM song ORDER BY resolution

Question: What are the ids of songs that are available in either mp4 format or have resolution above 720?
SQL: SELECT f_id FROM files WHERE formats  =  "mp4" UNION SELECT f_id FROM song WHERE resolution  >  720

Question: What are the ids of all songs that are available on mp4 or have a higher resolution than 720?
SQL: SELECT f_id FROM files WHERE formats  =  "mp4" UNION SELECT f_id FROM song WHERE resolution  >  720

Question: List the names of all songs that have 4 minute duration or are in English.
SQL: SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id  =  T2.f_id WHERE T1.duration LIKE "4:%" UNION SELECT song_name FROM song WHERE languages  =  "english"

Question: What are the names of all songs that are approximately 4 minutes long or are in English?
SQL: SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id  =  T2.f_id WHERE T1.duration LIKE "4:%" UNION SELECT song_name FROM song WHERE languages  =  "english"

Question: What is the language used most often in the songs?
SQL: SELECT languages FROM song GROUP BY languages ORDER BY count(*) DESC LIMIT 1

Question: What are the languages that are used most often in songs?
SQL: SELECT languages FROM song GROUP BY languages ORDER BY count(*) DESC LIMIT 1

Question: What is the language that was used most often in songs with resolution above 500?
SQL: SELECT artist_name FROM song WHERE resolution  >  500 GROUP BY languages ORDER BY count(*) DESC LIMIT 1

Question: What is the name of the artist, for each language, that has the most songs with a higher resolution than 500?
SQL: SELECT artist_name FROM song WHERE resolution  >  500 GROUP BY languages ORDER BY count(*) DESC LIMIT 1

Question: What are the names of artists who are Male and are from UK?
SQL: SELECT artist_name FROM artist WHERE country  =  "UK" AND gender  =  "Male"

Question: What are the names of all male British artists?
SQL: SELECT artist_name FROM artist WHERE country  =  "UK" AND gender  =  "Male"

Question: Find the names of songs whose genre is modern or language is English.
SQL: SELECT song_name FROM song WHERE genre_is  =  "modern" OR languages  =  "english"

Question: What are the names of the songs that are modern or sung in English?
SQL: SELECT song_name FROM song WHERE genre_is  =  "modern" OR languages  =  "english"

Question: Return the names of songs for which format is mp3 and resolution is below 1000.
SQL: SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id  =  T2.f_id WHERE T1.formats  =  "mp3" INTERSECT SELECT song_name FROM song WHERE resolution  <  1000

Question: What are the names of all songs that are in mp3 format and have a resolution lower than 1000?
SQL: SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id  =  T2.f_id WHERE T1.formats  =  "mp3" INTERSECT SELECT song_name FROM song WHERE resolution  <  1000

Question: Return the names of singers who are from UK and released an English song.
SQL: SELECT artist_name FROM artist WHERE country  =  "UK" INTERSECT SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name  =  T2.artist_name WHERE T2.languages  =  "english"

Question: What are the names of all singers that are from the UK and released a song in English?
SQL: SELECT artist_name FROM artist WHERE country  =  "UK" INTERSECT SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name  =  T2.artist_name WHERE T2.languages  =  "english"

Question: What are the average rating and resolution of songs that are in Bangla?
SQL: SELECT avg(rating) ,  avg(resolution) FROM song WHERE languages  =  "bangla"

Question: What is the average rating and resolution of all bangla songs?
SQL: SELECT avg(rating) ,  avg(resolution) FROM song WHERE languages  =  "bangla"

Question: What are the maximum and minimum resolution of songs whose duration is 3 minutes?
SQL: SELECT max(T2.resolution) ,  min(T2.resolution) FROM files AS T1 JOIN song AS T2 ON T1.f_id  =  T2.f_id WHERE T1.duration LIKE "3:%"

Question: What is the maximum and minimum resolution of all songs that are approximately 3 minutes long?
SQL: SELECT max(T2.resolution) ,  min(T2.resolution) FROM files AS T1 JOIN song AS T2 ON T1.f_id  =  T2.f_id WHERE T1.duration LIKE "3:%"

Question: What are the maximum duration and resolution of songs grouped and ordered by languages?
SQL: SELECT max(T1.duration) ,  max(T2.resolution) ,  T2.languages FROM files AS T1 JOIN song AS T2 ON T1.f_id  =  T2.f_id GROUP BY T2.languages ORDER BY T2.languages