
CREATE TABLE "Album" (
	"AlbumId" INTEGER NOT NULL, 
	"Title" VARCHAR(160) NOT NULL, 
	"ArtistId" INTEGER NOT NULL, 
	PRIMARY KEY ("AlbumId"), 
	FOREIGN KEY("ArtistId") REFERENCES "Artist" ("ArtistId")
)


CREATE TABLE "Artist" (
	"ArtistId" INTEGER NOT NULL, 
	"Name" VARCHAR(120) DEFAULT NULL, 
	PRIMARY KEY ("ArtistId")
)


CREATE TABLE "Customer" (
	"CustomerId" INTEGER NOT NULL, 
	"FirstName" VARCHAR(40) NOT NULL, 
	"LastName" VARCHAR(20) NOT NULL, 
	"Company" VARCHAR(80) DEFAULT NULL, 
	"Address" VARCHAR(70) DEFAULT NULL, 
	"City" VARCHAR(40) DEFAULT NULL, 
	"State" VARCHAR(40) DEFAULT NULL, 
	"Country" VARCHAR(40) DEFAULT NULL, 
	"PostalCode" VARCHAR(10) DEFAULT NULL, 
	"Phone" VARCHAR(24) DEFAULT NULL, 
	"Fax" VARCHAR(24) DEFAULT NULL, 
	"Email" VARCHAR(60) NOT NULL, 
	"SupportRepId" INTEGER DEFAULT NULL, 
	PRIMARY KEY ("CustomerId"), 
	FOREIGN KEY("SupportRepId") REFERENCES "Employee" ("EmployeeId")
)


CREATE TABLE "Employee" (
	"EmployeeId" INTEGER NOT NULL, 
	"LastName" VARCHAR(20) NOT NULL, 
	"FirstName" VARCHAR(20) NOT NULL, 
	"Title" VARCHAR(30) DEFAULT NULL, 
	"ReportsTo" INTEGER DEFAULT NULL, 
	"BirthDate" DATETIME DEFAULT NULL, 
	"HireDate" DATETIME DEFAULT NULL, 
	"Address" VARCHAR(70) DEFAULT NULL, 
	"City" VARCHAR(40) DEFAULT NULL, 
	"State" VARCHAR(40) DEFAULT NULL, 
	"Country" VARCHAR(40) DEFAULT NULL, 
	"PostalCode" VARCHAR(10) DEFAULT NULL, 
	"Phone" VARCHAR(24) DEFAULT NULL, 
	"Fax" VARCHAR(24) DEFAULT NULL, 
	"Email" VARCHAR(60) DEFAULT NULL, 
	PRIMARY KEY ("EmployeeId"), 
	FOREIGN KEY("ReportsTo") REFERENCES "Employee" ("EmployeeId")
)


CREATE TABLE "Genre" (
	"GenreId" INTEGER NOT NULL, 
	"Name" VARCHAR(120) DEFAULT NULL, 
	PRIMARY KEY ("GenreId")
)


CREATE TABLE "Invoice" (
	"InvoiceId" INTEGER NOT NULL, 
	"CustomerId" INTEGER NOT NULL, 
	"InvoiceDate" DATETIME NOT NULL, 
	"BillingAddress" VARCHAR(70) DEFAULT NULL, 
	"BillingCity" VARCHAR(40) DEFAULT NULL, 
	"BillingState" VARCHAR(40) DEFAULT NULL, 
	"BillingCountry" VARCHAR(40) DEFAULT NULL, 
	"BillingPostalCode" VARCHAR(10) DEFAULT NULL, 
	"Total" DECIMAL(10, 2) NOT NULL, 
	PRIMARY KEY ("InvoiceId"), 
	FOREIGN KEY("CustomerId") REFERENCES "Customer" ("CustomerId")
)


CREATE TABLE "InvoiceLine" (
	"InvoiceLineId" INTEGER NOT NULL, 
	"InvoiceId" INTEGER NOT NULL, 
	"TrackId" INTEGER NOT NULL, 
	"UnitPrice" DECIMAL(10, 2) NOT NULL, 
	"Quantity" INTEGER NOT NULL, 
	PRIMARY KEY ("InvoiceLineId"), 
	FOREIGN KEY("TrackId") REFERENCES "Track" ("TrackId"), 
	FOREIGN KEY("InvoiceId") REFERENCES "Invoice" ("InvoiceId")
)


CREATE TABLE "MediaType" (
	"MediaTypeId" INTEGER NOT NULL, 
	"Name" VARCHAR(120) DEFAULT NULL, 
	PRIMARY KEY ("MediaTypeId")
)


CREATE TABLE "Playlist" (
	"PlaylistId" INTEGER NOT NULL, 
	"Name" VARCHAR(120) DEFAULT NULL, 
	PRIMARY KEY ("PlaylistId")
)


CREATE TABLE "PlaylistTrack" (
	"PlaylistId" INTEGER NOT NULL, 
	"TrackId" INTEGER NOT NULL, 
	PRIMARY KEY ("PlaylistId", "TrackId"), 
	FOREIGN KEY("TrackId") REFERENCES "Track" ("TrackId"), 
	FOREIGN KEY("PlaylistId") REFERENCES "Playlist" ("PlaylistId")
)


CREATE TABLE "Track" (
	"TrackId" INTEGER NOT NULL, 
	"Name" VARCHAR(200) NOT NULL, 
	"AlbumId" INTEGER DEFAULT NULL, 
	"MediaTypeId" INTEGER NOT NULL, 
	"GenreId" INTEGER DEFAULT NULL, 
	"Composer" VARCHAR(220) DEFAULT NULL, 
	"Milliseconds" INTEGER NOT NULL, 
	"Bytes" INTEGER DEFAULT NULL, 
	"UnitPrice" DECIMAL(10, 2) NOT NULL, 
	PRIMARY KEY ("TrackId"), 
	FOREIGN KEY("MediaTypeId") REFERENCES "MediaType" ("MediaTypeId"), 
	FOREIGN KEY("GenreId") REFERENCES "Genre" ("GenreId"), 
	FOREIGN KEY("AlbumId") REFERENCES "Album" ("AlbumId")
)

CREATE TABLE "Album" (
	"AlbumId" INTEGER NOT NULL, 
	"Title" VARCHAR(160) NOT NULL, 
	"ArtistId" INTEGER NOT NULL, 
	PRIMARY KEY ("AlbumId"), 
	FOREIGN KEY("ArtistId") REFERENCES "Artist" ("ArtistId")
)

/*
2 rows from Album table:
AlbumId	Title	ArtistId
1	For Those About To Rock We Salute You	1
2	Balls to the Wall	2
*/


CREATE TABLE "Artist" (
	"ArtistId" INTEGER NOT NULL, 
	"Name" VARCHAR(120) DEFAULT NULL, 
	PRIMARY KEY ("ArtistId")
)

/*
2 rows from Artist table:
ArtistId	Name
1	AC/DC
2	Accept
*/


CREATE TABLE "Customer" (
	"CustomerId" INTEGER NOT NULL, 
	"FirstName" VARCHAR(40) NOT NULL, 
	"LastName" VARCHAR(20) NOT NULL, 
	"Company" VARCHAR(80) DEFAULT NULL, 
	"Address" VARCHAR(70) DEFAULT NULL, 
	"City" VARCHAR(40) DEFAULT NULL, 
	"State" VARCHAR(40) DEFAULT NULL, 
	"Country" VARCHAR(40) DEFAULT NULL, 
	"PostalCode" VARCHAR(10) DEFAULT NULL, 
	"Phone" VARCHAR(24) DEFAULT NULL, 
	"Fax" VARCHAR(24) DEFAULT NULL, 
	"Email" VARCHAR(60) NOT NULL, 
	"SupportRepId" INTEGER DEFAULT NULL, 
	PRIMARY KEY ("CustomerId"), 
	FOREIGN KEY("SupportRepId") REFERENCES "Employee" ("EmployeeId")
)

/*
2 rows from Customer table:
CustomerId	FirstName	LastName	Company	Address	City	State	Country	PostalCode	Phone	Fax	Email	SupportRepId
1	Luís	Gonçalves	Embraer - Empresa Brasileira de Aeronáutica S.A.	Av. Brigadeiro Faria Lima, 2170	São José dos Campos	SP	Brazil	12227-000	+55 (12) 3923-5555	+55 (12) 3923-5566	luisg@embraer.com.br	3
2	Leonie	Köhler	None	Theodor-Heuss-Straße 34	Stuttgart	None	Germany	70174	+49 0711 2842222	None	leonekohler@surfeu.de	5
*/


CREATE TABLE "Employee" (
	"EmployeeId" INTEGER NOT NULL, 
	"LastName" VARCHAR(20) NOT NULL, 
	"FirstName" VARCHAR(20) NOT NULL, 
	"Title" VARCHAR(30) DEFAULT NULL, 
	"ReportsTo" INTEGER DEFAULT NULL, 
	"BirthDate" DATETIME DEFAULT NULL, 
	"HireDate" DATETIME DEFAULT NULL, 
	"Address" VARCHAR(70) DEFAULT NULL, 
	"City" VARCHAR(40) DEFAULT NULL, 
	"State" VARCHAR(40) DEFAULT NULL, 
	"Country" VARCHAR(40) DEFAULT NULL, 
	"PostalCode" VARCHAR(10) DEFAULT NULL, 
	"Phone" VARCHAR(24) DEFAULT NULL, 
	"Fax" VARCHAR(24) DEFAULT NULL, 
	"Email" VARCHAR(60) DEFAULT NULL, 
	PRIMARY KEY ("EmployeeId"), 
	FOREIGN KEY("ReportsTo") REFERENCES "Employee" ("EmployeeId")
)

/*
2 rows from Employee table:
EmployeeId	LastName	FirstName	Title	ReportsTo	BirthDate	HireDate	Address	City	State	Country	PostalCode	Phone	Fax	Email
1	Adams	Andrew	General Manager	None	1962-02-18 00:00:00	2002-08-14 00:00:00	11120 Jasper Ave NW	Edmonton	AB	Canada	T5K 2N1	+1 (780) 428-9482	+1 (780) 428-3457	andrew@chinookcorp.com
2	Edwards	Nancy	Sales Manager	1	1958-12-08 00:00:00	2002-05-01 00:00:00	825 8 Ave SW	Calgary	AB	Canada	T2P 2T3	+1 (403) 262-3443	+1 (403) 262-3322	nancy@chinookcorp.com
*/


CREATE TABLE "Genre" (
	"GenreId" INTEGER NOT NULL, 
	"Name" VARCHAR(120) DEFAULT NULL, 
	PRIMARY KEY ("GenreId")
)

/*
2 rows from Genre table:
GenreId	Name
1	Rock
2	Jazz
*/


CREATE TABLE "Invoice" (
	"InvoiceId" INTEGER NOT NULL, 
	"CustomerId" INTEGER NOT NULL, 
	"InvoiceDate" DATETIME NOT NULL, 
	"BillingAddress" VARCHAR(70) DEFAULT NULL, 
	"BillingCity" VARCHAR(40) DEFAULT NULL, 
	"BillingState" VARCHAR(40) DEFAULT NULL, 
	"BillingCountry" VARCHAR(40) DEFAULT NULL, 
	"BillingPostalCode" VARCHAR(10) DEFAULT NULL, 
	"Total" DECIMAL(10, 2) NOT NULL, 
	PRIMARY KEY ("InvoiceId"), 
	FOREIGN KEY("CustomerId") REFERENCES "Customer" ("CustomerId")
)

/*
2 rows from Invoice table:
InvoiceId	CustomerId	InvoiceDate	BillingAddress	BillingCity	BillingState	BillingCountry	BillingPostalCode	Total
1	2	2009-01-01 00:00:00	Theodor-Heuss-Straße 34	Stuttgart	None	Germany	70174	1.98
2	4	2009-01-02 00:00:00	Ullevålsveien 14	Oslo	None	Norway	0171	3.96
*/


CREATE TABLE "InvoiceLine" (
	"InvoiceLineId" INTEGER NOT NULL, 
	"InvoiceId" INTEGER NOT NULL, 
	"TrackId" INTEGER NOT NULL, 
	"UnitPrice" DECIMAL(10, 2) NOT NULL, 
	"Quantity" INTEGER NOT NULL, 
	PRIMARY KEY ("InvoiceLineId"), 
	FOREIGN KEY("TrackId") REFERENCES "Track" ("TrackId"), 
	FOREIGN KEY("InvoiceId") REFERENCES "Invoice" ("InvoiceId")
)

/*
2 rows from InvoiceLine table:
InvoiceLineId	InvoiceId	TrackId	UnitPrice	Quantity
1	1	2	0.99	1
2	1	4	0.99	1
*/


CREATE TABLE "MediaType" (
	"MediaTypeId" INTEGER NOT NULL, 
	"Name" VARCHAR(120) DEFAULT NULL, 
	PRIMARY KEY ("MediaTypeId")
)

/*
2 rows from MediaType table:
MediaTypeId	Name
1	MPEG audio file
2	Protected AAC audio file
*/


CREATE TABLE "Playlist" (
	"PlaylistId" INTEGER NOT NULL, 
	"Name" VARCHAR(120) DEFAULT NULL, 
	PRIMARY KEY ("PlaylistId")
)

/*
2 rows from Playlist table:
PlaylistId	Name
1	Music
2	Movies
*/


CREATE TABLE "PlaylistTrack" (
	"PlaylistId" INTEGER NOT NULL, 
	"TrackId" INTEGER NOT NULL, 
	PRIMARY KEY ("PlaylistId", "TrackId"), 
	FOREIGN KEY("TrackId") REFERENCES "Track" ("TrackId"), 
	FOREIGN KEY("PlaylistId") REFERENCES "Playlist" ("PlaylistId")
)

/*
2 rows from PlaylistTrack table:
PlaylistId	TrackId
1	1
8	1
*/


CREATE TABLE "Track" (
	"TrackId" INTEGER NOT NULL, 
	"Name" VARCHAR(200) NOT NULL, 
	"AlbumId" INTEGER DEFAULT NULL, 
	"MediaTypeId" INTEGER NOT NULL, 
	"GenreId" INTEGER DEFAULT NULL, 
	"Composer" VARCHAR(220) DEFAULT NULL, 
	"Milliseconds" INTEGER NOT NULL, 
	"Bytes" INTEGER DEFAULT NULL, 
	"UnitPrice" DECIMAL(10, 2) NOT NULL, 
	PRIMARY KEY ("TrackId"), 
	FOREIGN KEY("MediaTypeId") REFERENCES "MediaType" ("MediaTypeId"), 
	FOREIGN KEY("GenreId") REFERENCES "Genre" ("GenreId"), 
	FOREIGN KEY("AlbumId") REFERENCES "Album" ("AlbumId")
)

/*
2 rows from Track table:
TrackId	Name	AlbumId	MediaTypeId	GenreId	Composer	Milliseconds	Bytes	UnitPrice
1	For Those About To Rock (We Salute You)	1	1	1	Angus Young, Malcolm Young, Brian Johnson	343719	11170334	0.99
2	Balls to the Wall	2	2	1	None	342562	5510424	0.99
*/
Find the names of all the tracks that contain the word "you".
SELECT Name FROM TRACK WHERE Name LIKE '%you%'
[{'Name': 'For Those About To Rock (We Salute You)'}, {'Name': 'Put The Finger On You'}, {'Name': 'You Oughta Know'}, {'Name': 'Right Through You'}, {'Name': 'You Learn'}, {'Name': 'You Oughta Know (Alternate)'}, {'Name': 'We Die Young'}, {'Name': 'Put You Down'}, {'Name': 'I Know Somethin (Bout You)'}, {'Name': 'What You Are'}, {'Name': 'Your Time Has Come'}, {'Name': 'Be Yourself'}, {'Name': 'All For You'}, {'Name': 'Let Me Love You Baby'}, {'Name': 'Keep It To Myself (Aka Keep It To Yourself)'}, {'Name': 'You Shook Me'}, {'Name': "I Can't Quit You Baby"}, {'Name': "I Can't Quit You Baby(2)"}, {'Name': 'You Shook Me(2)'}, {'Name': 'Do You Love Me'}, {'Name': 'I Was Made For Loving You'}, {'Name': "God Gave Rock 'n' Roll To You"}, {'Name': 'Good Riddance (Time Of Your Life)'}, {'Name': "Don't You Cry"}, {'Name': 'Wherever You May Go'}, {'Name': 'You Fool No One'}, {'Name': 'Put Your Lights On'}, {'Name': 'Do You Like The Way'}, {'Name': 'Do You Have Other Loves?'}, {'Name': 'You Fool No One (Alternate Version)'}, {'Name': "Don't Take Your Love From Me"}, {'Name': 'I Put A Spell On You'}, {'Name': 'Have You Ever Seen The Rain?'}, {'Name': 'Born On The Bayou'}, {'Name': 'Before You Accuse Me'}, {'Name': 'You Keep On Moving'}, {'Name': 'Knocking At Your Back Door'}, {'Name': "Cascades : I'm Not Your Lover"}, {'Name': "You Can't Do it Right (With the One You Love)"}, {'Name': 'Have You Ever Needed Someone So Bad'}, {'Name': 'Sunshine Of Your Love'}, {'Name': 'Before You Accuse Me'}, {'Name': "Nobody Knows You When You're Down & Out"}, {'Name': "Surprise! You're Dead!"}, {'Name': 'In Your Honor'}, {'Name': 'Best Of You'}, {'Name': 'Tired Of You'}, {'Name': 'Lonely As You'}, {'Name': 'See You'}, {'Name': 'Walking After You'}, {'Name': 'I Get A Kick Out Of You'}, {'Name': "I've Got You Under My Skin"}, {'Name': 'I Fucking Hate You'}, {'Name': "Homecoming / The Death Of St. Jimmy / East 12th St. / Nobody Likes You / Rock And Roll Girlfriend / We're Coming Home Again"}, {'Name': 'Think About You'}, {'Name': "You're Crazy"}, {'Name': "You Ain't the First"}, {'Name': 'You Could Be Mine'}, {'Name': 'Bring Your Daughter... To The Slaughter'}, {'Name': 'Die With Your Boots On'}, {'Name': 'Bring Your Daughter... To The Slaughter...'}, {'Name': 'Hooks In You'}, {'Name': 'Bring Your Daughter... ...To The Slaughter'}, {'Name': 'Die With Your Boots On'}, {'Name': 'Only the Good Die Young'}, {'Name': 'I Got You (I Feel Good)'}, {'Name': 'When You Gonna Learn (Digeridoo)'}, {'Name': 'Too Young To Die'}, {'Name': 'Blow Your Mind'}, {'Name': 'Are You Gonna Be My Girl'}, {'Name': "Look What You've Done"}, {'Name': 'Get What You Need'}, {'Name': 'Can You See Me'}, {'Name': 'Are You Experienced?'}, {'Name': 'Always With Me, Always With You'}, {'Name': "You've Got Another Thing Comin'"}, {'Name': 'Do You Love Me'}, {'Name': 'See You Tonight'}, {'Name': 'I Still Love You'}, {'Name': 'Every Time I Look At You'}, {'Name': "Since I've Been Loving You"}, {'Name': 'Thank You'}, {'Name': "I Can't Quit You Baby"}, {'Name': "Babe I'm Gonna Leave You"}, {'Name': 'You Shook Me'}, {'Name': 'Your Time Is Gonna Come'}, {'Name': "I Can't Quit You Baby"}, {'Name': 'Thank You'}, {'Name': "Since I've Been Loving You"}, {'Name': 'For Your Life'}, {'Name': 'Are You Gonna Go My Way'}, {'Name': "Can't Get You Off My Mind"}, {'Name': 'I Belong To You'}, {'Name': 'No Good Without You'}, {'Name': "You've Been A Long Time Coming"}, {'Name': 'When I Had Your Love'}, {'Name': "You're What's Happening (In The World Today)"}, {'Name': 'Loving You Is Sweeter Than Ever'}, {'Name': 'Seek And You Shall Find'}, {'Name': "Gonna Keep On Tryin' Till I Win Your Love"}, {'Name': 'You Sure Love To Ball'}, {'Name': 'Better Than You'}, {'Name': "I Don't Wanna Be Kissed (By Anyone But You)"}, {'Name': "I Don't Wanna Be Kissed (By Anyone But You) (Alternate Take)"}, {'Name': 'Shoot You In The Back'}, {'Name': 'Without You'}, {'Name': 'Drain You'}, {'Name': 'Come As You Are'}, {'Name': 'Drain You'}, {'Name': 'I Feel Good (I Got You) - Sossego'}, {'Name': 'When The World Was Young'}, {'Name': 'Heart In Your Hand'}, {'Name': 'Your Blue Room'}, {'Name': 'Save You'}, {'Name': 'You Are'}, {'Name': 'Any Colour You Like'}, {'Name': "You're My Best Friend"}, {'Name': 'We Will Rock You'}, {'Name': 'We Will Rock You'}, {'Name': 'Spread Your Wings'}, {'Name': 'Who Needs You'}, {'Name': 'You Are The Everything'}, {'Name': 'Turn You Inside-Out'}, {'Name': 'If You Have To Ask'}, {'Name': 'I Could Die For You'}, {'Name': 'Throw Away Your Television'}, {'Name': 'The Way You Do To Mer'}, {'Name': "You've Got It"}, {'Name': "If You Don't Know Me By Now"}, {'Name': 'Your Mirror'}, {'Name': 'For Your Babies'}, {'Name': 'Because You Are'}, {'Name': 'Stand Inside Your Love'}, {'Name': 'Let Me Love You Baby'}, {'Name': 'Know Your Rights'}, {'Name': 'I Looked At You'}, {'Name': "Can't Stand Losing You"}, {'Name': 'Every Breath You Take'}, {'Name': 'Wrapped Around Your Finger'}, {'Name': 'You Got Me Rocking'}, {'Name': 'You Got Me Rocking'}, {'Name': 'Who Are You (Single Edit Version)'}, {'Name': 'You Better You Bet'}, {'Name': 'Taking a Break from All Your Worries'}, {'Name': 'Flashes Before Your Eyes'}, {'Name': "Who's Gonna Ride Your Wild Horses"}, {'Name': "Tryin' To Throw Your Arms Around The World"}, {'Name': "Stuck In A Moment You Can't Get Out Of"}, {'Name': "Sometimes You Can't Make It On Your Own"}, {'Name': 'All Because Of You'}, {'Name': 'Crumbs From Your Table'}, {'Name': 'Do You Feel Loved'}, {'Name': 'If You Wear That Velvet Dress'}, {'Name': 'All I Want Is You'}, {'Name': 'With Or Without You'}, {'Name': 'All I Want Is You'}, {'Name': "Daddy's Gonna Pay For Your Crashed Car"}, {'Name': 'I Would Do For You'}, {'Name': 'Wear You To The Ball'}, {'Name': "(I Can't Help) Falling In Love With You"}, {'Name': 'Bring Me Your Cup'}, {'Name': "Can't Stop Loving You"}, {'Name': 'You Really Got Me'}, {'Name': 'Feel Your Love Tonight'}, {'Name': 'Without You'}, {'Name': 'You Got No Right'}, {'Name': "Now You're Gone"}, {'Name': "You're Gonna Break My Hart Again"}, {'Name': 'Fool For Your Loving'}, {'Name': 'Take Your Daughter to Work Day'}, {'Name': 'Your Time Is Gonna Come'}, {'Name': 'The Young Lords'}, {'Name': 'Whatever Gets You Thru the Night'}, {'Name': "I'm Losing You"}, {'Name': 'Rock You Like a Hurricane'}, {'Name': 'No One Like You'}, {'Name': 'Loving You Sunday Morning'}, {'Name': 'Still Loving You'}, {'Name': 'Put Your Head Out'}, {'Name': 'Put On Your Shit Kickers'}, {'Name': "I Guess You're Right"}, {'Name': 'I Ka Barra (Your Work)'}, {'Name': 'Your Savior'}, {'Name': 'Arms Around Your Love'}, {'Name': "She'll Never Be Your Man"}, {'Name': 'Your Soul Today'}, {'Name': 'You Know My Name'}, {'Name': 'The Messiah: Behold, I Tell You a Mystery... The Trumpet Shall Sound'}, {'Name': "You Know I'm No Good"}, {'Name': "You Know I'm No Good (feat. Ghostface Killah)"}, {'Name': 'You Sent Me Flying / Cherry'}, {'Name': 'Help Yourself'}]