ITM 209: SQL Exam Questions And Answers
Latest Update 2024/2025
The difference between a data lake and a data warehouse is: Answer: Data lakes store data in 'raw'
form (i.e. the original form). Data warehouses typically store data that has been extracted
Text in a novel is an example of structured data
TRUE/FALSE Answer: False
Which of the following is true regarding this query:
select
customer.name,
payment.date,
payment.amount,
from customer
left join payment on
customer.customerID = payment.customerID
order by customer.name asc, payment.data desc;
1: The results will be ordered by payment data and then by customer name
2: The results will show all customers, even if they have not made any payments
3: Customer John Adams will appear in the results before Jim Beasley
4: The results will only show customers who have made payments Answer: 2: The results will show
all customers, even if they have not made any payments
,Which of the following is used in a SQL statement where clause to show all records where a particular
attribute has null values
is null
= null
is empty
> null Answer: is null
Alex is conducting a query against a database of customers. The query counts the number of customer
in each city [count.customers.customerID)]. There is also a field for state. He wants to filter for cities
that have over 10 customers in Michigan.
What would be the correct code for this Answer: WHERE customers.state = "MI'
GROUP BY customers.city
HAVING count(customers.customerID) > 10
Match the following with the correct business analytics:
____ What will our sales be next quarter?
____ Should we make or buy an expensive part for our machines?
____ Did we make a profit last year?
1. Descriptive Analytic
2. Diagnostic Analytic
3. Predictive Analytic
, 4: Prescriptive Analytic Answer: 3 Predictive
4 Prescriptive
1 Descriptive
Jill has been asked to identify the number of invoices in a database that match certain criteria. Which
should she use in her query?
num( )
sum( )
count( )
avg( ) Answer: count( )
Mel is the owner of a campground in MI. It has a database containing the campers and their
reservations. Each reservation has an attribute for the number of nights. A camper can have many
reservations. Mel wants to filter for campers that reserved more than 10 nights during the year. Which
is the correct clause?
where sum(reservations.nights) >10
where count(reservations.nights) >10
having sum(reservations.nights) >10
with count(reservations.nights) >10
group by avg(reservations.nights) >10 Answer: having sum(reservations.nights) >10
Which of the following is an example of prescriptive analytics?
1: An energy company analyzing the top reasons for power outages over the past 5 years
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller Schoolflix. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $11.99. You're not tied to anything after your purchase.