Cognizant interview question

### SQL: 1. **Basic Queries:** - How do you write a SQL query to retrieve all records from a table? - How do you use the WHERE clause in SQL? - What is the difference between INNER JOIN and LEFT JOIN? 2. **Intermediate Queries:** - How do you find the second highest salary in a table? - How do you write a query to count the number of employees in each department? 3. **Advanced Queries:** - Explain the difference between GROUP BY and HAVING clauses. - How would you optimize a slow-running query? ### Python: 1. **Basic Concepts:** - What are the key features of Python? - Explain the concept of lists, tuples, and dictionaries with examples. 2. **Intermediate Concepts:** - How do you handle exceptions in Python? - What is a lambda function and how is it used? 3. **Advanced Concepts:** - Explain the concept of decorators in Python. - How do you manage memory in Python? ### DBMS: 1. **Fundamentals:** - What are the different types of database management systems? - Explain ACID properties in a database. 2. **Design and Normalization:** - What is normalization? Explain different normal forms. - What is a foreign key? How is it different from a primary key? 3. **Transactions and Concurrency:** - What are transactions? How do you implement them in SQL? - What is the difference between pessimistic and optimistic locking? ### Projects: 1. **Project Explanation:** - Can you describe a project you have worked on recently? What was your role? - What technologies did you use in your project and why? 2. **Challenges and Solutions:** - What challenges did you face during your project, and how did you overcome them? - How did you ensure the quality and reliability of your project? ### Aptitude: 1. **Logical Reasoning:** - If two trains are moving towards each other at different speeds, how do you calculate the point at which they will meet? 2. **Mathematical Problems:** - Solve this problem: If a person can do a job in 10 days and another can do the same job in 15 days, how long will it take for them to complete the job together?