STRUCTURED QUERY LANGUAGE TEST

Progress

1.

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

2.

 Which of the following is the original purpose of SQL?

3.

The result of a SQL SELECT statement is a ______.

4.

 What does a  DML Stand for?

5.

What is the meaning of a Database?

6.

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

7.

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

8.

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

9.

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

10.

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'

11.

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

12.

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

13.

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

14.

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

15.

You can delete a view with _____________ Command.

16.

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

17.

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

18.

The SQL WHERE clause used for 

19.

 Syntax for create a  views is _______

20.

Find the names of the countries whose condition is sunny

21.

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

22.

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

23.

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    

24.

The HAVING clause does which of the following?

25.

Which of the SQL statement is correct?

26.

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

27.

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;

28.

Can you validate the statement?

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

True or False?

29.

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

30.

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

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

31.

What is "Subquery"?

32.

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

33.

Which of the following statements are TRUE regarding subqueries?

34.

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

35.

A subquery in an SQL SELECT statement is enclosed in

36.

How many Primary Keys can have in a table?

37.

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

38.

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

39.

Which key accepts multiple NULL values?

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.

What are the joins available in SQL?

42.

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

43.

List all orders, showing order number, customer name and credit limit of a customer.

Orders Table:  
Order_Number, Customer, Product_Amount
Customers Table:  
Customer_Number, Customer_Name, Credit_Limit

 Which of the below query satisfy the above question?

44.

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

45.

Can you validate the statement?

Alias is used in Joins.

True or False?

46.

Below image depicts:

47.

Which type of join is not desirable for retrieval?

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.

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

Which Join?

50.

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

51.

What values does the count(*) function ignore?

52.

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 ;  

 

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

 

54.

“COUNT” keyword belongs to which categories in MySQL?

55.

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

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 the following query?

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

58.

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

 

59.

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

 

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'