STRUCTURED QUERY LANGUAGE TEST

Progress

1.

Which one is a non-relational database?

2.

In SQL, which command is used to change a table's storage characteristics?

3.

Which of the following database cannot be dropped?

4.

What is the SQL query used to retrieve all the data from the customer table?

5.

Which of the following is not a database object?

6.

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    

7.

Can you validate the statement?

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

True or False?

8.

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

9.

Which of the SQL statement is correct?

10.

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

11.

Which one is not used in SQL?

12.

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;

13.

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

SELECT Name, Age, Firstname, Lastname
FROM EMPLOYEE     
GROUP BY NAME, SALARY;  

14.

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

15.

The SQL WHERE clause used for 

16.

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;

17.

What is the significance of the statement of the below query?

SELECT branch_name, COUNT (DISTINCT customer_name)     
FROM depositor, account           
WHERE depositor.account_number = account.account_number   
GROUP BY branch_id          

18.

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

19.

Which of the following query is correct for selecting the name of the staff from ''staffinfo'' table where salary is 10000 or 25000?

20.

Find all the cities whose humidity is 89

21.

Find the names of the countries whose condition is sunny

22.

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

23.

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

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

24.

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?

25.

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

26.

The HAVING clause does which of the following?

27.

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

28.

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

29.

You can delete a view with _____________ Command.

30.

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

select deptName
from Employee
having avg (salary)
group by deptName
where sex = 'M'

31.

What is "Subquery"?

32.

Which of the following statements are TRUE regarding subqueries?

33.

A subquery in an SQL SELECT statement is enclosed in

34.

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

35.

Which of the following is true about sub-queries?

36.

Can you validate the statement?

A table contains more than one foreign key

True or False?

37.

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

38.

How many Primary Keys can have in a table?

39.

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

40.

Can you validate the statement?

We can use the index on columns that contain a high number of NULL values.

True or False?

41.

In the absence of WHERE condition this JOIN will function like a _______.

42.

Statement: Join for each row of one table to every row of another table.

Which Join?

43.

Below image depicts:

44.

Can you validate the statement?

Alias is used in Joins.

True or False?

45.

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

46.

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

47.

What are the joins available in SQL?

48.

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

 

49.

What is the function of Full Outer Join in SQL?

50.

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

51.

Which SQL keyword is used to retrieve the highest value? 

52.

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

 

53.

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%' and Dept ='HR';

 

54.

What values does the count(*) function ignore?

55.

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

 

56.

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

 

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 'T%';  

 

58.

Which among the following belongs to an “aggregate function”?

59.

In SQL - these functions - AVG, MIN, MAX, COUNT are called as ___________

60.

The _____ aggregation operation adds up all the values of the attribute

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