DATA 2100 MIDTERM EXAM QUESTIONS
AND ANSWERS
Based on the above image of a small transaction dataset, which customer's
transaction(s) could be a duplicate transaction? - ANSWER Sarah Abbey
A dataset contains data about distances between gas stations in a rural town in
Montana. The distances are recorded in feet, miles, and sometimes yards. This
is an example of a problem regarding which data quality characteristic? -
ANSWER Consistency
In a SELECT query, what is the purpose of the HAVING clause? - ANSWER
To limit groups returned by aggregate functions
Given the following WHERE clause within a SELECT query, what records will
be outputted when the query is executed? (assume the rest of the query is
written correctly)
WHERE name = '%s%'; - ANSWER Any record where the name was the
exact text "%s%"
If you wanted to write a query that outputted the guest's first and last name, the
region where they're from, and their household income (HHI) if their household
income is greater than $100,000. How would you write the following clauses
for the query? (Also, you would like the output to be sorted by the last name
alphabetically.) - ANSWER SELECT Fname, Lname, Region, HHI
FROM Household H, Guest G
WHERE H.HHID = G.HHID AND HHI > 100000
There is not GROUP BY clause in this query.
There is not a having clause
ORDER BY Lname;
A data dictionary contains...
Group of answer choices - ANSWER A description of each field
If you wanted to write an INSERT statement to add an additional record of data
into the Guest table, how would you write the following clauses? (Please note:
AND ANSWERS
Based on the above image of a small transaction dataset, which customer's
transaction(s) could be a duplicate transaction? - ANSWER Sarah Abbey
A dataset contains data about distances between gas stations in a rural town in
Montana. The distances are recorded in feet, miles, and sometimes yards. This
is an example of a problem regarding which data quality characteristic? -
ANSWER Consistency
In a SELECT query, what is the purpose of the HAVING clause? - ANSWER
To limit groups returned by aggregate functions
Given the following WHERE clause within a SELECT query, what records will
be outputted when the query is executed? (assume the rest of the query is
written correctly)
WHERE name = '%s%'; - ANSWER Any record where the name was the
exact text "%s%"
If you wanted to write a query that outputted the guest's first and last name, the
region where they're from, and their household income (HHI) if their household
income is greater than $100,000. How would you write the following clauses
for the query? (Also, you would like the output to be sorted by the last name
alphabetically.) - ANSWER SELECT Fname, Lname, Region, HHI
FROM Household H, Guest G
WHERE H.HHID = G.HHID AND HHI > 100000
There is not GROUP BY clause in this query.
There is not a having clause
ORDER BY Lname;
A data dictionary contains...
Group of answer choices - ANSWER A description of each field
If you wanted to write an INSERT statement to add an additional record of data
into the Guest table, how would you write the following clauses? (Please note: