Question: Question 3 - 4 0 points The answer to this question is a SQL script file in text format. Consider the following schema: songs (
Question points
The answer to this question is a SQL script file in text format.
Consider the following schema:
songs songid: int, title string, release: date
singerssingerid: int, name: string, city: string, state: string
singsinsingerid: int, songid: int
The primary keys are underlined in each relation. The singers relation contains information about singers. Relation songs contain information about songs. The singers singsin contains information about singers singing songs.
SQL must run against the Oracle database we use in class. Run and test your queries against the Oracle DB Create the tables, insert some data, and test your queries to make sure they work properly before submitting your solution.
SQL queries that do not run against the Oracle DB will receive any credit.
In the sql file, before each SQL statement you MUST include a comment line with the problem number the sql statement is for, like the following.
Answer to Part a
your sql statements for part a here
Answer to Part b
your sql statements for part b here
Each problem has points.
a Write the SQL statements that create tables songs, singers and singsin Don't forget to define the key constraints.
B Write the SQL query that extracts all the names of the singers from state MA Sort the result by name in descending order.
c Write the SQL query that extracts information about the singers and the songs they sing. Each record in the result should contain the name of the singer the title of the song and the release date of the song.
d Write the SQL query that finds how many singers from Boston, MA are in the database.
e Write the SQL that extracts information about singers whose name starts with letter A Sort the result by the state of the singers, in an ascending order.
f Write the SQL that extracts the name, city and state for all singers who played in a song that has a title that contains the word joy. The query should be case insensitive with regards to the case of the letters from the title of the song.
g Write an SQL query to extract the name, city and state of singers that sang a song that was released before Sept
h Write the SQL to extracts the name and state of singers that sang some songs released in year The results should contain no duplicates.
Please use SQL plus. Make sure that the language is SQL plus
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
