Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

SQLanguage

Rating
-
Sold
-
Pages
13
Grade
A+
Uploaded on
23-04-2023
Written in
2022/2023

I surely say, you will get A+

Institution
Course

Content preview

Test of Basic Knowledge of SQL

Using this test you can assess whether you have basic working knowledge of SQL that is prerequisite for attending
Deloitte’s Data Science Academy – Intermediate program. To verify accuracy of your answers, use the key with
correct answers at the end of this document. In case that your success rate will be lower than 75% (i.e., you will
answer correctly less than 30 questions out of 40), you should consider consulting available on-line resources that
will enable you to become more deeply familiarized with SQL. For that purpose, we have provided you for each
question with a link that will bring you to the website that will help you to grasp and practice given SQL concept.

There is no strict time limit for finishing the test, but we suppose that you will be able to finish it in ~20 minutes.
Some of the questions within the test assume that following Customers, Orders, Products and OrderDetails tables
from the Test database are available to you.



Customers table:

CustomerID CustomerName ContactName Address City PostalCode Country
1 Mary A Mary Austin 338 City Road London EC1V 2NX UK
2 KJ Karl Jung Graefestr. 2 Berlin 10967 Germany
3 Jamie_Wats James Watson 3116 Massachusetts Avenue Washington 20004 USA
… … … … … … …


Orders table:

OrderID CustomerID OrderDate
10308 5 2017-01-21
10309 80 2017-01-22
10310 97 2017-01-22
… … …


Products table:

ProductID ProductName SupplierID CategoryID Unit Price
1 Lip Gloss 1 1 2 bottles 20
2 Eyeshadow makeup 1 2 1 box 10
3 Lip Balm 2 1 1 bottle 5
… … … … … …


OrderDetails table:

OrderDetailID OrderID ProductID Quantity
1 12508 5 1
2 12508 6 10
3 12509 25 50
… … … …




01

, Q1) What SQL statement would you use to create SQL database named Test?

a) CREATE DBT Test;
b) CREATE Test;
c) CREATE DATABASE Test;
d) MAKE DATABASE Test;



Q2) What SQL statement would you use to remove SQL database named Test?

a) DROP DATABASE Test;
b) REMOVE Test;
c) DROP DBT Test;
d) REMOVE DATABASE Test;



Q3) Assign individual relationships that one can find in ERD (Entity Relationship Diagram) to their appropriate
descriptions.

a) 1) zero or many (optional)
b) 2) one or more (mandatory)
c) 3) one to one
d) 4) one and only one (mandatory)
e) 5) one to many (mandatory)
f) 6) many
g) 7) zero or one (optional)


Q4) Which kind of relationship best describes relationship between Products (A) and OrderDetails (B) tables?

a)
b)
c)
d)


Q5) Fulfill missing parts in SQL statement below to create Products table.

______________ ________ (
ProductID INT ______________,
ProductName VARCHAR(255),
SupplierID INT,
CategoryID INT,
Unit _____________,
Price _____________
);

Q6) Primary Key is a combination of two types of constraints. Find the correct one in the list below.

a) UNIQUE & DEFAULT
b) CHECK & UNIQUE
c) UNIQUE & NOT NULL
d) CHECK & AUTO INCREMENT



Q7) Which field in the Orders table has a role of FOREIGN KEY in relation to Customers table?

a) CustomerID
b) OrderID
c) OrderDate
d) CustomerName




02

Written for

Course

Document information

Uploaded on
April 23, 2023
Number of pages
13
Written in
2022/2023
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$7.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
sarathabimanyu

Get to know the seller

Seller avatar
sarathabimanyu Yelizhai Geethalaiyam
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
1
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

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 tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right 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 aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions