100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.6 TrustPilot
logo-home
Exam (elaborations)

Relational Database Sophia Unit 1 Quizzes Solved 100% Correc

Rating
-
Sold
-
Pages
5
Grade
A+
Uploaded on
26-10-2024
Written in
2024/2025

Relational Database Sophia Unit 1 Quizzes Solved 100% Correc

Institution
Relational Databases
Module
Relational Databases

Content preview

Relational Database Sophia Unit 1 Quizzes
Solved 100% Correct

Which of the following is a correctly formatted INSERT statement that will successfully

add a record into the genre table? - ANSWER insert into genre (genre_id, name) values

(30, 'Funk' )



Consider the following new table:

CREATE TABLE contact(user_id SERIAL PRIMARY KEY,phone VARCHAR

NOT NULL);

Given this new table, which INSERT statement would query from the customer table

to insert the phone number of all customers that have an email address that contains

the word "apple" in it? - ANSWER INSERT INTO contact (phone)SELECT phone

FROM customerWHERE email LIKE '%apple%';



Which of the following would set the track name to "A New Road" for the track with a

track_id equal to 5? - ANSWER UPDATE trackset name = 'A New Road'where track_id

=5

, Identify the correctly constructed ALTER TABLE statement to add a UNIQUE constraint

to the column student_number with the constraint name student_number_unique on the

table called 'student'. - ANSWER ALTER TABLE student ADD CONSTRAINT

student_number_unique UNIQUE (student_number);



Using the WHERE and HAVING clauses, filter the track table for the tracks having the

milliseconds greater than 100,000, grouped by the album_id having the number of

tracks greater than 20. Provide the list of album_id's and the count of tracks that fit

these criteria.

Which of the following queries would provide the correct results? - ANSWER SELECT

album_id, count(track_id)FROM trackWHERE milliseconds > 100000GROUP BY

album_idHAVING count(track_id) > 20



Identify the SQL command that uses an aggregate function that could be used to find

the youngest employee in the employee table. - ANSWER SELECT max(birth_date)

FROM employee;



Which of these SELECT statements would successfully display exactly five columns of

data from the customer table? - ANSWER SELECT customer_id, city, state, phone,

companyFROM customer;

Written for

Institution
Relational Databases
Module
Relational Databases

Document information

Uploaded on
October 26, 2024
Number of pages
5
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
KenAli West Virginia University
View profile
Follow You need to be logged in order to follow users or courses
Sold
90
Member since
1 year
Number of followers
5
Documents
17546
Last sold
1 month ago

2.6

17 reviews

5
2
4
4
3
4
2
0
1
7

Trending documents

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and smashed it. It really can be that simple.”

Alisha Student

Frequently asked questions