0% found this document useful (0 votes)
41 views3 pages

Advanced SQL Interview Questions Guide

Int 2

Uploaded by

Chaithra Gowda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views3 pages

Advanced SQL Interview Questions Guide

Int 2

Uploaded by

Chaithra Gowda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

AQ interview questions (3rd round)

1. Tell me about your self..


2. Explain your project.
ID Emp name
1
2
3

ID Dept no
1 1
2 1
3 3
1 2

3. Tell me how many records you will get if you do inner join,left outer join ,right outer join and
cross join based on id.
O_id C_id S_id amount date

4. Write a query to get the current year and previous year sales.
5. Write a query to get the year wise sales.
6. What is co-related query? Give a example? Explain?
7. What is cte?
8. What is temp table?
9. Explain how union and union all will work?
10. Do you created any indexes in your project?
11. I have annual income in my table how to get monthly income of each employee.
12. In one table I have information of some employees and in another table I have information of
some employee. I want to put these information into one table .What are all your approaches to
do this.
13. All other questions are about Client Company.

2st round (Santosh)


Queries:
Table A Table B
ID Name Sal ID Dept_ID

1 A 1000 1 1

2 B 2000 2 2

3 C 3000 NULL NULL

4 A 1000 4 3

5 D 3000 5 3

6 B 4000
1. Tell me about yourself?
2. How does your project exactly work?
3. What was your exact role in your project? What are the difficulties you faced?
4. What are joins? And its types? How much records we will get from inner join, left outer
join, right outer join, full outer join, and cross join.
5. Query to get second highest salary and explain flow.
6. Query to get employees which don’t belong to any dept.
7. Query to get running total salary.
8. Display department wise max salary.
9. Display department wise max salary along with name.
10. Query to get min salary without using where clause.
11. Update flag value 0 to 1 and 1 to 0.
12. Difference between primary key and unique key?
13. What is view? Advantages of using view?
14. What is index? Type of index?
15. What are the indexes you know apart from cluster and non-cluster index?
16. Difference between replace and stuff.
17. What is coalesce function?
18. Difference between temp Table and Temp variable?
19. Difference between procedure and function?
20. What is cte? In which scenario we will use cte?
21. What is merge statement? Write the syntax.
22. How to get the last identity records?
23. Explanation about 2nd project?

1st round (Samba)


1. Tell me about yourself?
2. How does your project exactly work?
3. What was your exact role in your project?
4. What are the dimensions and facts you worked on?
5. How you will load the data in to the database?
6. Query to get the customer who got the offers on the 1-jan-2015.(related to my project
tables)

Order_id Order_name Sales Order_date

7. I want the total sales of current year and and the last year and what is the total sales we
will get after differentiating both the years.(Write the Queries in all the different ways and
explain which one will work faster) using derived and cte.
8. Query to get the top two customers in terms of sales using correlated query and join.
9. Write the Function (He asked me to tell the logic what you will use to solve this problem)

/*Take input string as '6, 7, 8, 9, 10’ and put these numbers into rows
Like
6
7
8
9
10*/
10. Difference between correlated query and sub query?
11. When we will use CTE? What are the advantages of using cte?.
12. Difference between cte and derived table?
13. How does the cursor exactly work?
14. What is the life cycle of cursor?
15. What temp table temp variables?
16. What are Acid properties?
17. What is index? And type of index. And difference between them.
18. What is error handling? How u will handle errors in stored procedure?
19. Explanation about 2nd project?
20. Where your client company located?
21. What is the main aim of your life?
22. What you want to know about AQ?
23. Any Questions?

You might also like