STRUCTURED QUERY LANGUAGE TEST

Progress

1.

Which one is a non-relational database?

2.

Which is the subset of SQL command used to manipulate Database structures, including tables?

3.

Which of the following database cannot be dropped?

4.

 Which of the following is the original purpose of SQL?

5.

What is the meaning of a Database?

6.

With SQL, how do you select all the records from a table named "Persons" where the value of the column "Firstname" ends with an ''a''?

7.

Which SQL Query is used for updating the ContactName in the Customers table?

8.

If emp_id contains the following set {-1, -2, 2, 3, -3, 1}, what will be the output on the execution of the following MySQL statement?

SELECT emp_id
FROM person
ORDER BY emp_id;

9.

Select ID, name, dept name, salary * 1.1 where instructor;

The query given below will not give an error. Which one of the following has to be replaced to get the desired output?

10.

Select two options which do not belong to the Purpose of Delete

11.

Find the names of the countries whose condition is sunny

12.

Which SQL keyword is used to sort the result-set?

13.

Select ID, GPA from student grades order by GPA ____________.

In order to give only 10 ranks, on the whole, we should use.

14.

What is the significance of the statement “HAVING COUNT (emp_id)>2” in the following MySQL statement?

SELECT d.name, COUNT (emp_id) emp_no  
FROM department d INNER JOIN Employee e  
ON d.dept_id=e.emp_id      
GROUP BY d.name      
HAVING COUNT (emp_id)>2    

15.

Find all the cities whose humidity is 89

16.

Which of the SQL statement is correct?

17.

Can you validate the statement?

"ORDER BY" can only be used by WHERE Clause.

True or False?

18.

What is the significance of the statement “GROUP BY d.name” in the following MySQL statement?

SELECT d.name, COUNT (emp_id) emp_no  
FROM department d INNER JOIN Employee e
ON d.dept_id=e.emp_id    
GROUP BY d.name    

19.

If you don't specify ASC or DESC after a SQL ORDER BY clause, the following is used by default

20.

The SQL WHERE clause used for 

21.

Which command is used to change the definition of a table in SQL ?

22.

With SQL, how can you return all the records from a table named "Persons" sorted descending by "FirstName"?

23.

Identify the average salary of the jobs 'MANAGER' and 'ANALYST'. Display job, average salary if the identified average salary is more than 1500.

24.

What can be the condition in the "WHERE" clause in a SQL query?

25.

How to create index idx_pname for multiple columns (Lastname, Firstname) in a Person table?

26.

What is the meaning of the “HAVING” clause in MySQL?

27.

 Syntax for create a  views is _______

28.

How to delete the Customer name of Alfreds Futterkiste (CustomerID is 1) from the Customers table?

29.

The HAVING clause does which of the following?

30.

What is the significance of “ORDER BY” in the following MySQL statement?

SELECT emp_id, fname, lname  
FROM person    
ORDER BY emp_id;  

31.

Which of the following multi-row operators can be used with a sub-query?

32.

Which of the following clause is mandatorily used in a sub-query?

33.

Which of the following is true about sub-queries?

34.

Where subqueries can not be used?

35.

Which of the following operators cannot be used in a sub-query?

36.

Which of the following do you need to consider when you make a table in SQL?

37.

Does an Index help to speed up?

38.

Which of the following is not a Key in SQL Server?

39.

Which of the following is correct DROP INDEX Command?

40.

Can you validate the statement?

A table contains more than one foreign key

True or False?

41.

What are the joins available in SQL?

42.

 In which two cases would you use an outer join? (Choose two.)

43.

Analyze the following tables and output and choose the correct query to achieve the output.

 

44.

Can you validate the statement?

Alias is used in Joins.

True or False?

45.

Evaluate this SQL statement:

SELECT employee_id, e.department_id, department_name, salary
FROM employees e, departments d  
WHERE e.department_id = d.department_id;  

Which SQL statement is equivalent to the above SQL statement? 

46.

Analyze the following tables and output and choose the correct query to achieve the output.

47.

Can you validate the statement?

Join is different from Inner join.

True or False?

48.

Choose the correct query for the below scenario.

 

49.

Where are Joins used?

50.

Which type of join is not desirable for retrieval?

51.

Use below table (Salesemployee) and answer the following question
What is the output of following query?
SELECT MIN(Salary) from Salesemployee 
WHERE Gender = 'Female';  

 

52.

Use below table (Salesemployee) and answer the following question
What is the output of following query ?
SELECT AVG(Salary) from Salesemployee 
WHERE Gender = 'Female';  

 

53.

Use below table (Salesemployee) and answer the following question
What is the output of following query ?
SELECT COUNT(*) from Salesemployee 
WHERE Employee_ID % 2 <> 0 ;  

 

54.

The SQL Statement

SELECT ROUND(45.926, -1) FROM DUAL;

55.

Use below table (Salesemployee) and answer the following question
What is the output of following query ?
SELECT SUM(Salary) from Salesemployee 
where Name = 'Tom';  

 

56.

Use below table (Salesemployee) and answer the following question
What is the output of following query ?
SELECT Count(*) from Salesemployee 
WHERE Gender = 'Male';  

 

57.

Use below table (Salesemployee) and answer the following question
What is the output of following query ?
SELECT Count(Salary) from Salesemployee 
where name Like 'S%';

 

58.

Use below table (Salesemployee) and answer the following question
What is the output of following query ?
SELECT AVG(Salary) from Salesemployee 
where Dept = ' HR';    

 

59.

Use below table (Salesemployee) and answer the following question
What is the output of following query ?
SELECT MAX(Salary) from Salesemployee 
WHERE Salary >=2500 and Dept = 'Sales' ;

 

60.

What values does the count(*) function ignore?

Assessment complete! Thank you for you time.
We are redirecting you to the result page, Please click on 'SUBMIT'