Mock Interview Chat SQL Developer Role
Q1. Tell me about yourself.
Answer:
Good morning Sir, my name is Hamza and Im from Delhi, India.
I hold a Bachelors degree in Data Science from IIT Madras.
I have over 3 years of experience as a Data Analyst and SQL Developer.
I started my career at Student Cover Consultant as a Data Analyst, where I worked on customer
service data and helped improve resolution efficiency by 20%.
Later, I joined Enviro Tech Services in Ghaziabad, an environmental monitoring company, where I
worked as an SQL Developer.
My role mainly focused on automation, advanced SQL scripting, and creating dynamic Power BI
dashboards.
Ive written complex SQL queries on large datasets and contributed to data-driven decision-making.
Q2. Why do you want to work with KNPC, Kuwait?
Answer:
Because KNPC is a well-reputed organization in the energy sector, and Im looking for a role where I
can contribute my SQL and database expertise,
while growing in a challenging and dynamic environment.
What excites me about KNPC is its focus on innovation, data-driven operations, and the scale at
which it operates.
I want to be part of a team that values precision, quality, and continuous improvement, which aligns
perfectly with my professional goals.
Q3. What are the different types of JOINs in SQL?
Answer:
There are 4 main types of JOINs in SQL:
1. INNER JOIN returns only matching rows from both tables.
2. LEFT JOIN returns all rows from the left table, and matching rows from the right table.
3. RIGHT JOIN returns all rows from the right table, and matching rows from the left table.
4. FULL JOIN returns all rows when there is a match in either table.
Example:
SELECT A.name, B.salary
FROM employee A
LEFT JOIN salary B ON A.id = B.emp_id;
Q4. What is normalization in SQL, and why is it important?
Answer:
Normalization is the process of organizing data in a relational database to reduce data redundancy
and improve data integrity.
It involves breaking large tables into smaller ones and establishing relationships using foreign keys.
Types of Normal Forms:
1NF Atomic columns
2NF No partial dependency
3NF No transitive dependency
Q5. What is an Index in SQL?
Answer:
Indexes are used to speed up the retrieval of data from tables. They create pointers to rows in a
table based on key columns.
There are Clustered and Non-Clustered indexes. Indexes improve query performance but slow
down insert/update/delete operations.
Q6. What is a Subquery in SQL?
Answer:
A subquery is a query nested inside another query. It returns data to be used by the main query.
Example:
SELECT name FROM employees
WHERE dept_id IN (SELECT dept_id FROM departments WHERE location = 'Delhi');
Q7. What is the difference between UNION and UNION ALL?
Answer:
UNION combines the result sets of two SELECT queries and removes duplicates.
UNION ALL combines the result sets and keeps duplicates.
Q8. What is a Primary Key?
Answer:
A primary key is a column or a set of columns that uniquely identifies each row in a table.
It enforces entity integrity. A table can have only one primary key, and it cannot have NULLs.
Q9. What is a Foreign Key and how is it different from a Primary Key?
Answer:
A foreign key is a column that creates a relationship between two tables by referencing the primary
key of another table.
Difference:
- Primary Key: Unique, Not Null, Identifies a record
- Foreign Key: Can be duplicate, can be null, references another tables PK
Example:
CREATE TABLE employees (
emp_id INT PRIMARY KEY,
dept_id INT,
FOREIGN KEY (dept_id) REFERENCES departments(dept_id)
);