100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Intro to relational databases – Sophia Quizzes Solved 100% Correct $12.49
Add to cart

Exam (elaborations)

Intro to relational databases – Sophia Quizzes Solved 100% Correct

 0 purchase
  • Course
  • Relational Databases
  • Institution
  • Relational Databases

Intro to relational databases – Sophia Quizzes Solved 100% Correct

Preview 2 out of 6  pages

  • October 26, 2024
  • 6
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • Relational Databases
  • Relational Databases
avatar-seller
KenAli
Intro to relational databases – Sophia Quizzes
Solved 100% Correct

Using the SELECT statement, query the track table to find the average length of a track
that has the genre_id equal to 5, rounded to the nearest millisecond. - ANSWER
134644


Using the SELECT statement, query the invoice table to find the average total cost for
all orders placed between 2011-01-01 and 2012-01-01. - ANSWER
5.8095238095238095


Which of the following would set the media_type_id to 1 on all tracks where the
album_id is set to 3? - ANSWER UPDATE track set media_type_id = 1


where album_id = 3


Which of the following would set the company of the customer with the
customer_id equal to 24, to Apple Inc.? - ANSWER UPDATE customer SET
company = 'Apple Inc.'
WHERE customer_id = 24


Which of these constraints uses multiple fields as a primary key? - ANSWER
COMPOSITE KEY


Using the SELECT statement, query the track table to find the total price for all
tracks that have the genre_id not equal to 1. - ANSWER 2396.94


Consider the following new table:
CREATE TABLE surveylist(
surveylist_id SERIAL PRIMARY KEY,

, email VARCHAR NOT NULL,
phone VARCHAR
);
Given this new table, which INSERT statement would query from the customer table to
insert the email and phone of all customers in the right columns? - ANSWER INSERT
INTO surveylist (email, phone)
SELECT email, phone FROM customer;


Which of the following is a correctly formatted INSERT statement that will
successfully add a record into the artist table? - ANSWER insert into artist (artist_id,
name) values (900, 'Special Artist' )


Given the tables provided, which of the following DROP TABLE series of statements
would correctly remove the tables without causing an error? - ANSWER DROP TABLE
invoice_line;
DROP TABLE playlist_track;
DROP TABLE playlist;


Using the LIKE operator in the WHERE clause, filter the customer table to list
the individuals that have a phone number ending with 88. Identify the 2nd
individual's country. - ANSWER Canada


Using the BETWEEN operator, filter the album table to find the albums with an artist
ID between 18 and 30.
Identify the 7th album ID. - ANSWER 30


Using the AND or OR statement, filter the album table for an album that has Disc 1 in
the title or Disc 2 in the title.
Identify the album ID of the 4th record. - ANSWER 33

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller KenAli. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $12.49. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

69252 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 15 years now

Start selling
$12.49
  • (0)
Add to cart
Added