Write sql statements for the ten queries

Assignment Help PL-SQL Programming
Reference no: EM13689589

Consider the following database schema:

Artists (artistID: int, name: varchar (255))

SimilarArtists (artistID: int, simArtistID: int, weight: int)

Albums (albumID: int, artistID: int, name: varchar (255))

Tracks (trackID: int, artistID: int, name: varchar (255), length: int)

TrackLists (albumID: int, trackID: int, trackNum: int)

All primary keys are underlined. All foreign keys have the same name as the primary key that they are referencing. When asking about the similarity of one Artist to another, you can safely assume that the pair of Artists will only appear in one tuple in the SimilarArtists table.

Write SQL statements for the following ten queries:

1. Find the names of all Tracks that are more than 10 minutes (600,000 ms) long. Result: (name: varchar(255))

2. Find the names of all Artists who have recorded a self-titled Album (the name of the Album is the same as the name of the Artist). Result: (name: varchar(255))

3. Find the names of all Artists who have recorded an Album on which the first track is named "Intro". Result: (name: varchar(255))

4. Find the names of all Artists who are more similar to Mogwai than to Nirvana (meaning the weight of their similarity to Mogwai is greater). Result: (name: varchar(255))

5. Find the names of all Albums that have more than 30 tracks. Result: (name: varchar(255))

6. Find the names of all Artists who do not have a similarity rating greater than 5 to any other Artist. Result: (name: varchar(255))

Reference no: EM13689589

Questions Cloud

Calculate the percent ionization of the benzoate ion : Calculate the percent ionization of the benzoate ion.
What is the minimum number of moles of h2so4 : What is the minimum number of moles of H2SO4 that must react to form 1.7752 moles of manganes (II) sulfate?
What was the mass percent of ascorbic acid : What was the mass percent of ascorbic acid in the sample?
Explain how and why you would schedule an appointment : Explain how and why you would schedule an appointment
Write sql statements for the ten queries : Write SQL statements for the ten queries - find the names of all Tracks that are more than 10 minutes (600,000 ms) long. Result: (name: varchar(255))
Analyze principles of the 360 degree performance assessment : Analyze the principles of the 360 degree performance assessment and explain how it should be implemented in the organizations - When mentioning any information from any source, mention the source at the beginning of the paragraph or at the end of it.
Why world trade : Explain to your 14 year old sibling and your 90 year old grandfather why the US should promote world trade.
What are the differences between investing : What are the differences between investing $15,000 at 9% p.a. for 15 years when compounded yearly, quarterly, monthly, daily, and continuously? Ignore the effect of leap years.
Productions functions exhibit increasing return of scale : Are the following productions functions exhibit increasing/constant/decreasing return to scale? Given that the wage rate for per unit of labor is $10 and rental rate for unit of capital is $10, according to these functions, are the firms operate in e..

Reviews

Write a Review

PL-SQL Programming Questions & Answers

  Create a database model

Create a database model and Submit the table creation statements for the Database Model.

  Write pl-sql procedures and functions

Write PL/SQL procedures and functions to populate and query that database

  Sql questions

Write a query to display using the employees table the EMPLOYEE_ID, FIRST_NAME, LAST_NAME and HIRE_DATE of every employee who was hired after to 1 January, 1995.

  Run the lab_03_01.sql script

Run the lab_03_01.sql script in the attached file to create the SAL_HISTORY table. Display the structure of the SAL_HISTORY table.

  Write sql queries

Write a query to display the last name, department number, and salary of any employee whose department number and salary both match the department number and salary of any employee who earns a commission.

  Explaining sql insert statement to insert new row in cds

Write down a SQL insert statement to insert new row in "CDS" table.

  Write down name of actors in ascending order

Write down actors (or actress, your choice, but not both) who have won at least two (2) Academy Awards for best actor/actress. Provide the actor name, movie title & year. Order the result by actor name."

  What is an sql injection attack

What is an SQL injection attack? Explain how it works, and what precautions must be taken to prevent SQL injection attacks.What are two advantages of encrypting data stored in the database?

  Determine resonant frequency in series rlc resonant circuit

Given the series RLC resonant circuit in the figure, operating at variable frequency, determine: The resonant frequency ω o ,  The circuit’s quality factor Q , The cut-off frequencies, f 1  & f 2  and the bandwidth BW

  Query that uses cube operator to return lineitemsum

Write summary query which uses CUBE operator to return LineItemSum (which is the sum of InvoiceLineItemAmount) group by Account(an alias for AccountDesciption).

  Query to show customers were missing for existing orders

As DBA, your manager called a meeting and asked why there are so many orders for customers that don't exist in the customer table. Write query which would shows which customers were missing for existing orders. Use a join or a subquery.

  Sql query into a relational algebra statement

Turn this SQL query into a relational algebra statement? SELECT Request.reqfor, Ordering.invamt, Ordering.invnbr, Ordering.invdat

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd