FINALS 251 4
All of the following values can be stored in a column that's defined as DECIMAL(6,2), except -246.29 0 2479.95 32492.05
32492.05
When does the HAVING clause act on rows? . During the grouping of rows After the rows have been grouped Before the rows are grouped
After the rows have been grouped
Which aggregate function can be used with grouped data? COUNT(*) MAX() SUM() None of these aggregate functions work with grouped data. All of these aggregate functions work with grouped data.
All of these aggregate functions work with grouped data.
When there is no GROUP BY clause, what does the HAVING clause operate on? Any aggregate functions. All rows returned by the FROM and WHERE clauses The first column in the SELECT clause. The HAVING clause cannot be used without a GROUP BY clause.
All rows returned by the FROM and WHERE clauses
When there is no GROUP BY clause, what does the HAVING clause operate on? Any aggregate functions. All rows returned by the FROM and WHERE clauses. The first column in the SELECT clause. The HAVING clause cannot be used without a GROUP BY clause
All rows returned by the FROM and WHERE clauses.
The _____________________ function is an ANSI-standard function that you can use to perform an explicit conversion. FORMAT CONVERT TYPE CAST
CAST
Write the code for converting the DATE data type in a column named invoice_date to the DATETIME data type: _________________________________________________________ CAST(invoice_date AS DATETIME) invoice_date AS DATETIME FORMAT(invoice_date AS DATETIME) CONVERT(invoice_date AS DATETIME
CAST(invoice_date AS DATETIME)
The _________________ data type is used for fixed-length strings, which use the same amount of storage for each value regardless of the actual length of the string. CHAR STRING VARCHAR BLOB
CHAR
What character is used to separate the columns referenced in the GROUP BY clause? Colon : Semicolon ; Comma , Period .
Comma ,
When the GROUP BY clause is used without aggregate functions it will give you the same result as what keyword? FROM HAVING WHERE DISTINCT
DISTINCT
When multiple columns are used in a single column expression, how are they referenced in the GROUP BY clause? Each column referenced in the expression must be referenced individually in the GROUP BY clause. The final column is referenced by the correlation name in the GROUP BY clause. Both methods can be used to reference in the GROUP BY clause. Neither method will work. Multicolumn expressions cannot be referenced in the GROUP BY clause.
Each column referenced in the expression must be referenced individually in the GROUP BY clause.
Columns referenced in the HAVING clause must also be referenced where? . In the GROUP BY clause Enclosed within an aggregate function Either in the GROUP BY clause or enclosed within an aggregate function Neither in the GROUP BY clause nor enclosed within an aggregate function
Either in the GROUP BY clause or enclosed within an aggregate function
If you want to include a column in the output that is not a result of an aggregate calculation you must add it to what clause? FROM WHERE GROUP BY HAVING
GROUP BY
Which clause is used to group matching values of a specified column together? SELECT FROM WHERE GROUP BY HAVING
GROUP BY
Which clause is used to group matching values of a specified column together? SELECT FROM WHERE GROUP BY HAVING
GROUP BY
Filters that use a predicate on an aggregate function must be placed in what clause? WHERE GROUP BY HAVING FROM
HAVING
When using multiple tables, which clause enables you to include data that does not match across tables? INNER JOIN HAVING OUTER JOIN WHERE
Outer Join
The GROUP BY clause is added after what clause? SELECT ORDER BY WHERE HAVING
WHERE
When you want to group only a subset of rows you should eliminate rows first in what clause? SELECT FROM WHERE HAVING
WHERE
Which two clauses are used to filter the result set? GROUP BY and HAVING . SELECT and FROM FROM and WHERE WHERE and HAVING
WHERE and HAVING
Which of the following is a request that can be answered using the HAVING clause? Show me how many recipes exist for each class of ingredient. Display the highest raw score for each bowler. List for each customer and order date the customer full name and the total cost of items ordered on each date. Which agents booked more than $3,000 worth of business in December, 2012?
Which agents booked more than $3,000 worth of business in December, 2012?
Which of the following is a request that can be answered using the HAVING clause? Show me how many recipes exist for each class of ingredient. Display the highest raw score for each bowler. List for each customer and order date the customer full name and the total cost of items ordered on each date. Which agents booked more than $3,000 worth of business in December, 2012?
Which agents booked more than $3,000 worth of business in December, 2012?
The DATE data type can store dates only dates and times times only all of the above
dates only
Which uses the least amount of storage? 'example' stored in a column of type VARCHAR2(20) 'exam' stored in a column of type VARCHAR2(20) 'ex' stored in a column of type VARCHAR2(20) they all use the same amount of storage
ex' stored in a column of type VARCHAR2(20)
When MySQL automatically converts one data type to another, it's known as a/an ______________________ conversion. implicit explicit cast format
implicit
Numbers that don't include a decimal point are known as ____________________. float numbers real numbers varchar integers
integers
The ____________________ data types can store large, unstructured data such as text, images, sound, and video. varchar large object image JSON
large object
The ENUM data type stores values that are mutually exclusive. Which choice is not appropriate for the ENUM type? small, medium, large yes, no, maybe mushrooms, sausage, peppers cash, credit, debit
mushrooms, sausage, peppers
The _____________________ of a real number indicates the total number of digits that can be stored in the data type. scale integer precision size
precision
Numbers that include a decimal point are knows as ____________________. float numbers real numbers varchar integers
real numbers
The WHERE and HAVING clauses use a ________________ to determine whether a row will be included in the final result set. search condition value expression column expression correlation name
search condition
Grouping data with aggregate functions enables you to see ____________ for categories of data. subtotals individual values grand total
subtotals
The DATETIME data type includes not only the date, but also a ________________________. location timezone altitude time
time
The default date format for MySQL is _________________. mm/dd/yy mon-dd-yyyy yyyy-mm-dd yy/dd/mm
yyyy-mm-dd
When does the WHERE clause act on rows? During the grouping of rows After the rows have been grouped Before the rows are grouped
Before the rows are grouped
Columns referenced in the WHERE clause must be a part of what? Tables defined in the FROM clause. The columns referenced in the SELECT clause. The columns used in aggregate functions. The columns referenced in the ORDER BY clause.
Tables defined in the FROM clause.
Some database systems require the columns in a column expression to be referenced in the GROUP BY clause in which manner? The column expression is referenced by the correlation name. The columns are referenced in the exact same manner they are referenced in the column expression. The column expression is referenced by its relative column number starting with 1 for the first column.
The columns are referenced in the exact same manner they are referenced in the column expression.