DBA Quiz 13

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Group functions can be nested to a depth of ____.​

2

If the DISTINCT keyword is not included in the AVG function, the ____ keyword will be assumed.

ALL

The ____ function calculates the average of the numeric values in a specified column.

AVG

Which of the following lines of the SQL statement contains an error? 1 SELECT title, MAX(retail) 2 FROM books 3 WHERE retail > 30 4 AND pubid = 1 5 GROUP BY retail

Line 5

Based upon the contents of the BOOKS table, which of the following will determine the number of books provided by publisher 3?

SELECT COUNT(pubid) FROM books WHERE pubid = 3;

Based on the contents of the BOOKS table, which of the following will display the date of the book with the earliest publication date?

​SELECT MIN(pubdate) FROM books;

If a group function is used in the WHERE clause, then any individual columns listed in the SELECT clause must also be listed in the GROUP BY clause.

FALSE

The ____ clause is used to restrict the groups returned by a query.

HAVING

The VARIANCE function can be used with ____ columns.

NUMERIC

The AVG function can be used with ____ values.

Numeric

Based on the contents of the BOOKS table, which of the following is a valid SQL statement?

SELECT pubid, AVG(retail-cost) "Average Profit" FROM books GROUP BY pubid;

The ____ function calculates the standard deviation for a specific set of data.​

STDDEV

AVG, COUNT, and STDDEV are all considered group functions.​

TRUE

Group functions can only be nested to a depth of two

TRUE

The HAVING clause is used to restrict the groups returned by a query.

TRUE

The HAVING clause specifies which groups will be displayed in the results, while the WHERE clause restricts the records that are retrieved from the table for processing. _________________________​

TRUE

The MAX function can be used with character data.

TRUE

The WHERE clause filters the data before grouping, while the HAVING clause filters the groups after grouping is performed. _________________________​

TRUE

When group functions are nested, the inner function is always resolved first. _________________________

TRUE

Which of the following indicates the processing order for the indicated clauses?

WHERE, GROUP BY, HAVING


Kaugnay na mga set ng pag-aaral

Real Estate Principles Study Guide -- Quiz 1 California's Diversity

View Set

Econ 202 - Unit 2 Quiz Questions

View Set

PrepU Ch. 38 Digestion & GI - Adult MedSurg

View Set

Prep U: Chapter 67 Emergency Nursing

View Set

Adult Health Chapter 17 Assessment of Respiratory Function

View Set

Precision Machining Technology - Section 5 - section 8

View Set

M06-Ch.19-Network Security and troubleshooting.

View Set

H.M case study multi store model

View Set

Chapter 53: Concepts of Care for Patients With Liver Problems

View Set