Mep Media
20+ Hindustan Unilever Interview Questions and Answers
Q1. What is SQL, and why is it important in data analytics
SQL is a programming language used for managing and analyzing data in relational databases.
SQL stands for Structured Query Language
It is used to retrieve, manipulate, and analyze data stored in relational databases
SQL is important in data analytics as it allows analysts to query databases to extract relevant information for analysis
It helps in filtering, sorting, and aggregating data to generate insights
Examples of SQL commands include SELECT, INSERT, UPDATE, and DELETE
Q2. How do you use 'PARTITION BY` and `ORDER BY in window functions
PARTITION BY is used to divide the result set into partitions, while ORDER BY is used to sort the rows within each partition in window functions.
PARTITION BY is used to group rows with the same values in specified columns
ORDER BY is used to sort the rows within each partition
Example: SELECT column1, column2, SUM(column3) OVER (PARTITION BY column1 ORDER BY column2) AS total FROM table_name
Q3. What is the difference between 'WHERE` and 'HAVING` clauses
WHERE clause is used to filter rows before grouping, while HAVING clause is used to filter groups after grouping.
WHERE clause is used with SELECT, UPDATE, DELETE statements to filter rows based on a condition
HAVING clause is used with SELECT statement to filter groups based on a condition
WHERE clause is applied before the data is grouped, while HAVING clause is applied after the data is grouped
Example: SELECT * FROM table_name WHERE column_name = 'value';
Example: SELECT colum...read more
Q4. Explain the difference between 'INNER JOIN', 'LEFT JOIN`, `RIGHT JOIN`, and `FULL OUTER JOIN`.
Different types of SQL joins used to combine rows from two or more tables based on a related column between them.
INNER JOIN: Returns rows when there is at least one match in both tables.
LEFT JOIN: Returns all rows from the left table and the matched rows from the right table.
RIGHT JOIN: Returns all rows from the right table and the matched rows from the left table.
FULL OUTER JOIN: Returns all rows when there is a match in either left or right table.
Q5. What are Indexing, it's types and use of it
Indexing is a technique used to optimize data retrieval in databases by creating indexes on columns.
Types of indexing include clustered and non-clustered indexes
Clustered indexes physically reorder the data in the table based on the index key
Non-clustered indexes create a separate structure to store the index key and a pointer to the actual data
Indexes are used to speed up data retrieval operations such as SELECT queries
Q6. Explain the difference between `TRUNCATE`, `DELETE`, and `DROP` commands.
TRUNCATE removes all rows from a table, DELETE removes specific rows, and DROP deletes the entire table structure.
TRUNCATE is faster than DELETE as it does not log individual row deletions.
DELETE is slower than TRUNCATE as it logs each row deletion.
DROP removes the entire table structure along with all data.
TRUNCATE and DELETE can be rolled back, but DROP cannot be rolled back.
Example: TRUNCATE table_name;
Example: DELETE FROM table_name WHERE condition;
Example: DROP TABLE tab...read more
Q7. Explain window functions like `ROW_NUMBER()`, `RANK()`, and `DENSE_RANK()`.
Window functions like ROW_NUMBER(), RANK(), and DENSE_RANK() assign a unique number to each row based on specified criteria.
ROW_NUMBER() assigns a unique sequential integer starting from 1 to each row within a partition
RANK() assigns a unique rank to each row within a partition, with no gaps in ranking if there are ties
DENSE_RANK() assigns a unique rank to each row within a partition, with possible gaps in ranking if there are ties
Q8. Row-level Security and 4 role in power Bi
Row-level security in Power BI allows restricting access to specific rows of data based on user roles.
Row-level security in Power BI is used to control access to data at the row level based on user roles.
Roles in Power BI define the level of access users have to data and reports.
Examples of roles in Power BI include Admin, Analyst, Viewer, and Contributor.
By setting up row-level security, users can only see the data that is relevant to their role.
Row-level security can be imp...read more
Q9. Results of Left Join, Right Join and Cross Join
Left Join includes all records from the left table and matching records from the right table. Right Join includes all records from the right table and matching records from the left table. Cross Join combines all records from both tables.
Left Join: Includes all records from the left table and matching records from the right table.
Right Join: Includes all records from the right table and matching records from the left table.
Cross Join: Combines all records from both tables.
Q10. What are BookMarks, use of it
Bookmarks are digital markers used to quickly navigate to specific sections or pages within a document or website.
Bookmarks allow users to easily access important or frequently visited sections of a document or website.
They are commonly used in web browsers to save specific web pages for quick access.
Bookmarks can also be used in PDF documents to mark important pages or sections for easy reference.
Q11. Difference between Union & Union all
Union combines and removes duplicates, Union all combines without removing duplicates.
Union combines result sets and removes duplicates
Union all combines result sets without removing duplicates
Union is slower than Union all as it involves removing duplicates
Union all is faster than Union as it does not remove duplicates
Q12. What is fact & dimensions
Facts are measurable data points, while dimensions provide context to the facts by categorizing and organizing them.
Facts are quantitative data that can be measured or counted.
Dimensions provide context to the facts by categorizing and organizing them.
In a sales database, the fact could be the total revenue generated, while dimensions could include product category, region, and time period.
Q13. Difference between Append and Merged
Append adds rows to a dataset, while Merge combines datasets based on a common key.
Append adds rows to the bottom of a dataset, increasing the number of observations.
Merge combines datasets based on a common key, such as a unique identifier or variable.
Appending is useful for adding new data, while merging is useful for combining related datasets.
Example: Appending a new month of sales data to an existing dataset. Merging customer information with sales data based on customer...read more
Q14. Difference between Duplicate & Reference
Duplicate refers to an exact copy, while reference is a pointer to the original object.
Duplicate is a separate copy of the original data, while reference points to the original data.
Changing a duplicate does not affect the original, but changing a reference does.
Duplicates consume more memory than references.
Example: Duplicate - making a photocopy of a document. Reference - sharing a link to a document.
Example: Duplicate - cloning a hard drive. Reference - creating a shortcut...read more
Q15. What is power Bi
Power BI is a business analytics tool by Microsoft that provides interactive visualizations and business intelligence capabilities.
Developed by Microsoft
Allows users to create interactive visualizations and reports
Integrates with various data sources such as Excel, SQL databases, and cloud services
Enables data exploration and sharing insights with stakeholders
Offers features like dashboards, data connections, and data preparation
Q16. What is SQL
SQL is a programming language used for managing and manipulating relational databases.
SQL stands for Structured Query Language
It is used to communicate with databases to perform tasks such as querying data, updating data, and creating tables
Common SQL commands include SELECT, INSERT, UPDATE, DELETE
Example: SELECT * FROM table_name WHERE condition;
Q17. What is ETL
ETL stands for Extract, Transform, Load. It is a process used to extract data from various sources, transform it into a consistent format, and load it into a data warehouse for analysis.
Extract: Data is extracted from multiple sources such as databases, files, APIs, etc.
Transform: Data is cleaned, standardized, and transformed into a consistent format suitable for analysis.
Load: The transformed data is loaded into a data warehouse or database for further processing and analys...read more
Q18. What is join
Join is a SQL operation used to combine rows from two or more tables based on a related column between them.
Join is used to retrieve data from multiple tables based on a related column.
Common types of joins include INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN.
Example: SELECT * FROM table1 INNER JOIN table2 ON table1.column = table2.column;
Q19. What is RLS
RLS stands for Restless Leg Syndrome, a neurological disorder characterized by an uncontrollable urge to move the legs.
RLS causes uncomfortable sensations in the legs, often relieved by movement
Symptoms typically worsen at night and can disrupt sleep
RLS can be idiopathic or secondary to other conditions like iron deficiency or pregnancy
Q20. Cross join vs outer join
Cross join produces Cartesian product of two tables, while outer join combines rows from two tables based on a related column.
Cross join returns all possible combinations of rows from two tables.
Outer join combines rows from two tables based on a related column, including unmatched rows with NULL values.
Example: Cross join - SELECT * FROM table1 CROSS JOIN table2
Example: Outer join - SELECT * FROM table1 LEFT JOIN table2 ON table1.id = table2.id
Q21. Type of keys
Types of keys in data analysis include primary keys, foreign keys, and composite keys.
Primary key uniquely identifies each record in a table (e.g. customer ID)
Foreign key links two tables together (e.g. customer ID in orders table)
Composite key consists of multiple columns to uniquely identify a record (e.g. combination of customer ID and order ID)
Top Junior Data Analyst Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month