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

  Write a sql query for each of the following requirement

MIS 4300 / ACCT 4300 Database Fundamentals Spring 2014. How many times the vendor has placed an order for the item ID = 1 (rename it as NUMORD)?

  Create a clustered index on the groupid column

Write the CREATE INDEX statements to create a clustered index on the GroupID column and a nonclustered index on the IndividuallD column of the GroupMembership table.

  Question 1 given the series rlc resonant circuit in the

question 1 given the series rlc resonant circuit in the figure operating at variable frequency determinenbspa. the

  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

  Create tables using sql ddl

Write the SQL DDL to create the database that contains each of the relations shown in the above ERD. You will need to provide - Your DDL code for each table that you create and a screenshot showing each table that is created.

  Pl-sql block to display last name and salary

Write a PL/SQL block that displays the last name and salary of the following people. Each of these can be done separately as PL/SQL, first to test and get the output lines then encapsulated.

  An er diagram for the system

An ER diagram for the system. Show all entities, relationships, cardinalities and optionalities. Also, include all intersection entities. You must use the Finkelstein methodology as per the study book and tutorials.

  Display the output of the sql statement

Write a procedure that takes a car registration and returns the most recent date of rental and the maximum rental period for that car.  The procedure had the following formal parameters

  Part a - entity-relationship diagram erd draw an

part a - entity-relationship diagram erd draw an entity-relationship diagram erd for the data storage requirements of a

  Write sql statement to create user defined function

Write SQL statement which creates user defined function which returns int value. This int return value is obtained by deducting the lowest Count field value from the highest Count field value of Part table.

  Sql statement which select names and owners of great danes

Write SQL statement which would select each of the following: names and owners of all Great Danes and all attributes of poodles whose balance is no greater than $50.

  In this problem we will consider a movie database with

in this problem we will consider a movie database with three tablesmoviedirectortitle director yearmoviecasttitle actor

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