Quiz 2 Intro to Database

Quiz 2 Intro to Database

1st Grade

10 Qs

quiz-placeholder

Similar activities

AV1/R1 3TEC_Banco de Dados - Chave Primária

AV1/R1 3TEC_Banco de Dados - Chave Primária

1st Grade - University

15 Qs

Gestió de Bases de Dades (Tema3)

Gestió de Bases de Dades (Tema3)

1st Grade

14 Qs

Computer parts

Computer parts

KG - 5th Grade

15 Qs

PROBLEM SOLVING PART1 -D1M2T2

PROBLEM SOLVING PART1 -D1M2T2

1st - 5th Grade

15 Qs

SQL Programming

SQL Programming

1st - 3rd Grade

15 Qs

Деректер базасы

Деректер базасы

1st - 5th Grade

10 Qs

SQL Comandos

SQL Comandos

1st Grade

12 Qs

BE 4 UPS1-D1M3T11

BE 4 UPS1-D1M3T11

1st - 5th Grade

15 Qs

Quiz 2 Intro to Database

Quiz 2 Intro to Database

Assessment

Quiz

Computers

1st Grade

Hard

Created by

Güray ARIK

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which one is NOT a domain type/data type in SQL?

char

varchar

numeric

class

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which command is CORRECT for creating a table?

create table instructor ( ID char(5), name varchar(20), dept_name varchar(20), salary numeric(8,2))

insert into table instructor ( ID char(5), name varchar(20), dept_name varchar(20), salary numeric(8,2))

create database instructor ( ID char(5), name varchar(20), dept_name varchar(20), salary numeric(8,2))

alter table instructor ( ID char(5), name varchar(20), dept_name varchar(20), salary numeric(8,2))

3.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

insert into instructor values ('10211', 'Smith', 'Biology', 66000);

What does this command?

inserts a new value to instructor table

updates instructor table with new value

inserts a new value to instructor database

changes the value of id 10211

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

I want to find the names of all instructors whose name INCLUDES the substring “dar”

Which one is CORRECT select query?

select name from instructor where name = '%dar%'

select name from instructor where name like 'dar%'

select name from instructor where name like '%dar%'

select name from instructor where name in '%dar%'

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

I want to list in alphabetic order the salary of all instructors with highest to smallest.

Which select query is CORRECT?

select * from instructor order by salary asc

select * from instructor order by salary desc

select * from instructor order by salary

select * from instructor where order by max

6.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Find the total number of instructors who teach a course in the Spring 2018 semester

select count (*) from teaches where semester = 'Spring' and year = 2018;

select max(distinct ID) from teaches where semester = 'Spring' and year = 2018;

select Id from teaches where semester = 'Spring' and year = 2018;

select avg(*) from teaches where semester = 'Spring' and year = 2018;

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

select dept_name, avg (salary) as avg_salary from instructor

group by dept_name

having avg (salary) > 40000;

What does this query do?

Find the department names and total salaries of all departments whose average salary is greater than 40000

Find the department names and average salaries of all departments whose average salary is greater than 40000

it gives error

Find the salaries of all departments whose average salary is smaller than 40000

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?