SlideShare a Scribd company logo
1 of 3
Download to read offline
Objective JOIN data in the tables created in the music database from Lab 3. Practice using
JOIN statements and understand some more complex queries
Introduction Follow the instructions to combine data from the tables created in Lab 3 using
JOINs and complex queries.
A join is a SELECT statement that combines data from two tables, known as the left table and
right table, into a single result.
An inner join selects only matching left and right table rows.
A left join selects all left table rows, but only matching right table rows.
A right join selects all right table rows, but only matching left table rows.
A full join selects all left and right table rows, regardless of match.
Hints:
1. Some questions can be solved in multiple ways and there will likely be variance in how
you and your peers answer some of the questions!
2. Take note of the name of each column as you complete the lab. Pay close attention which
tables contain which columns
3. Make sure that the type of JOIN you are using is the intended JOIN as they can have very
similar results; however, have vastly differently implications and reasons for reaching
this point.
Steps:
1) Write a query that JOINS two tables and uses a subquery to list the songs made by artists
over the age of 50. Your query should show the name of the song, the name of the artist, the
song length, and release date. For the column headers in the output rename song_name to
Title, artist to Artist, duration to Length, and release_date to Release Year
Your output should look like this
Title Artist Length Release Year
Where Does My Heart Beat
Now Celine Dion 4.33 1990
The Last to Know Celine Dion 4.36 1990
Have a Heart Celine Dion 4.16 1991
Candle in the Wind 1997 Elton John 3.59 1997
All I want for Christmas Is You Mariah Carey 4.01 1994
La Voce Del Silenzio Andrea Bocelli 4.55 2007
Just the Two of Us Will Smith 5.15 1997
2) Write a query that JOINS all tables to display the data as shown in the music_basic Note: You
are not using the music_basic table, but rather Joining the artists, genre, album, and songs tables
to output a table in the same format. Modify your column headers to produce a table that looks
like this:
(Hint: SELECT * FROM music_basic to get an idea for how your output should look. There are
multiple ways to do this!)
Id Title Artist Genre Length Release Year Album
1
Where Does
My Heart
Beat Now
Celine Dion Pop 4.33 1990 Unison
2 The Last to
Know Celine Dion Pop 4.36 1990 Unison
3 Never
Really Over Katy Perry EDM 3.43 2019 Single
4 Call Me
Maybe Katy Perry Pop 3.13 2011 Now 27
5 Have a
Heart Celine Dion Pop 4.16 1991 Unison
... ..... .... .... .... .... ....
3) Create a View table using the query created in Question 6 and 7. Display the contents of the
view table and include the results in your screenshot.
4) Using a complex query and the newly created MusicBasicView, find the artists HAVING at
least two songs in a genre
Example
Blake Shelton has 3 songs in country and therefore meets this criterion for the country genre;
Drake only has 1 R&B song so he would not meet this criterion for the R&B genre; however,
he does for Hip-Hop
Your output should list all the songs the artist has in the genre. Include only the artist's name,
genres, and song title columns (3 columns). (Hint: use HAVING)
Your output should look something like this:
Artist Title Genre
Beyonce Me, Myself and I R&B
Beyonce That's How you Like
It R&B
Beyonce Speechless R&B
Taylor Swift the 1 Alternative
Taylor Swift My Tears Ricochet Alternative
Taylor Swift cardigan Alternative
Drake Headlines Hip-Hop
Drake Marvins Room R&B
Drake Under Ground Kings Hip-Hop
Drake We'll Be Fine Hip-Hop
Eminem Love The Way You
Lie Hip-Hop
Eminem Not Afraid Hip-Hop
Eminem Almost Famous Hip-Hop
Thomas Rhett Make Me Wanna Country
Thomas Rhett Die a Happy Man Country
Blake Shelton Crash and Burn Country
Blake Shelton Heavy Liftin' Country
Blake Shelton The Dreamer Country
5) Modify your query from question 8 to only include records where the Genre is not Pop and
sort the output by artist name in descending order

More Related Content

Similar to Objective JOIN data in the tables created in the music dat.pdf

Analysis of magazines
Analysis of magazinesAnalysis of magazines
Analysis of magazinesmediaman01
 
Advert analysis
Advert analysisAdvert analysis
Advert analysisconnorl16
 
2. idea development
2. idea development2. idea development
2. idea developmentJack Ward
 
Cold play website analysis
Cold play website analysisCold play website analysis
Cold play website analysisEeman Masood
 
Answer TWO of the following three questions1. Watch this exce.docx
Answer TWO of the following three questions1. Watch this exce.docxAnswer TWO of the following three questions1. Watch this exce.docx
Answer TWO of the following three questions1. Watch this exce.docxYASHU40
 
Main problem definition An instrumentation radar collects com.docx
Main problem definition An instrumentation radar collects com.docxMain problem definition An instrumentation radar collects com.docx
Main problem definition An instrumentation radar collects com.docxinfantsuk
 
How to Create and Organize Multiple Playlists Using Playlist.com
How to Create and Organize Multiple Playlists Using Playlist.comHow to Create and Organize Multiple Playlists Using Playlist.com
How to Create and Organize Multiple Playlists Using Playlist.comDylanRykowski
 
Ancillary- Album Plan
Ancillary- Album PlanAncillary- Album Plan
Ancillary- Album PlanBenPotter1
 
8A Rock Band Project
8A Rock Band Project8A Rock Band Project
8A Rock Band ProjectChelsea Alice
 
Conventions of albums
Conventions of albumsConventions of albums
Conventions of albumssacharelf2
 
Digipak analysis: Twenty One Pilots
Digipak analysis: Twenty One PilotsDigipak analysis: Twenty One Pilots
Digipak analysis: Twenty One PilotsTeganHarris1
 
Codes and conventions
Codes and conventionsCodes and conventions
Codes and conventionsRyanFrankish7
 
Task Ten – Production Ideas
Task Ten – Production IdeasTask Ten – Production Ideas
Task Ten – Production Ideasayreslou
 
Different aspects of NME
Different aspects of NMEDifferent aspects of NME
Different aspects of NMEAdamParks94
 
Article Research
Article ResearchArticle Research
Article Researchca04919815
 
Answer the questions below based on the database model found on the n.pdf
Answer the questions below based on the database model found on the n.pdfAnswer the questions below based on the database model found on the n.pdf
Answer the questions below based on the database model found on the n.pdfmeerobertsonheyde608
 
Consider the following requirements for a library database. Create t.pdf
Consider the following requirements for a library database. Create t.pdfConsider the following requirements for a library database. Create t.pdf
Consider the following requirements for a library database. Create t.pdfamericancolor
 

Similar to Objective JOIN data in the tables created in the music dat.pdf (20)

Analysis of magazines
Analysis of magazinesAnalysis of magazines
Analysis of magazines
 
Unit 30 LO2
Unit 30  LO2Unit 30  LO2
Unit 30 LO2
 
Advert analysis
Advert analysisAdvert analysis
Advert analysis
 
2. idea development
2. idea development2. idea development
2. idea development
 
Cold play website analysis
Cold play website analysisCold play website analysis
Cold play website analysis
 
Answer TWO of the following three questions1. Watch this exce.docx
Answer TWO of the following three questions1. Watch this exce.docxAnswer TWO of the following three questions1. Watch this exce.docx
Answer TWO of the following three questions1. Watch this exce.docx
 
Main problem definition An instrumentation radar collects com.docx
Main problem definition An instrumentation radar collects com.docxMain problem definition An instrumentation radar collects com.docx
Main problem definition An instrumentation radar collects com.docx
 
How to Create and Organize Multiple Playlists Using Playlist.com
How to Create and Organize Multiple Playlists Using Playlist.comHow to Create and Organize Multiple Playlists Using Playlist.com
How to Create and Organize Multiple Playlists Using Playlist.com
 
Y8 revision
Y8 revisionY8 revision
Y8 revision
 
Ancillary- Album Plan
Ancillary- Album PlanAncillary- Album Plan
Ancillary- Album Plan
 
8A Rock Band Project
8A Rock Band Project8A Rock Band Project
8A Rock Band Project
 
Task 5 Ideas
Task 5 Ideas Task 5 Ideas
Task 5 Ideas
 
Conventions of albums
Conventions of albumsConventions of albums
Conventions of albums
 
Digipak analysis: Twenty One Pilots
Digipak analysis: Twenty One PilotsDigipak analysis: Twenty One Pilots
Digipak analysis: Twenty One Pilots
 
Codes and conventions
Codes and conventionsCodes and conventions
Codes and conventions
 
Task Ten – Production Ideas
Task Ten – Production IdeasTask Ten – Production Ideas
Task Ten – Production Ideas
 
Different aspects of NME
Different aspects of NMEDifferent aspects of NME
Different aspects of NME
 
Article Research
Article ResearchArticle Research
Article Research
 
Answer the questions below based on the database model found on the n.pdf
Answer the questions below based on the database model found on the n.pdfAnswer the questions below based on the database model found on the n.pdf
Answer the questions below based on the database model found on the n.pdf
 
Consider the following requirements for a library database. Create t.pdf
Consider the following requirements for a library database. Create t.pdfConsider the following requirements for a library database. Create t.pdf
Consider the following requirements for a library database. Create t.pdf
 

More from advancethchnologies

On day 1 of the menstrual cycle FSH levels will be 25 pts .pdf
On day 1 of the menstrual cycle FSH levels will be 25 pts .pdfOn day 1 of the menstrual cycle FSH levels will be 25 pts .pdf
On day 1 of the menstrual cycle FSH levels will be 25 pts .pdfadvancethchnologies
 
On August 2 1971 Commander Scott of Apollo 15 confirmed Ga.pdf
On August 2 1971 Commander Scott of Apollo 15 confirmed Ga.pdfOn August 2 1971 Commander Scott of Apollo 15 confirmed Ga.pdf
On August 2 1971 Commander Scott of Apollo 15 confirmed Ga.pdfadvancethchnologies
 
On April 1 2024 Ivanhoe Company purchased 41600 common sh.pdf
On April 1 2024 Ivanhoe Company purchased 41600 common sh.pdfOn April 1 2024 Ivanhoe Company purchased 41600 common sh.pdf
On April 1 2024 Ivanhoe Company purchased 41600 common sh.pdfadvancethchnologies
 
On any given day the probability that Marco eats sushi for .pdf
On any given day the probability that Marco eats sushi for .pdfOn any given day the probability that Marco eats sushi for .pdf
On any given day the probability that Marco eats sushi for .pdfadvancethchnologies
 
Objective Draw the data path and interface with the control.pdf
Objective Draw the data path and interface with the control.pdfObjective Draw the data path and interface with the control.pdf
Objective Draw the data path and interface with the control.pdfadvancethchnologies
 
On a certain island there is a population of snakes foxes.pdf
On a certain island there is a population of snakes foxes.pdfOn a certain island there is a population of snakes foxes.pdf
On a certain island there is a population of snakes foxes.pdfadvancethchnologies
 
Omnichannel retailing is A when a retailer either closes .pdf
Omnichannel retailing is A when a retailer either closes .pdfOmnichannel retailing is A when a retailer either closes .pdf
Omnichannel retailing is A when a retailer either closes .pdfadvancethchnologies
 
Omigo On a Mission to Create a Bidet Culture in the United .pdf
Omigo On a Mission to Create a Bidet Culture in the United .pdfOmigo On a Mission to Create a Bidet Culture in the United .pdf
Omigo On a Mission to Create a Bidet Culture in the United .pdfadvancethchnologies
 
Olfactory receptor cells and auditory receptors share the fo.pdf
Olfactory receptor cells and auditory receptors share the fo.pdfOlfactory receptor cells and auditory receptors share the fo.pdf
Olfactory receptor cells and auditory receptors share the fo.pdfadvancethchnologies
 
Olivia a oneyearold infant is brought to the emergency r.pdf
Olivia a oneyearold infant is brought to the emergency r.pdfOlivia a oneyearold infant is brought to the emergency r.pdf
Olivia a oneyearold infant is brought to the emergency r.pdfadvancethchnologies
 
Okul andaki nfusun yzde on drd zel okullara gidiyor ve.pdf
Okul andaki nfusun yzde on drd zel okullara gidiyor ve.pdfOkul andaki nfusun yzde on drd zel okullara gidiyor ve.pdf
Okul andaki nfusun yzde on drd zel okullara gidiyor ve.pdfadvancethchnologies
 
oklu ve ldrc aleller neden klasik Mendel monohibrit ve .pdf
oklu ve ldrc aleller neden klasik Mendel monohibrit ve .pdfoklu ve ldrc aleller neden klasik Mendel monohibrit ve .pdf
oklu ve ldrc aleller neden klasik Mendel monohibrit ve .pdfadvancethchnologies
 
Okuyucunun trevleri anladn ve anlk hzn dxdt tanmn bildii.pdf
Okuyucunun trevleri anladn ve anlk hzn dxdt tanmn bildii.pdfOkuyucunun trevleri anladn ve anlk hzn dxdt tanmn bildii.pdf
Okuyucunun trevleri anladn ve anlk hzn dxdt tanmn bildii.pdfadvancethchnologies
 
okay ment rebuild the project what is the first ertor you g.pdf
okay ment rebuild the project what is the first ertor you g.pdfokay ment rebuild the project what is the first ertor you g.pdf
okay ment rebuild the project what is the first ertor you g.pdfadvancethchnologies
 
ok hcre saln destekleyen oksijenin verilmesi ve gereksinim.pdf
ok hcre saln destekleyen oksijenin verilmesi ve gereksinim.pdfok hcre saln destekleyen oksijenin verilmesi ve gereksinim.pdf
ok hcre saln destekleyen oksijenin verilmesi ve gereksinim.pdfadvancethchnologies
 
Office Automation Inc developed a proposal for implementin.pdf
Office Automation Inc developed a proposal for implementin.pdfOffice Automation Inc developed a proposal for implementin.pdf
Office Automation Inc developed a proposal for implementin.pdfadvancethchnologies
 
Of the 214 million US firms without paid employees 32 a.pdf
Of the 214 million US firms without paid employees 32 a.pdfOf the 214 million US firms without paid employees 32 a.pdf
Of the 214 million US firms without paid employees 32 a.pdfadvancethchnologies
 
Of the following which is NOT true about the service econom.pdf
Of the following which is NOT true about the service econom.pdfOf the following which is NOT true about the service econom.pdf
Of the following which is NOT true about the service econom.pdfadvancethchnologies
 
Of the following which is the biggest risk factor for the d.pdf
Of the following which is the biggest risk factor for the d.pdfOf the following which is the biggest risk factor for the d.pdf
Of the following which is the biggest risk factor for the d.pdfadvancethchnologies
 
Of the four universal forces strong weak electromagnetic.pdf
Of the four universal forces strong weak electromagnetic.pdfOf the four universal forces strong weak electromagnetic.pdf
Of the four universal forces strong weak electromagnetic.pdfadvancethchnologies
 

More from advancethchnologies (20)

On day 1 of the menstrual cycle FSH levels will be 25 pts .pdf
On day 1 of the menstrual cycle FSH levels will be 25 pts .pdfOn day 1 of the menstrual cycle FSH levels will be 25 pts .pdf
On day 1 of the menstrual cycle FSH levels will be 25 pts .pdf
 
On August 2 1971 Commander Scott of Apollo 15 confirmed Ga.pdf
On August 2 1971 Commander Scott of Apollo 15 confirmed Ga.pdfOn August 2 1971 Commander Scott of Apollo 15 confirmed Ga.pdf
On August 2 1971 Commander Scott of Apollo 15 confirmed Ga.pdf
 
On April 1 2024 Ivanhoe Company purchased 41600 common sh.pdf
On April 1 2024 Ivanhoe Company purchased 41600 common sh.pdfOn April 1 2024 Ivanhoe Company purchased 41600 common sh.pdf
On April 1 2024 Ivanhoe Company purchased 41600 common sh.pdf
 
On any given day the probability that Marco eats sushi for .pdf
On any given day the probability that Marco eats sushi for .pdfOn any given day the probability that Marco eats sushi for .pdf
On any given day the probability that Marco eats sushi for .pdf
 
Objective Draw the data path and interface with the control.pdf
Objective Draw the data path and interface with the control.pdfObjective Draw the data path and interface with the control.pdf
Objective Draw the data path and interface with the control.pdf
 
On a certain island there is a population of snakes foxes.pdf
On a certain island there is a population of snakes foxes.pdfOn a certain island there is a population of snakes foxes.pdf
On a certain island there is a population of snakes foxes.pdf
 
Omnichannel retailing is A when a retailer either closes .pdf
Omnichannel retailing is A when a retailer either closes .pdfOmnichannel retailing is A when a retailer either closes .pdf
Omnichannel retailing is A when a retailer either closes .pdf
 
Omigo On a Mission to Create a Bidet Culture in the United .pdf
Omigo On a Mission to Create a Bidet Culture in the United .pdfOmigo On a Mission to Create a Bidet Culture in the United .pdf
Omigo On a Mission to Create a Bidet Culture in the United .pdf
 
Olfactory receptor cells and auditory receptors share the fo.pdf
Olfactory receptor cells and auditory receptors share the fo.pdfOlfactory receptor cells and auditory receptors share the fo.pdf
Olfactory receptor cells and auditory receptors share the fo.pdf
 
Olivia a oneyearold infant is brought to the emergency r.pdf
Olivia a oneyearold infant is brought to the emergency r.pdfOlivia a oneyearold infant is brought to the emergency r.pdf
Olivia a oneyearold infant is brought to the emergency r.pdf
 
Okul andaki nfusun yzde on drd zel okullara gidiyor ve.pdf
Okul andaki nfusun yzde on drd zel okullara gidiyor ve.pdfOkul andaki nfusun yzde on drd zel okullara gidiyor ve.pdf
Okul andaki nfusun yzde on drd zel okullara gidiyor ve.pdf
 
oklu ve ldrc aleller neden klasik Mendel monohibrit ve .pdf
oklu ve ldrc aleller neden klasik Mendel monohibrit ve .pdfoklu ve ldrc aleller neden klasik Mendel monohibrit ve .pdf
oklu ve ldrc aleller neden klasik Mendel monohibrit ve .pdf
 
Okuyucunun trevleri anladn ve anlk hzn dxdt tanmn bildii.pdf
Okuyucunun trevleri anladn ve anlk hzn dxdt tanmn bildii.pdfOkuyucunun trevleri anladn ve anlk hzn dxdt tanmn bildii.pdf
Okuyucunun trevleri anladn ve anlk hzn dxdt tanmn bildii.pdf
 
okay ment rebuild the project what is the first ertor you g.pdf
okay ment rebuild the project what is the first ertor you g.pdfokay ment rebuild the project what is the first ertor you g.pdf
okay ment rebuild the project what is the first ertor you g.pdf
 
ok hcre saln destekleyen oksijenin verilmesi ve gereksinim.pdf
ok hcre saln destekleyen oksijenin verilmesi ve gereksinim.pdfok hcre saln destekleyen oksijenin verilmesi ve gereksinim.pdf
ok hcre saln destekleyen oksijenin verilmesi ve gereksinim.pdf
 
Office Automation Inc developed a proposal for implementin.pdf
Office Automation Inc developed a proposal for implementin.pdfOffice Automation Inc developed a proposal for implementin.pdf
Office Automation Inc developed a proposal for implementin.pdf
 
Of the 214 million US firms without paid employees 32 a.pdf
Of the 214 million US firms without paid employees 32 a.pdfOf the 214 million US firms without paid employees 32 a.pdf
Of the 214 million US firms without paid employees 32 a.pdf
 
Of the following which is NOT true about the service econom.pdf
Of the following which is NOT true about the service econom.pdfOf the following which is NOT true about the service econom.pdf
Of the following which is NOT true about the service econom.pdf
 
Of the following which is the biggest risk factor for the d.pdf
Of the following which is the biggest risk factor for the d.pdfOf the following which is the biggest risk factor for the d.pdf
Of the following which is the biggest risk factor for the d.pdf
 
Of the four universal forces strong weak electromagnetic.pdf
Of the four universal forces strong weak electromagnetic.pdfOf the four universal forces strong weak electromagnetic.pdf
Of the four universal forces strong weak electromagnetic.pdf
 

Recently uploaded

OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfPondicherry University
 
Introduction to TechSoup’s Digital Marketing Services and Use Cases
Introduction to TechSoup’s Digital Marketing  Services and Use CasesIntroduction to TechSoup’s Digital Marketing  Services and Use Cases
Introduction to TechSoup’s Digital Marketing Services and Use CasesTechSoup
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptNishitharanjan Rout
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17Celine George
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfstareducators107
 
Economic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food AdditivesEconomic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food AdditivesSHIVANANDaRV
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...EADTU
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 

Recently uploaded (20)

OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
Introduction to TechSoup’s Digital Marketing Services and Use Cases
Introduction to TechSoup’s Digital Marketing  Services and Use CasesIntroduction to TechSoup’s Digital Marketing  Services and Use Cases
Introduction to TechSoup’s Digital Marketing Services and Use Cases
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Our Environment Class 10 Science Notes pdf
Our Environment Class 10 Science Notes pdfOur Environment Class 10 Science Notes pdf
Our Environment Class 10 Science Notes pdf
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdf
 
Economic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food AdditivesEconomic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food Additives
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 

Objective JOIN data in the tables created in the music dat.pdf

  • 1. Objective JOIN data in the tables created in the music database from Lab 3. Practice using JOIN statements and understand some more complex queries Introduction Follow the instructions to combine data from the tables created in Lab 3 using JOINs and complex queries. A join is a SELECT statement that combines data from two tables, known as the left table and right table, into a single result. An inner join selects only matching left and right table rows. A left join selects all left table rows, but only matching right table rows. A right join selects all right table rows, but only matching left table rows. A full join selects all left and right table rows, regardless of match. Hints: 1. Some questions can be solved in multiple ways and there will likely be variance in how you and your peers answer some of the questions! 2. Take note of the name of each column as you complete the lab. Pay close attention which tables contain which columns 3. Make sure that the type of JOIN you are using is the intended JOIN as they can have very similar results; however, have vastly differently implications and reasons for reaching this point. Steps: 1) Write a query that JOINS two tables and uses a subquery to list the songs made by artists over the age of 50. Your query should show the name of the song, the name of the artist, the song length, and release date. For the column headers in the output rename song_name to Title, artist to Artist, duration to Length, and release_date to Release Year Your output should look like this Title Artist Length Release Year Where Does My Heart Beat Now Celine Dion 4.33 1990 The Last to Know Celine Dion 4.36 1990 Have a Heart Celine Dion 4.16 1991 Candle in the Wind 1997 Elton John 3.59 1997 All I want for Christmas Is You Mariah Carey 4.01 1994 La Voce Del Silenzio Andrea Bocelli 4.55 2007 Just the Two of Us Will Smith 5.15 1997 2) Write a query that JOINS all tables to display the data as shown in the music_basic Note: You are not using the music_basic table, but rather Joining the artists, genre, album, and songs tables to output a table in the same format. Modify your column headers to produce a table that looks like this: (Hint: SELECT * FROM music_basic to get an idea for how your output should look. There are multiple ways to do this!) Id Title Artist Genre Length Release Year Album 1 Where Does
  • 2. My Heart Beat Now Celine Dion Pop 4.33 1990 Unison 2 The Last to Know Celine Dion Pop 4.36 1990 Unison 3 Never Really Over Katy Perry EDM 3.43 2019 Single 4 Call Me Maybe Katy Perry Pop 3.13 2011 Now 27 5 Have a Heart Celine Dion Pop 4.16 1991 Unison ... ..... .... .... .... .... .... 3) Create a View table using the query created in Question 6 and 7. Display the contents of the view table and include the results in your screenshot. 4) Using a complex query and the newly created MusicBasicView, find the artists HAVING at least two songs in a genre Example Blake Shelton has 3 songs in country and therefore meets this criterion for the country genre; Drake only has 1 R&B song so he would not meet this criterion for the R&B genre; however, he does for Hip-Hop Your output should list all the songs the artist has in the genre. Include only the artist's name, genres, and song title columns (3 columns). (Hint: use HAVING) Your output should look something like this: Artist Title Genre Beyonce Me, Myself and I R&B Beyonce That's How you Like It R&B Beyonce Speechless R&B Taylor Swift the 1 Alternative Taylor Swift My Tears Ricochet Alternative Taylor Swift cardigan Alternative Drake Headlines Hip-Hop Drake Marvins Room R&B Drake Under Ground Kings Hip-Hop Drake We'll Be Fine Hip-Hop Eminem Love The Way You Lie Hip-Hop Eminem Not Afraid Hip-Hop Eminem Almost Famous Hip-Hop Thomas Rhett Make Me Wanna Country Thomas Rhett Die a Happy Man Country Blake Shelton Crash and Burn Country
  • 3. Blake Shelton Heavy Liftin' Country Blake Shelton The Dreamer Country 5) Modify your query from question 8 to only include records where the Genre is not Pop and sort the output by artist name in descending order