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
Which are the male artists?
assistant
SELECT * FROM artist WHERE gender = 'Male';
human
And which of them are from the UK?
assistant
SELECT artist_name FROM artist WHERE country = 'UK' AND gender = 'Male';
human
Okay, and what genre does Michel prefer?
assistant
SELECT preferred_genre FROM artist WHERE artist_name = 'Michel';
human
Alright, and how many male artists who prefer pop are there in the entire world, according to the table?
assistant
SELECT COUNT( * ) FROM artist WHERE preferred_genre = 'pop' AND gender = 'Male';
human
How many female artists prefer pop?
assistant
SELECT COUNT( * ) FROM artist WHERE preferred_genre = "pop" AND gender = "Female" ;