Exam 4: Single Table Queries

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

What clause can you use to list data in a specific order?

Free
(Multiple Choice)
4.9/5
(36)
Correct Answer:
Verified

C

Bradford would like to write a query that returns the average unit sales over the last 30 days for each of his bakery's product types: cupcakes, muffins, and cookies. There are several flavors of each in the table, but the product types are identified in a CATEGORY column as "Cupcake," "Muffin," or "Cookie." What should the last part of his query be, following the part shown below? ​ SELECT CATEGORY, AVG(UNIT_SALES) FROM PRODUCTS

Free
(Multiple Choice)
4.9/5
(49)
Correct Answer:
Verified

B

You form compound conditions by connecting two or more simple conditions using _____.

Free
(Multiple Choice)
4.9/5
(33)
Correct Answer:
Verified

D

What is the appropriate sequence for the elements in a SQL query clause that displays the rows returned in a particular order?

(Multiple Choice)
4.9/5
(41)

Imagine you are working with a MySQL table called LIBRARY_MEMBERS that includes the following columns: MEMBER_ID, MOBILE_NUMBER, MAX_BOOKS (the maximum number of books that member can check out at one time), and BOOKS_CHECKED_OUT (the number of books currently checked out). Write a SQL query that will display a grid including the MEMBER_ID for all rows plus a column called CAN_CHECK_OUT that indicates how many more books that library member must check out to reach his or her maximum.

(Essay)
4.7/5
(37)

In the SELECT clause, you can indicate that you want to include all columns using the _____.

(Multiple Choice)
4.9/5
(35)

Describe simple and compound conditions.

(Essay)
4.8/5
(31)

The only arithmetic operators that can be used in SELECT statements are + for addition and - for subtraction.

(True/False)
4.9/5
(39)

It is possible to use both a WHERE clause and a HAVING clause in a SELECT statement.

(True/False)
4.8/5
(41)

Which function calculates a total of the values in a column?

(Multiple Choice)
4.9/5
(33)

How do you construct the SELECT query?

(Essay)
4.9/5
(36)

Which clause lets you group data on a particular column?

(Multiple Choice)
4.8/5
(34)

When you need to find rows with null values in a MySQL table, you can use the _____.

(Multiple Choice)
4.9/5
(36)

Which MySQL clause used with the query SELECT* FROM PACKAGE would be the most likely to yield the following results?

(Multiple Choice)
4.9/5
(37)

When a SQL query is written so as to display the results in a specific order, this order is determined by the _____.

(Multiple Choice)
4.9/5
(36)

Preceding a condition with which SQL operator reverses the truth of the original condition?

(Multiple Choice)
4.9/5
(39)

The basic form of the SQL SELECT command is _____.

(Multiple Choice)
4.7/5
(32)

Compare the WHERE and HAVING clauses.

(Essay)
4.8/5
(32)

Which operator is inclusive, meaning that a query selects a value equal to either value in the condition along with those in the range of the values?

(Multiple Choice)
4.7/5
(46)

Adding a ORDER BY UNIT_PRICE clause to a SQL query will _____.

(Multiple Choice)
4.7/5
(36)
Showing 1 - 20 of 35
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)