Tuesday, September 13, 2016

Interview Questions for Companies

In this article I will be posting interview questions by companies. Whenever I am facing any interview or someone shares the question , I will be adding here. 

Sutherland Hyderabad  Telephonic Round
Q.  What is cursor in SQL Server?
Q. Tell me the Difference between Replace and Coalesce functions with examples?
Q. What is objects in SQL server?
Q. What is stored procedures?
Q. Describe your current role and responsibilities?
Q. How to rename a database from script?
Q. Explain Triggers, their types and usage by example?
Q.  What is Identity column?
Q. Describe Relationship types and usage, one to one, not to many,  many to many?
Q. What is Foreign Key and usage?

Capgemini Telephonic 1St Round

 

Q. Explain all types of join with example?

Q. What will be the output when you have null values in joining column and what will be the output for all the joins type?

Q. Explain rank and dense_rank function and difference between them ?

Q. what is row_number , explain with example ?

Q. Explain sql server range function ?

Q. How execution plan being generated for Static and dynamic Sql Script ?


Q. Which is better Static or dynamic Sql Script ? Give example when you will use Static and when to use dynamic sql.


Capgemini Telephonic 2nd Round ( client call Morgan Stanley) 

Q. We have one container,  one 3 liter jug and 5 liter jug. How we can measure 1 and 4 liter? 
Q. There are four person,  two adults and two kids standing rever side.  There is a boat, which can hold one adult or two kids. How they can cross the river. 
Q. Suppose our application is running very slow,  how you will approach the problem.  Explain the steps how you will find the route cause. 
Q. Explain query optimization and execution plan. 
Q. Are you willing to learn new technologies? 
23rd September 2016

Deloitte Bangalore

Interview process consist of four rounds, one written test and three rounds of interviews.
Most of the technical discussion is based on written test. Here is the questions which I remember.
Q1. Write a query to calculate cumulative sum (running total) of employee salary.
EmpID                   Salary
1                                             15  
2                                             25
3                                             100
4                                             NULL
5                                             50
6                                             NULL
Expected output is –
EmpID                   RunningTotal
1                                             15  
2                                             40                  
3                                             140
4                                             140
5                                             190
6                                             190
Q2. We have Employee table and a column name gender. Here gender is represented as M and F. Write query to replace M with ‘Male’ and F with ‘Female’, with a single Update statement.
Q3. Explain slowly changing dimensions and their types.
Q4. Explain the difference between having clause and where.
Q5. If a column alias is used in where clause, does it work and why?
Select E.Name as ‘EmpName’, E.Salary as ‘EmpSalary’
From Employee E
Where  EmpSalary>5000
Q6. Design database schema for Facebook events and response.
Q7. Explain star and snowflake schema.
Q8. What are the advantages and disadvantages of snowflake schema?
Q9. Explain the database schema of your current project (high level) and design the
Data warehouse for it.