drop database if exists activity6_1;
create database if not exists activity6_1;
use activity6_1;

CREATE TABLE rec_artists (
	artistID INT(5) primary key not null,
	artist CHAR(75)
);

insert into rec_artists 
	(artistID, artist)
values
	(1, "Mary J Blige"),
	(2, "Flo Rida"),
	(3, "Timbaland"),
	(4, "Alicia Keys"),
	(5, "Fergie"),
	(6, "Finger Eleven");


CREATE TABLE songs (
	songID INT(5) primary key,
	songname CHAR(50),
	artistID CHAR(2),
	label CHAR(35),
	weeks_on_chart int(3)
);

insert into songs 
	(songID, songname, artistID, label, weeks_on_chart)
values
	(1, "Low", 2, "Def Jam", 6), 
	(2, "Work That", 1, "Geffen", 1),
	(3, "Apologize", 3, "Avatar", 5),
	(4, "Just Fine", 1, "Geffen", 3),
	(5, "Paralyzer", 6, "Beathut", 12),
	(6, "No One", 4, "Beathut", 2),
	(7, "Work in Progress", 1, "Geffen", 2),
	(8, "Clumsy", 5, "Machete", 8);


##############################################################
select * from rec_artists;
select * from songs;
##############################################################
# Use one SELECT query for each of the following:
#1 Show only the artists' names from the rec_artists table.
SELECT("Number 1");


#2 Show only the song names and ids from the songs table.
SELECT("Number 2");


#3 Show only the song names of songs by artist #1.
SELECT("Number 3");


#4 Show only the number of weeks on the chart, divided in half, for each record.
SELECT("Number 4");


#5 Show entire rows, but only those whose artists' names begin with the letter "F".
SELECT("Number 5");


#6 Show only the artists' names in alphabetical order.
SELECT("Number 6");


#7 Show a list of all the labels, but each only once.
SELECT("Number 7");


#8 Show only the first 3 song names. Do not use a WHERE clause.
SELECT("Number 8");


#9 Show only the song names of artist # 1's songs that were on the charts less than 3 weeks.
SELECT("Number 9");


#10 Show all the song names beside the name of the artist who recorded each.
SELECT("Number 10");



