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

  Submit the table creation statements for the database model

submit the table creation statements for the database model. submit them all in a single script file.also submit a

  Create qrycustomersm that selects all customers

Write the SQL below that would display all Customers whose first name begins with the letter J. Your query should display the FirstName, LastName, Phone, and MembershipStatus fields from the tblMember table.

  Write a script that uses two variables

Write a script that uses two variables to store (1) the count of all of the products in the Products table and (2) the average list price for those products. If the product count is greater than or equal to

  Write a select statement that returns these columns

Write a SELECT statement that returns these columns from the Products table: The date_added column A column that uses the CAST function to return the date_added column with its date only (year, month, and day)

  How does the order of joins in an sql statement

How does the order of joins in an SQL statement affect the performance of the join and what can the DBA do to determine the preferred order of joins for an SQL statement that includes the join of at least three tables?

  Write statement which creates table named part

Write the statement which creates table named Part, with Id field as an int idendity PK, a SupplierId int field, a Description string field of size 25, a Count int field, a Class string field

  Writing and execuinge sql command

The table name will be METALS and will be used to store description of various metals. Following offers some additional direction on how table must be created.

  Write a program that does simplified bgp route advertising

Additionally, it will periodically check the modification time of the routing table file and if it detects that it has changed, it will re-read it and send BGP UPDATEs reflecting the changes to all connected peers. This functionality is described i..

  Write sql statement to create stored procedure

Write SQL statement which creates stored procedure with one int input parameter. The stored procedure selects the supplierId field and the total of all Count field values for each group of supplierId's from the Part table.

  Script that creates and calls a stored

Write a script that creates and calls a stored procedure named spInsertProduct that inserts a row into the Products table. This stored procedure should accept five parameters

  How to select the primary key

How to select the primary key from the candidate keys? How do foreign keys relate to candidate keys? provide examples from either your workplace or class assignments

  Can we offer an example of a query

Can we offer an example of a Query in which we can use a parentheses to affect the order of execution in which the WHERE Clause has both AND and OR Logical Operators?

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