Search Header Logo

CBTIS SQL Queries basicos

Authored by Dolores Justo

Information Technology (IT)

11th Grade

Used 4+ times

CBTIS SQL Queries basicos
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

11 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

¿Cuál de las siguientes consultas muestra el first_name, last_name y gender de los pacientes cuyo gender es 'M'?

A) SELECT first_name, last_name FROM patients WHERE gender = 'M';

B) SELECT first_name, last_name, gender FROM patients WHERE gender = 'M';

C) SELECT * FROM patients WHERE gender = 'M';

D) SELECT name, gender FROM patients WHERE gender = 'M';

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

¿Cómo seleccionas el first_name y last_name de los pacientes que no tienen alergias registradas (allergies es NULL)?

A) SELECT first_name, last_name FROM patients WHERE allergies = '';

B) SELECT first_name, last_name FROM patients WHERE allergies = NULL;

C) SELECT first_name, last_name FROM patients WHERE allergies IS NULL;

D) SELECT first_name, last_name FROM patients WHERE allergies != NULL;

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

3️⃣ ¿Cuál es la consulta correcta para mostrar el first_name de los pacientes cuyo first_name comienza con la letra 'C'?

A) SELECT first_name FROM patients WHERE first_name LIKE '%C';

B) SELECT first_name FROM patients WHERE first_name LIKE 'C%';

C) SELECT first_name FROM patients WHERE first_name = 'C*';

D) SELECT first_name FROM patients WHERE first_name STARTS 'C';

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

¿Qué consulta selecciona los pacientes cuyo weight está en el rango de 100 a 120 (inclusive)?

A) SELECT first_name, last_name FROM patients WHERE weight >= 100 AND weight <= 120;

B) SELECT first_name, last_name FROM patients WHERE weight BETWEEN 100 TO 120;

C) SELECT first_name, last_name FROM patients WHERE weight > 100 AND weight < 120;

D) SELECT first_name, last_name FROM patients WHERE weight = (100,120);

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

5️⃣ ¿Cuál es la forma correcta de actualizar la columna allergies, reemplazando los valores NULL por 'NKA'?

A) UPDATE patients SET allergies = 'NKA' WHERE allergies IS NULL;

B) UPDATE patients WHERE allergies IS NULL SET allergies = 'NKA';

C) MODIFY patients SET allergies = 'NKA' WHERE allergies IS NULL;

D) UPDATE patients SET allergies = NULL WHERE allergies = 'NKA';

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

6️⃣ ¿Cómo se concatenan first_name y last_name en una sola columna para mostrar el nombre completo?

A) SELECT first_name + ' ' + last_name FROM patients;

B) SELECT CONCAT(first_name, ' ', last_name) FROM patients;

C) SELECT first_name || last_name FROM patients;

D) SELECT CONCATENATE(first_name, last_name) FROM patients;

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

7️⃣ ¿Cómo mostrarías el first_name, last_name y el nombre de la provincia (province_name) de cada paciente?

A) SELECT first_name, last_name, province_name FROM patients;

B) SELECT first_name, last_name, province_name FROM patients JOIN province_names;

C) SELECT first_name, last_name, province_name FROM patients JOIN province_names ON patients.province_id = province_names.province_id;

D) SELECT first_name, last_name, province_names FROM patients;

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?