STRUCTURED QUERY LANGUAGE TEST

Progress

1.

To Create a new database __________ Command is used

2.

What is the full form of SQL?

3.

Which of the following is not a database object?

4.

What is the main language of  Transact-SQL?

5.

Which file type is used for database backup?

6.

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

7.

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

8.

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

9.

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

10.

 Syntax for create a  views is _______

11.

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          

12.

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

13.

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

14.

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    

15.

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

16.

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?

17.

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;  

18.

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

19.

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

20.

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

21.

Select ________ dept_name from instructor; 

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

22.

Find all the cities whose humidity is 89

23.

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

24.

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;

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.

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

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

27.

Which one is not used in SQL?

28.

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

29.

You can delete a view with _____________ Command.

30.

Can you validate the statement?

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

True or False?

31.

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

32.

Where subqueries can not be used?

33.

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

34.

Which of the following is true about sub-queries?

35.

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

36.

Can you validate the statement?

A column with a Primary key has a Null value.

True or False?

37.

Which key accepts multiple NULL values?

38.

Can you validate the statement?

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

True or False?

39.

Can you validate the statement?

A column with a Unique key has duplicate values.

True or False?

40.

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

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.

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

43.

Can you validate the statement?

Alias is used in Joins.

True or False?

44.

Which type of join is not desirable for retrieval?

45.

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

Which Join?

46.

Choose the correct query for the below scenario.

 

47.

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

48.

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

49.

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

50.

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

51.

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

 

52.

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

53.

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

54.

The SQL Statement

SELECT ROUND(45.926, -1) FROM DUAL;

55.

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

 

56.

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

57.

“COUNT” keyword belongs to which categories in MySQL?

58.

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 ;    

 

59.

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

 

60.

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

 

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