STRUCTURED QUERY LANGUAGE TEST

Progress

1.

What is the meaning of a Database?

2.

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

3.

 What does a  DML Stand for?

4.

 Which of the following is the original purpose of SQL?

5.

Which one is a non-relational database?

6.

The HAVING clause does which of the following?

7.

 Syntax for create a  views is _______

8.

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

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

9.

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

10.

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;

11.

Select ________ dept_name from instructor; 

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

12.

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

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

13.

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'

14.

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

15.

You can delete a view with _____________ Command.

16.

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

17.

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

18.

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

19.

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?

20.

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

21.

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

22.

Find all the cities whose humidity is 89

23.

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

24.

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

25.

The SQL WHERE clause used for 

26.

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

27.

Which one is not used in SQL?

28.

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;

29.

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

30.

Can you validate the statement?

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

True or False?

31.

Can you validate the statement?

An ORDER BY can be used in a subquery.

True or False?

32.

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

33.

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

34.

Where subqueries can not be used?

35.

Which of the following is true about sub-queries?

36.

A Key which is a set of one or more columns that can identify a record uniquely is called?

37.

Student (ID, Name, Dept_name, Total_credit)

In this above query which attribute form the Primary Key?

38.

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

39.

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

40.

How many Primary Keys can have in a table?

41.

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?

42.

Which type of join is not desirable for retrieval?

43.

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

44.

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

45.

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

 

46.

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

47.

How many tables may include with a join? 

48.

What are the joins available in SQL?

49.

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

Which Join?

50.

Choose the query that matches the above image.

51.

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

 

52.

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

 

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.

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

55.

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

 

56.

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

 

57.

Which SQL keyword is used to retrieve a maximum value?

58.

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

 

59.

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

60.

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 ;  

 

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