Test
sql 122-181
Crea una cuenta gratis para terminar este test
Guarda tu progreso y consulta tu resultado final.
¿Ya tienes cuenta? Inicia sesión
Preguntas del test (30)
1Consider the EMPLOYEES table. When condition in the WHERE clause limit the employees to IT Programmers with salary greater than 5000?
- AWHERE salary>5000 AND job_id = 'IT_PROG'
- BWHERE salary>5000 OR job_id = "IT_PROG"
- CWHERE salary>5000 AND job_id = IT_PROG
- DWHERE salary>5000 OR job_id = 'IT_PROG'
2Consider the EMPLOYEES table. Which of the following statements displays the date in the 'January, 19 1998'?
- ASELECT TO_CHAR(hire_date,'fmMonth, DD YYYY') FROM employees
- BSELECT TO_DATE(hire_date,'fmMONTH, DD YYYY') FROM employees
- CSELECT TO_DATE(hire_date,'fmMonth, DD YYYY') FROM employees
- DSELECT TO_DATE(hire_date,'fmMON, DD YEAR') FROM employees
3Consider the EMPLOYEES table. Which of the following will generate an error?
- ASELECT job_id, SUM(salary) FROM employees GROUP BY employees
- BSELECT * FROM employees
- CSELECT job_id FROM employees
- DSELECT name FROM employees WHERE name LIKE ‘A%’
4Consider the EMPLOYEES table. Which of the following displays the maximum average salary for each department?
- ASELECT MAX(AVG(salary)) FROM employees GROUP BY department_id
- BSELECT MAX(AVG(salary)) FROM employees
- CSELECT department_id, MAX(AVG(salary)) FROM employees GROUP BY department_id
- DSELECT AVG(MAX(salary)) FROM employees GROUP BY department_id
5Consider the TABLE table. Which of the following conditions in the WHERE clause will generate an error?
- ASELECT name FROM table WHERE COUNT(*) > 5;
- BSELECT name FROM table WHERE name LIKE ‘A%’;
- CSELECT name FROM table WHERE name LIKE ‘__A’;
- DSELECT name FROM table WHERE name LIKE ‘A__%’;
6Constraints always have a name.
- AVerdadero
- BFalso
7How to select a top
- ATOP or LIMIT
- BMAX
- CMIN
- DAVG
8Combining rows from two or more tables
- AJOIN
- BUNION
- CORDER BY
- DGROUP BY
9Combining the result-set of two or more SELECT statements
- AUNION
- BJOIN
- CGROUP BY
- DORDER BY
10GROUP BY is often used with aggregate functions
- AVerdadero
- BFalso
11COUNT, SUM, AVG, MAX, MIN are aggregate functions
- AVerdadero
- BFalso
12COUNT, SUM, TRIM, CONCAT are aggregate functions
- AVerdadero
- BFalso
13WHERE keyword could not be used with aggregate functions
- AVerdadero
- BFalso
14_________ operator is used to test for the existence of any record in a subquery
- AEXISTS
- BUNIQIE
- CIF
- DCASE
15Single line comments start with
- A--
- B/*
- C//
- D$$
16_________ statement is used to speed up searches/queries
- AINDEX
- BAUTO INCREMENT
- CDEFAULT
- DSEARCH
17Write SQL statement for display the department numbers wich more than 5
- ASelect deptno, count(deptno) from emp group by deptno having count(*)>5;
- BSelect deptno, count (deptno) from emp group by deptno having count(*)>5;
- CSelect deptno, count (emp) from deptno group by emp having count(*)>5;
- DSelect deptno, count(deptno) from deptno group by emp having count(*)>5;
18Delete the zip codes 050035 and 050042 from the ZIPCODE table.
- ADELETE FROM zipcode WHERE zip IN ('050035','050042')
- BDELETE FROM zipcode WHERE zip IN ('050000','050000')
- CDELETE FROM zipcode WHERE zip NOT ('050035','050042')
- DDELETE FROM zipcode WHERE zip ANY ('050030','050001')
19The OR operator displays a record if ANY conditions listed are true. The AND operator displays a record if ALL of the conditions listed are true
- AVerdadero
- BFalso
20Which SQL keyword is used to sort the result-set?
- AORDER BY
- BORDER
- CSORT
- DSORT BY
21With SQL, how can you return all the records from a table named "Persons" sorted descending by "FirstName"?
- ASELECT * FROM Persons ORDER FirstName DESC
- BSELECT * FROM Persons SORT 'FirstName' DESC
- CSELECT * FROM Persons ORDER BY FirstName DESC
- DSELECT * FROM Persons SORT BY 'FirstName' DESC
22With SQL, how can you delete the records where the "FirstName" is "Oleg" in the Persons Table?
- ADELETE ROW FirstName='Oleg' FROM Persons
- BDELETE FirstName='Oleg' FROM Persons
- CDELETE FROM Persons WHERE FirstName = 'Oleg'
23With SQL, how can you return the number of records in the "Persons" table?
- ASELECT COUNT(*) FROM Persons
- BSELECT LEN(*) FROM Persons
- CSELECT COLUMNS(*) FROM Persons
- DSELECT NO(*) FROM Persons
24The NOT NULL constraint enforces a column to not accept null values.
- AVerdadero
- BFalso
25______ clause can be used and is required in the subquery to perform Top-N analysis.
- AORDER BY
- BHAVING
- CGROUP BY
- DWHERE
26Consider the EMPLOYEES table. Which of the following statements count the number of employees within each department?
- ASELECT department_id, COUNT(last_name) FROM employees GROUP BY department_id
- BSELECT department_name, COUNT(last_name) FROM employees GROUP BY department_id
- CSELECT department_id, department_name, COUNT(last_name) FROM employees GROUP BY department_id
- DSELECT department_id, COUNT(last_name) FROM departments GROUP_BY last_name
27Consider the EMPLOYEES table. Which of the following SQL statements is correct to provide the sentence in the format "King has been working since 01.01.1987"?
- ASELECT last_name ||'has been working since' || hire_date FROM employees;
- BSELECT last_name ||'has been working since' || hire_date "Employee Information" FROM employees;
- CSELECT last_name |'has been working since' | hire_date FROM employees;
- DSELECT last_name // ”has been working since” // hire_date FROM employees;
28A SELECT statement that is embedded in a clause of another SELECT statement is called
- ASubquery
- BMain query
- CInner query
- DOuter query
29A subquery must be enclosed in _________ .
- AParantheses
- BBraces
- CDouble quotes
- DSingle quotes
30A table can be created with or without data
- AVerdadero
- BFalso
Información
- Descripción
- Test sobre sql 122-181, creado por Khamit Zhussip el 22/12/2019.
- Autor
- Khamit Zhussip
- Idioma
- English
- Visitas
- 10
- Valoración
- Aún sin valoraciones Valora este test