Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Top of Form Q1 Which of the following is a valid aggregate function in SQL? Check only those that apply. Question 1 options: AVG LEAST

Top of Form

Q1

Which of the following is a valid aggregate function in SQL? Check only those that apply.

Question 1 options:

AVG

LEAST

COUNT

MIN

MOST

SUM

Q2

Which of the following aggregate functions will only operate on a numeric value expression? Check only those that apply:

Question 2 options:

MIN

MAX

AVG

COUNT

SUM

Q3

When applying DISTINCT to the value being calculated in an aggregate function like COUNT, what is the effect?

SELECT COUNT(DISTINCT StreetName) FROM ADDRESSES;

Question 3 options:

To count only unique values

To make a distinction between rows and columns

To add a summary COUNT for all groupings

To include duplicate values

Q4

A query is limited to a single aggregate calculation in its SELECT clause.

Question 4 options:

True

False

Q5

The GROUP BY clause groups the rows of a result set based on one or more columns or expressions. In the example below, what will the value from COUNT(*) represent?

SELECT Department, COUNT(*) FROM EMPLOYEES GROUP BY Department;

Question 5 options:

The total number of departments

The total number departments for each employee

The total number of employees

The total number of employees in each department

Q6

Specify the correct order in which each of the six SQL clauses must be placed:

Question 6 options:

123456

GROUP BY

123456

WHERE

123456

ORDER BY

123456

SELECT

123456

FROM

123456

HAVING

Q7

The GROUP BY clause can contain more than one value (separated by commas). In the query below, what does SUM(Salary) represent?

SELECT Department, State, SUM(Salary) FROM EMPLOYEES GROUP BY Department, State;

Question 7 options:

The total salary budget for the organization

The salary budget for each state

The salary budget for each department

The salary budget for each combination of department and state

Q8

The WHERE clause and the HAVING clause can both limit rows in the result set based on logical conditions. What is the difference between the two clauses?

Question 8 options:

HAVING cannot use the logical OR operator

WHERE is limited to a single condition

WHERE requires a corresponding GROUP BY

HAVING can make comparisons against aggregate functions

Q9

Conditions comparing against non-aggregate values must be placed in the WHERE clause (never in the HAVING clause).

Question 9 options:

True

False

Q10

What is the ROLLUP operator used for in the GROUP BY clause?

Question 10 options:

To save memory in query execution

To add a summary total for each grouping

To group by all values - even if they do not match WHERE clause conditions

To group based on unique values

Bottom of Form

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Murach's SQL Server 2012 For Developers

Authors: Bryan Syverson, Joel Murach, Mike Murach

1st Edition

1890774693, 9781890774691

More Books

Students also viewed these Databases questions