STRUCTURED QUERY LANGUAGE TEST

Progress

1.

 Which of the following is the original purpose of SQL?

2.

Which one is a non-relational database?

3.

Which of the following is not a database object?

4.

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

5.

What is the meaning of a Database?

6.

Select ________ dept_name from instructor; 

Here which of the following displays the unique values of the column?

7.

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

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

8.

Which syntax is used for Drop Index (idx_pname) from the Person table in MYSQL?

9.

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

10.

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

11.

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

12.

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

13.

The SQL WHERE clause used for 

14.

Which of the SQL statement is correct?

15.

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

16.

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

17.

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?

18.

You can delete a view with _____________ Command.

19.

Find all the cities whose humidity is 89

20.

The HAVING clause does which of the following?

21.

 Syntax for create a  views is _______

22.

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

23.

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

24.

Which one is not used in SQL?

25.

Can you validate the statement?

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

True or False?

26.

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;

27.

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

28.

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

29.

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

30.

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    

31.

Which of the following is true about sub-queries?

32.

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

33.

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

34.

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

35.

Where subqueries can not be used?

36.

Can you validate the statement?

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

True or False?

37.

Which key accepts multiple NULL values?

38.

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

39.

How many Primary Keys can have in a table?

40.

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

41.

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

42.

Can you validate the statement?

Join is different from Inner join.

True or False?

43.

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

 

44.

Below image depicts:

45.

Choose the query that matches the above image.

46.

What is the syntax for joining two tables? Pick Two

47.

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

48.

What are the joins available in SQL?

49.

Choose the correct query for the below scenario.

 

50.

Which type of join is not desirable for retrieval?

51.

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

52.

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 ;    

 

53.

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

 

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 SUM(Salary) from Salesemployee ;

 

56.

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

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.

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

59.

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

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'