STRUCTURED QUERY LANGUAGE TEST

Progress

1.

Which one is not part of the Database backup file?

2.

What is the full form of SQL?

3.

To Create a new database __________ Command is used

4.

The result of a SQL SELECT statement is a ______.

5.

 Which of the following is the original purpose of SQL?

6.

Can you validate the statement?

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

True or False?

7.

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

8.

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    

9.

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

10.

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

11.

Select ________ dept_name from instructor; 

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

12.

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;

13.

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

14.

The SQL WHERE clause used for 

15.

Find all the cities whose humidity is 89

16.

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

17.

You need to find out the names of all employees who belong to the same department as the employee 'Jessica Butcher' who is in department 100 and has an employee ID 40. Which of the following queries will be correct?

18.

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

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.

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

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

21.

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

22.

The HAVING clause does which of the following?

23.

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

24.

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

25.

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          

26.

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

27.

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;

28.

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?

29.

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

30.

Which of the SQL statement is correct?

31.

A subquery in an SQL SELECT statement is enclosed in

32.

Can you validate the statement?

A subquery can be used anywhere an expression is allowed.

True or False?

33.

Where subqueries can not be used?

34.

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

35.

Which of the following is true about sub-queries?

36.

Can you validate the statement?

A column with a Primary key has a Null value.

True or False?

37.

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

38.

Can you validate the statement?

A table contains more than one foreign key

True or False?

39.

Which of the following is correct DROP INDEX Command?

40.

Can you validate the statement?

A column with a Unique key has duplicate values.

True or False?

41.

Can you validate the statement?

Join is different from Inner join.

True or False?

42.

Can you validate the statement?

Alias is used in Joins.

True or False?

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.

How many tables may include with a join? 

46.

Where are Joins used?

47.

What are the joins available in SQL?

48.

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

49.

Which type of join is not desirable for retrieval?

50.

What is the syntax for joining two tables? Pick Two

51.

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

 

52.

The SQL Statement

SELECT ROUND(45.926, -1) FROM DUAL;

53.

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

54.

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

 

55.

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

 

56.

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

57.

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

 

58.

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

59.

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

 

60.

Which SQL keyword is used to retrieve the highest value? 

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