STRUCTURED QUERY LANGUAGE TEST

Progress

1.

Which of the following is a valid SQL type?

2.

To delete the database __________ Command is used

3.

Which file type is used for database backup?

4.

Which of the following database cannot be dropped?

5.

 Which of the following is the original purpose of SQL?

6.

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

7.

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?

8.

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

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

9.

The SQL WHERE clause used for 

10.

Which of the SQL statement is correct?

11.

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

12.

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

13.

Analyze the following Query and Mark the answer whether it's a correct query or not?

Select OrderID, Shipdate
From Orders  
Where CustomerID=20
Order by Shipdate;

14.

You can delete a view with _____________ Command.

15.

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

16.

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

17.

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

18.

We can use one table to create another table using the below query. True or False ?

CREATE TABLE TestTable AS

SELECT customername, contactname

FROM customers;

19.

Can you validate the statement?

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

True or False?

20.

Find all the cities whose humidity is 89

21.

Find the name of these cities with temperature and condition whose condition is neither sunny nor cloudy

22.

Which one is not used in SQL?

23.

The _______ clause allows us to select only those rows in the result relation of the ____ clause that satisfy a specified predicate.

24.

What is the meaning of the “ORDER BY” clause in MySQL?

25.

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    

26.

You need to find out the names of all employees who belong to the same department as the employee 'Jessica Butcher' who is in department 100 and has an employee ID 40. Which of the following queries will be correct?

27.

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''?

28.

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

29.

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

30.

The HAVING clause does which of the following?

31.

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

32.

Which of the following statement(s) is TRUE regarding subqueries?

33.

Can you validate the statement?

An ORDER BY can be used in a subquery.

True or False?

34.

Can you validate the statement?

A subquery can be used anywhere an expression is allowed.

True or False?

35.

Which of the following statements are TRUE regarding subqueries?

36.

Can you validate the statement?

A table contains more than one foreign key

True or False?

37.

Does an Index help to speed up?

38.

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

39.

A ______ index is created based on only one table column.

40.

Which one of the following can be taken as a Primary Key?

41.

Where are Joins used?

42.

Can you validate the statement?

Join is different from Inner join.

True or False?

43.

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

44.

Below image depicts:

45.

What are the joins available in SQL?

46.

Can you validate the statement?

Alias is used in Joins.

True or False?

47.

How many tables may include with a join? 

48.

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? 

49.

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

 

50.

Which type of join is not desirable for retrieval?

51.

The SQL Statement

SELECT ROUND(45.926, -1) FROM DUAL;

52.

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

 

53.

Which of the following set of operations is a valid set of Aggregate operations in SQL?

54.

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

55.

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

 

56.

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

57.

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 ;  

 

58.

Use below table (Salesemployee)  and answer the following question

What is the output of the following query?

SELECT SUM(Salary) from Salesemployee     
WHERE Gender = 'Male';      
        

59.

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

 

60.

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

 

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