STRUCTURED QUERY LANGUAGE TEST

Progress

1.

Which one is a non-relational database?

2.

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

3.

Which of the following is not a database object?

4.

Which one is not part of the Database backup file?

5.

Which of the following is a valid SQL type?

6.

Select ________ dept_name from instructor; 

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

7.

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

8.

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

9.

Find the names of the countries whose condition is sunny

10.

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

11.

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

12.

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

13.

Find all the cities whose humidity is 89

14.

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

15.

Which one is not used in SQL?

16.

The HAVING clause does which of the following?

17.

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          

18.

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    

19.

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

20.

The SQL WHERE clause used for 

21.

You can delete a view with _____________ Command.

22.

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;

23.

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

24.

 Syntax for create a  views is _______

25.

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?

26.

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

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

27.

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

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.

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

30.

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

31.

Can you validate the statement?

An ORDER BY can be used in a subquery.

True or False?

32.

Which of the following is true about sub-queries?

33.

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

34.

Can you validate the statement?

A subquery can be used anywhere an expression is allowed.

True or False?

35.

Which of the following multi-row operators can be used with a sub-query?

36.

Can you validate the statement?

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

True or False?

37.

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

38.

Which of the following is correct DROP INDEX Command?

39.

Which of the following is not a Key in SQL Server?

40.

Student (ID, Name, Dept_name, Total_credit)

In this above query which attribute form the Primary Key?

41.

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

 

42.

Where are Joins used?

43.

Choose the query that matches the above image.

44.

How many tables may include with a join? 

45.

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?

46.

Can you validate the statement?

Alias is used in Joins.

True or False?

47.

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

48.

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

49.

What are the joins available in SQL?

50.

What is the syntax for joining two tables? Pick Two

51.

The SQL Statement

SELECT ROUND(45.926, -1) FROM DUAL;

52.

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

 

53.

Which SQL keyword is used to retrieve the highest value? 

54.

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

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

 

57.

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

 

58.

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

 

59.

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

60.

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

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