STRUCTURED QUERY LANGUAGE TEST

Progress

1.

What is the meaning of a Database?

2.

Which of the following database cannot be dropped?

3.

Which of the following is not a database object?

4.

What is the full form of SQL?

5.

Which one is not part of the Database backup file?

6.

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

7.

The SQL WHERE clause used for 

8.

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

9.

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

10.

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

11.

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

12.

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

13.

Which of the SQL statement is correct?

14.

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

15.

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

16.

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

17.

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    

18.

Select ________ dept_name from instructor; 

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

19.

 Syntax for create a  views is _______

20.

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'

21.

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

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

22.

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

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

23.

Find all the cities whose humidity is 89

24.

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?

25.

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

26.

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          

27.

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;

28.

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

29.

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

30.

The HAVING clause does which of the following?

31.

A subquery in an SQL SELECT statement is enclosed in

32.

What is "Subquery"?

33.

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

34.

Which of the following statements are TRUE regarding subqueries?

35.

Can you validate the statement?

A subquery can be used anywhere an expression is allowed.

True or False?

36.

How many types of indexes are there in the SQL server?

37.

Can you validate the statement?

A column with a Primary key has a Null value.

True or False?

38.

Can you validate the statement?

A column with a Unique key has duplicate values.

True or False?

39.

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

40.

By default, which key creates Clustered index?

41.

What are the joins available in SQL?

42.

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?

43.

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

44.

Can you validate the statement?

Join is different from Inner join.

True or False?

45.

What is the syntax for joining two tables? Pick Two

46.

Below image depicts:

47.

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

48.

How many tables may include with a join? 

49.

Where are Joins used?

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 Count(*) from Salesemployee 
WHERE Salary >500;  

 

53.

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

54.

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

 

55.

“COUNT” keyword belongs to which categories in MySQL?

56.

Which of the following is incorrect SQL?

57.

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 ;    

 

58.

Which SQL keyword is used to retrieve the highest value? 

59.

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

 

60.

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

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