Question: SQL Question 1 When coded within a SELECT clause, which TOP clause will return a result set consisting of the ten largest InvoiceNumbers? a. TOP

SQL

Question 1

When coded within a SELECT clause, which TOP clause will return a result set consisting of the ten largest InvoiceNumbers?

a.

TOP InvoiceNumber, InvoiceTotal

b.

TOP 10 InvoiceTotal

c.

TOP 10 InvoiceNumber

d.

TOP 10 PERCENT WITH TIES InvoiceNumber

e.

TOP 10 PERCENT InvoiceNumber

10 points

Question 2

When coded in a WHERE clause, which search condition will return invoices when PaymentDate is not null and InvoiceTotal is greater than or equal to $500?

a.

NOT (PaymentDate IS NULL AND InvoiceTotal <= 500)

b.

PaymentDate IS NOT NULL OR InvoiceTotal >= 500

c.

PaymentDate IS NOT NULL AND InvoiceTotal >= 500

d.

PaymentDate IS NULL AND InvoiceTotal > 500

10 points

Question 3

When you code an ORDER BY clause, you can specify a

a.

column name or expression

b.

column name or alias

c.

column name, alias, or expression

d.

column name, alias, expression, or column number

10 points

Question 4

The order of precedence for the logical operators in a WHERE clause is

a.

Not, Or, And

b.

And, Or, Not

c.

Not, And, Or

d.

Or, And, Not

10 points

Question 5

Which of the following is not a valid column alias name?

a.

TotalSales

b.

Total

c.

"Total Sales"

d.

Total Sales

10 points

Question 6

Which of the following expressions will not compute 10% of the balance due if balance due is the invoice total minus the credit total minus the payment total?

a.

(InvoiceTotal - (PaymentTotal + CreditTotal)) * 0.10

b.

((InvoiceTotal - PaymentTotal) - CreditTotal) / 10

c.

(InvoiceTotal - PaymentTotal - CreditTotal) / 10

d.

InvoiceTotal - CreditTotal - PaymentTotal / 10

10 points

Question 7

When coded in a WHERE clause, which of the following search conditions will not return a result set that includes all invoices with an InvoiceTotal value of $1000 or less?

a.

InvoiceTotal BETWEEN 0 AND 1000

b.

InvoiceTotal IN (0,1000)

c.

NOT (InvoiceTotal > 1000)

d.

InvoiceTotal <= 1000

10 points

Question 8

Which ORDER BY clause will cause 10 rows to be retrieved from the result set, starting with the 20th row?

a.

ORDER BY InvoiceTotal DESC OFFSET 20 ROWS FETCH FIRST 10 ROWS

b.

ORDER BY InvoiceTotal DESC OFFSET 0 ROWS FETCH NEXT 10 ROWS

c.

ORDER BY InvoiceTotal DESC OFFSET 10 ROWS FETCH FIRST 20 ROWS

d.

ORDER BY InvoiceTotal DESC OFFSET 20 ROWS FETCH NEXT 10 ROWS

10 points

Question 9

When you code a SELECT statement, you must code the four main clauses in the following order

a.

SELECT, FROM, WHERE, ORDER BY

b.

SELECT, WHERE, ORDER BY, FROM

c.

SELECT, FROM, ORDER BY, WHERE

d.

SELECT, ORDER BY, FROM, WHERE

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!