Question 1 (2 marks)
Which of the following is an aggregate expression that will find the oldest date in the
invoiceDate column?
1. MIN(invoiceDate)
2. MAX(invoiceDate)
3. HIGH(invoiceDate)
4. LOW(invoiceDate)
Question 2 (2 marks)
Which of the following LIMIT clauses will return a maximum o...
, PLEASE USE THIS DOCUMENT AS A GUIDE TO ANSWER YOUR ASSIGNMENT
Please note that the author of this document will not responsibility for any plagiarizing you
commit.
1. Which of the following is an aggregate expression that will find the oldest date in the
invoiceDate column?
A) MIN(invoiceDate)
B) MAX(invoiceDate)
C) HIGH(invoiceDate)
D) LOW(invoiceDate)
To find the oldest date in the invoiceDate column, you would use the MIN(invoiceDate) aggregate
function. This function returns the smallest value in a column, which for date columns would be the
earliest date.
2. Which of the following LIMIT clauses will return a maximum of five rows starting with the
eleventh row in the result set?
A) LIMIT 10, <= 5
B) LIMIT 11, <= 5
C) LIMIT 10, 5
D) LIMIT 11, 5
This clause tells SQL to skip the first 10 rows and then return up to 5 rows starting from the 11th row.
3. When coded in a WHERE clause, which search condition will return invoices when
paymentDate isn’t null and invoiceTotal is greater than or equal to 500?
A) paymentDate IS NULL AND invoiceTotal > 500
B) paymentDate IS NOT NULL OR invoiceTotal >= 500
C) NOT (paymentDate IS NULL AND invoiceTotal <= 500)
D) paymentDate IS NOT NULL AND invoiceTotal >= 500
This condition ensures that both criteria are met: paymentDate must not be null and invoiceTotal must
be at least 500.
4. Which of the following is not a comparison operator in a SQL statement?
A) < >
B) !=
C) =
D) >
“=” is an assignment operator used to assign a value to a variable, rather than comparing values.
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 Aimark94. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $2.85. You're not tied to anything after your purchase.