• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 2 fuera de 15 páginas
Examen

SQL Topic and Exam elaborations

Document preview thumbnail
Vista previa 2 fuera de 15 páginas

SQL Topic and Exam elaborations 9. 9. The SQL command WHERE does which of the following? a. Indicates the tables to be used in the query b. Lists the names of the fields to be displayed on the screen c. Limits the records to only those meeting the test condition(s) d. All of the above: c. Limits the records to only those meeting the test condition(s) 10. 10. Why will these two queries return different averages? SELECT AVG(unitprice - unitcost) FROM cts

Vista previa del contenido

SQL Topic and Exam elaborations


1. 1. Which SQL clause comes immediately after SELECT?: C. WHERE
2. 2. If a query against database CC3 includes the clause, WHERE description
= 'Express Care', which of the following is true?
a. description must be included in the SELECT
b. cc3.types must be included in the FROM
c. GROUP BY description must also be included
d. None of these
*Note that cc3.types could have been included in the JOIN instead of FROM: d. None of these
*Note that cc3.types could have been included in the JOIN instead of FROM
3. 3. Which table allows you to reference ethnicities by their name in CC4 when you include it in the
FROM or JOIN clause?
a. hispanic
b. survey
c. ethkey
d. ethnicity: c. ethkey
4. 4. The DISTINCT command:
a. Is used to compare fields that have similar values
b. Aggregates results based on DISTINCT fields
c. Results in unique values of SELECT fields
d. Separates fields based on the WHERE conditions: c. Results in unique values of SELECT fields
5. 5. Including the table name with the field name (e.g. using products.produc- tid instead of just
productid) is necessary when:
a. The field is a primary key field
b. The field name appears in more than one table that is part of the query
c. The field is in a JOIN clause after ON
d. The field is in a WHERE clause: b. The field name appears in more than one table that is
part of the query
6. 6. When present, the clause should be the
final clause in an SQL query.
a. GROUP BY
b. WHERE
c. HAVING
d. ORDER BY: d. ORDER BY
7. 7. Which of the following queries will return the all the sample Cleveland Clinic website
searches that contained 'CT' (as in CT scan) whether the user entered 'CT' or 'ct' or 'Ct' or 'cT'?
a. WHERE UPPER(search) = 'CT'






, SQL Topic and Exam elaborations


b. WHERE UPPER(search) LIKE 'CT'
c. WHERE UPPER(search) LIKE '%CT%'
d. WHERE search LIKE UPPER('%CT%'): c. WHERE UPPER(search) LIKE '%CT%'
8. 8. SQL is an acronym for:
a. Standard Questioning Language
b. Structured Query Language
c. Simple Query Language
d. Structured Questioning Language: b. Structured Query Language
9. 9. The SQL command WHERE does which of the following?
a. Indicates the tables to be used in the query
b. Lists the names of the fields to be displayed on the screen
c. Limits the records to only those meeting the test condition(s)
d. All of the above: c. Limits the records to only those meeting the test condition(s)
10. 10. Why will these two queries return different averages?
SELECT AVG(unitprice - unitcost) FROM
northwinds.products

SELECT AVG(orderdetails.unitprice - unitcost) FROM
northwinds.orderdetails
JOIN northwinds.products on products.productid = orderdetails.productid
a. They will not return different averages
b. Neither will return an average because a GROUP BY is missing
c. Because products contains actual sales prices and orderdetails contains retail prices
d. Because orderdetails contains actual sales prices and products contains retail prices: d.
Because orderdetails contains actual sales prices and products contains retail prices
11. 11. cc2 is the name of a .
a. Field
b. Database
c. Table
d. Record: b. Database
12. 12. The error message "column ambiguously defined" means:
a. Unaggregated and aggregated fields were used without proper grouping
b. A field or table name was misspelled
c. There is an improper equation or comparison
d. The query includes a field with the same name as a field in another joined

Información del documento

Subido en
9 de diciembre de 2024
Número de páginas
15
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas
$9.49

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
smartchoices
4.8
(9)
Vendido
39
Seguidores
5
Artículos
4500
Última venta
1 mes hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes