Go Digital Technology Consulting
Tata Chemicals Interview Questions and Answers
Q1. Write a code to remove duplicates from a given list.
Code to remove duplicates from a list of strings
Create a new empty list to store unique elements
Iterate through the given list and add elements to the new list only if they are not already present
Return the new list without duplicates
Q2. Whats is Temporary Table in SQL?
Temporary table in SQL is a table that exists temporarily and is automatically deleted when the session ends.
Temporary tables are created using CREATE TEMPORARY TABLE statement.
They are useful for storing intermediate results during complex queries.
Temporary tables are only visible to the current session and are automatically dropped when the session ends.
Q3. What are CTE and Views in SQL?
CTE stands for Common Table Expression, a temporary result set that can be referenced within a SELECT, INSERT, UPDATE, or DELETE statement. Views are virtual tables created by a query.
CTE is defined using the WITH keyword and can be recursive.
CTEs are mainly used to simplify complex queries, improve readability, and reduce redundancy.
Views are saved queries that act as virtual tables, allowing users to query the view as if it were a table.
Views can be used to hide complexity,...read more
Q4. What is DDL, DML, & DCL?
DDL stands for Data Definition Language, DML stands for Data Manipulation Language, and DCL stands for Data Control Language.
DDL is used to define the structure of database objects such as tables, indexes, and views.
DML is used to manipulate data within the database, such as inserting, updating, and deleting records.
DCL is used to control access to data within the database, such as granting or revoking permissions.
Q5. Window function in SQL
Window functions in SQL are used to perform calculations across a set of table rows related to the current row.
Window functions are used to calculate values based on a set of rows related to the current row.
They allow you to perform calculations without grouping the rows into a single output row.
Common window functions include ROW_NUMBER(), RANK(), DENSE_RANK(), and NTILE().
Q6. What are window function in sql ? SQL joins? CTE in sql?
Window functions are used to perform calculations across a set of rows in a table.
Window functions operate on a subset of rows called a window or frame.
They can be used to calculate running totals, rankings, and moving averages.
Examples of window functions include ROW_NUMBER, RANK, and LAG.
SQL joins are used to combine rows from two or more tables based on a related column between them.
Common types of joins include INNER JOIN, LEFT JOIN, and RIGHT JOIN.
CTE (Common Table Expre...read more
Q7. What are lists? difference between list ,tupe, dict and sets ? how to extract elements from dict ?
Lists are ordered collections of items in Python.
Lists are mutable, meaning their elements can be changed.
Elements in a list are accessed using indexing.
Lists can contain elements of different data types.
Lists are denoted by square brackets [].
Q8. Write a command to fetch data form the table
Use SQL SELECT command to fetch data from a table
Use the SELECT statement followed by the column names you want to retrieve
Specify the table name after the keyword FROM
Add conditions using WHERE clause if needed
Interview Process at Tata Chemicals
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month