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)

SQL Topic and Exam elaborations

Rating
-
Sold
-
Pages
15
Grade
A+
Uploaded on
09-12-2024
Written in
2024/2025

SQL Topic and Exam elaborations 9. 9. The SQL command WHERE does which of the following? a. Indicates the tables to be used in the query b. Lists the names of the fields to be displayed on the screen c. Limits the records to only those meeting the test condition(s) d. All of the above: c. Limits the records to only those meeting the test condition(s) 10. 10. Why will these two queries return different averages? SELECT AVG(unitprice - unitcost) FROM cts

Show more Read less
Institution
Course

Content preview

SQL Topic and Exam elaborations


1. 1. Which SQL clause comes immediately after SELECT?: C. WHERE
2. 2. If a query against database CC3 includes the clause, WHERE description
= 'Express Care', which of the following is true?
a. description must be included in the SELECT
b. cc3.types must be included in the FROM
c. GROUP BY description must also be included
d. None of these
*Note that cc3.types could have been included in the JOIN instead of FROM: d. None of these
*Note that cc3.types could have been included in the JOIN instead of FROM
3. 3. Which table allows you to reference ethnicities by their name in CC4 when you include it in the
FROM or JOIN clause?
a. hispanic
b. survey
c. ethkey
d. ethnicity: c. ethkey
4. 4. The DISTINCT command:
a. Is used to compare fields that have similar values
b. Aggregates results based on DISTINCT fields
c. Results in unique values of SELECT fields
d. Separates fields based on the WHERE conditions: c. Results in unique values of SELECT fields
5. 5. Including the table name with the field name (e.g. using products.produc- tid instead of just
productid) is necessary when:
a. The field is a primary key field
b. The field name appears in more than one table that is part of the query
c. The field is in a JOIN clause after ON
d. The field is in a WHERE clause: b. The field name appears in more than one table that is
part of the query
6. 6. When present, the clause should be the
final clause in an SQL query.
a. GROUP BY
b. WHERE
c. HAVING
d. ORDER BY: d. ORDER BY
7. 7. Which of the following queries will return the all the sample Cleveland Clinic website
searches that contained 'CT' (as in CT scan) whether the user entered 'CT' or 'ct' or 'Ct' or 'cT'?
a. WHERE UPPER(search) = 'CT'






, SQL Topic and Exam elaborations


b. WHERE UPPER(search) LIKE 'CT'
c. WHERE UPPER(search) LIKE '%CT%'
d. WHERE search LIKE UPPER('%CT%'): c. WHERE UPPER(search) LIKE '%CT%'
8. 8. SQL is an acronym for:
a. Standard Questioning Language
b. Structured Query Language
c. Simple Query Language
d. Structured Questioning Language: b. Structured Query Language
9. 9. The SQL command WHERE does which of the following?
a. Indicates the tables to be used in the query
b. Lists the names of the fields to be displayed on the screen
c. Limits the records to only those meeting the test condition(s)
d. All of the above: c. Limits the records to only those meeting the test condition(s)
10. 10. Why will these two queries return different averages?
SELECT AVG(unitprice - unitcost) FROM
northwinds.products

SELECT AVG(orderdetails.unitprice - unitcost) FROM
northwinds.orderdetails
JOIN northwinds.products on products.productid = orderdetails.productid
a. They will not return different averages
b. Neither will return an average because a GROUP BY is missing
c. Because products contains actual sales prices and orderdetails contains retail prices
d. Because orderdetails contains actual sales prices and products contains retail prices: d.
Because orderdetails contains actual sales prices and products contains retail prices
11. 11. cc2 is the name of a .
a. Field
b. Database
c. Table
d. Record: b. Database
12. 12. The error message "column ambiguously defined" means:
a. Unaggregated and aggregated fields were used without proper grouping
b. A field or table name was misspelled
c. There is an improper equation or comparison
d. The query includes a field with the same name as a field in another joined

Written for

Course

Document information

Uploaded on
December 9, 2024
Number of pages
15
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$9.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
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.
smartchoices Chamberlain College Of Nursing
Follow You need to be logged in order to follow users or courses
Sold
36
Member since
5 year
Number of followers
5
Documents
4499
Last sold
2 weeks ago

4.8

9 reviews

5
7
4
2
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