📌10 intermediate-level SQL interview questions
1. How would you find the nth highest salary in a table?
2. What is the difference between JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN?
3. How would you calculate cumulative sum in SQL?
4. How do you identify duplicate records in a table?
5. Explain the concept of a window function and give examples.
6. How would you retrieve records between two dates in SQL?
7. What is the difference between UNION and UNION ALL?
8. How can you pivot data in SQL?
9. Explain the use of CASE statements in SQL.
10. How do you use common table expressions (CTEs)?
#sql
1. How would you find the nth highest salary in a table?
2. What is the difference between JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN?
3. How would you calculate cumulative sum in SQL?
4. How do you identify duplicate records in a table?
5. Explain the concept of a window function and give examples.
6. How would you retrieve records between two dates in SQL?
7. What is the difference between UNION and UNION ALL?
8. How can you pivot data in SQL?
9. Explain the use of CASE statements in SQL.
10. How do you use common table expressions (CTEs)?
#sql
👍2
SQL Essentials for Quick Revision
🚀 SELECT
Retrieve data from one or more tables.
🎯 WHERE Clause
Filter records based on specific conditions.
🔄 ORDER BY
Sort query results in ascending (ASC) or descending (DESC) order.
📊 Aggregation Functions
MIN, MAX, AVG, COUNT: Summarize data.
Window Functions: Perform calculations across a dataset without grouping rows.
🔑 GROUP BY
Group data based on one or more columns and apply aggregate functions.
🔗 JOINS
INNER JOIN: Fetch matching rows from both tables.
LEFT JOIN: All rows from the left table and matching rows from the right.
RIGHT JOIN: All rows from the right table and matching rows from the left.
FULL JOIN: Combine rows when there is a match in either table.
SELF JOIN: Join a table with itself.
🧩 Common Table Expressions (CTE)
Simplify complex queries with temporary result sets.
Quick SQL Revision Notes 📌
Master these concepts for interviews and projects!
#SQL #DataEngineer #QuickNotes
🚀 SELECT
Retrieve data from one or more tables.
🎯 WHERE Clause
Filter records based on specific conditions.
🔄 ORDER BY
Sort query results in ascending (ASC) or descending (DESC) order.
📊 Aggregation Functions
MIN, MAX, AVG, COUNT: Summarize data.
Window Functions: Perform calculations across a dataset without grouping rows.
🔑 GROUP BY
Group data based on one or more columns and apply aggregate functions.
🔗 JOINS
INNER JOIN: Fetch matching rows from both tables.
LEFT JOIN: All rows from the left table and matching rows from the right.
RIGHT JOIN: All rows from the right table and matching rows from the left.
FULL JOIN: Combine rows when there is a match in either table.
SELF JOIN: Join a table with itself.
🧩 Common Table Expressions (CTE)
Simplify complex queries with temporary result sets.
Quick SQL Revision Notes 📌
Master these concepts for interviews and projects!
#SQL #DataEngineer #QuickNotes
👍2
🚀 Master SQL for Data Engineer and Ace Interviews
To succeed as a Data Analyst, focus on these essential SQL topics:
1️⃣ Fundamental SQL Commands
SELECT, FROM, WHERE
GROUP BY, HAVING, LIMIT
2️⃣ Advanced Querying Techniques
Joins: LEFT, RIGHT, INNER, SELF, CROSS
Aggregate Functions: SUM(), MAX(), MIN(), AVG()
Window Functions: ROW_NUMBER(), RANK(), DENSE_RANK(), LEAD(), LAG(), SUM() OVER()
Conditional Logic & Pattern Matching:
CASE statements for conditions
LIKE for pattern matching
Complex Queries: Subqueries, Common Table Expressions (CTEs), temporary tables
3️⃣ Performance Tuning
Optimize queries for better performance
Learn indexing strategies
4️⃣ Practical Applications
Solve case studies from Ankit Bansal's YouTube channel
Watch 10-15 minute tutorials, practice along for hands-on learning
5️⃣ End-to-End Projects
Search "Data Analysis End-to-End Projects Using SQL" on YouTube
Practice the full process: data extraction ➡️ cleaning ➡️ analysis
6️⃣ Real-World Data Analysis
Analyze real datasets for insights
Practice cleaning, handling missing values, and dealing with outliers
7️⃣ Advanced Data Manipulation
Use advanced SQL functions for transforming raw data into insights
Practice combining data from multiple sources
8️⃣ Reporting & Dashboards
Build impactful reports and dashboards using SQL and Power BI
9️⃣ Interview Preparation
Practice common SQL interview questions
Solve exercises and coding challenges
🔑 Pro Tip: Hands-on practice is key! Apply these steps to real projects and datasets to strengthen your expertise and confidence.
#SQL #DataEngineer #CareerGrowth
To succeed as a Data Analyst, focus on these essential SQL topics:
1️⃣ Fundamental SQL Commands
SELECT, FROM, WHERE
GROUP BY, HAVING, LIMIT
2️⃣ Advanced Querying Techniques
Joins: LEFT, RIGHT, INNER, SELF, CROSS
Aggregate Functions: SUM(), MAX(), MIN(), AVG()
Window Functions: ROW_NUMBER(), RANK(), DENSE_RANK(), LEAD(), LAG(), SUM() OVER()
Conditional Logic & Pattern Matching:
CASE statements for conditions
LIKE for pattern matching
Complex Queries: Subqueries, Common Table Expressions (CTEs), temporary tables
3️⃣ Performance Tuning
Optimize queries for better performance
Learn indexing strategies
4️⃣ Practical Applications
Solve case studies from Ankit Bansal's YouTube channel
Watch 10-15 minute tutorials, practice along for hands-on learning
5️⃣ End-to-End Projects
Search "Data Analysis End-to-End Projects Using SQL" on YouTube
Practice the full process: data extraction ➡️ cleaning ➡️ analysis
6️⃣ Real-World Data Analysis
Analyze real datasets for insights
Practice cleaning, handling missing values, and dealing with outliers
7️⃣ Advanced Data Manipulation
Use advanced SQL functions for transforming raw data into insights
Practice combining data from multiple sources
8️⃣ Reporting & Dashboards
Build impactful reports and dashboards using SQL and Power BI
9️⃣ Interview Preparation
Practice common SQL interview questions
Solve exercises and coding challenges
🔑 Pro Tip: Hands-on practice is key! Apply these steps to real projects and datasets to strengthen your expertise and confidence.
#SQL #DataEngineer #CareerGrowth
🚀 SQL Essentials for Data Engineers:
Joins & Subqueries – Master INNER, LEFT, RIGHT, CROSS joins.
Window Functions – Use ROW_NUMBER(), RANK(), LAG() for analytics.
CTEs & Temp Tables – Write cleaner queries with WITH.
Performance Tuning – Optimize with indexes & execution plans.
ACID Transactions – Ensure consistency with COMMIT & ROLLBACK.
Normalization – Balance efficiency with normal vs. denormal forms.
Master these, and you're golden! 💡
#SQL #DataEngineering
Joins & Subqueries – Master INNER, LEFT, RIGHT, CROSS joins.
Window Functions – Use ROW_NUMBER(), RANK(), LAG() for analytics.
CTEs & Temp Tables – Write cleaner queries with WITH.
Performance Tuning – Optimize with indexes & execution plans.
ACID Transactions – Ensure consistency with COMMIT & ROLLBACK.
Normalization – Balance efficiency with normal vs. denormal forms.
Master these, and you're golden! 💡
#SQL #DataEngineering
❤2
Complete topics & subtopics of #SQL for Data Engineer role:-
𝟭. 𝗕𝗮𝘀𝗶𝗰 𝗦𝗤𝗟 𝗦𝘆𝗻𝘁𝗮𝘅:
SQL keywords
Data types
Operators
SQL statements (SELECT, INSERT, UPDATE, DELETE)
𝟮. 𝗗𝗮𝘁𝗮 𝗗𝗲𝗳𝗶𝗻𝗶𝘁𝗶𝗼𝗻 𝗟𝗮𝗻𝗴𝘂𝗮𝗴𝗲 (𝗗𝗗𝗟):
CREATE TABLE
ALTER TABLE
DROP TABLE
Truncate table
𝟯. 𝗗𝗮𝘁𝗮 𝗠𝗮𝗻𝗶𝗽𝘂𝗹𝗮𝘁𝗶𝗼𝗻 𝗟𝗮𝗻𝗴𝘂𝗮𝗴𝗲 (𝗗𝗠𝗟):
SELECT statement (SELECT, FROM, WHERE, ORDER BY, GROUP BY, HAVING, JOINs)
INSERT statement
UPDATE statement
DELETE statement
𝟰. 𝗔𝗴𝗴𝗿𝗲𝗴𝗮𝘁𝗲 𝗙𝘂𝗻𝗰𝘁𝗶𝗼𝗻𝘀:
SUM, AVG, COUNT, MIN, MAX
GROUP BY clause
HAVING clause
𝟱. 𝗗𝗮𝘁𝗮 𝗖𝗼𝗻𝘀𝘁𝗿𝗮𝗶𝗻𝘁𝘀:
Primary Key
Foreign Key
Unique
NOT NULL
CHECK
𝟲. 𝗝𝗼𝗶𝗻𝘀:
INNER JOIN
LEFT JOIN
RIGHT JOIN
FULL OUTER JOIN
Self Join
Cross Join
𝟳. 𝗦𝘂𝗯𝗾𝘂𝗲𝗿𝗶𝗲𝘀:
Types of subqueries (scalar, column, row, table)
Nested subqueries
Correlated subqueries
𝟴. 𝗔𝗱𝘃𝗮𝗻𝗰𝗲𝗱 𝗦𝗤𝗟 𝗙𝘂𝗻𝗰𝘁𝗶𝗼𝗻𝘀:
String functions (CONCAT, LENGTH, SUBSTRING, REPLACE, UPPER, LOWER)
Date and time functions (DATE, TIME, TIMESTAMP, DATEPART, DATEADD)
Numeric functions (ROUND, CEILING, FLOOR, ABS, MOD)
Conditional functions (CASE, COALESCE, NULLIF)
𝟵. 𝗩𝗶𝗲𝘄𝘀:
Creating views
Modifying views
Dropping views
𝟭𝟬. 𝗜𝗻𝗱𝗲𝘅𝗲𝘀:
Creating indexes
Using indexes for query optimization
𝟭𝟭. 𝗧𝗿𝗮𝗻𝘀𝗮𝗰𝘁𝗶𝗼𝗻𝘀:
ACID properties
Transaction management (BEGIN, COMMIT, ROLLBACK, SAVEPOINT)
Transaction isolation levels
𝟭𝟮. 𝗗𝗮𝘁𝗮 𝗜𝗻𝘁𝗲𝗴𝗿𝗶𝘁𝘆 𝗮𝗻𝗱 𝗦𝗲𝗰𝘂𝗿𝗶𝘁𝘆:
Data integrity constraints (referential integrity, entity integrity)
GRANT and REVOKE statements (granting and revoking permissions)
Database security best practices
𝟭𝟯. 𝗦𝘁𝗼𝗿𝗲𝗱 𝗣𝗿𝗼𝗰𝗲𝗱𝘂𝗿𝗲𝘀 𝗮𝗻𝗱 𝗙𝘂𝗻𝗰𝘁𝗶𝗼𝗻𝘀:
Creating stored procedures
Executing stored procedures
Creating functions
Using functions in queries
𝟭𝟰. 𝗣𝗲𝗿𝗳𝗼𝗿𝗺𝗮𝗻𝗰𝗲 𝗢𝗽𝘁𝗶𝗺𝗶𝘇𝗮𝘁𝗶𝗼𝗻:
Query optimization techniques (using indexes, optimizing joins, reducing subqueries)
Performance tuning best practices
𝟭𝟱. 𝗔𝗱𝘃𝗮𝗻𝗰𝗲𝗱 𝗦𝗤𝗟 𝗖𝗼𝗻𝗰𝗲𝗽𝘁𝘀:
Recursive queries
Pivot and unpivot operations
Window functions (Row_number, rank, dense_rank, lead & lag)
CTEs (Common Table Expressions)
Dynamic SQL
Here you can find quick SQL Revision Notes👇
https://whatsapp.com/channel/0029Vaovs0ZKbYMKXvKRYi3C
Like for more
Hope it helps :)
𝟭. 𝗕𝗮𝘀𝗶𝗰 𝗦𝗤𝗟 𝗦𝘆𝗻𝘁𝗮𝘅:
SQL keywords
Data types
Operators
SQL statements (SELECT, INSERT, UPDATE, DELETE)
𝟮. 𝗗𝗮𝘁𝗮 𝗗𝗲𝗳𝗶𝗻𝗶𝘁𝗶𝗼𝗻 𝗟𝗮𝗻𝗴𝘂𝗮𝗴𝗲 (𝗗𝗗𝗟):
CREATE TABLE
ALTER TABLE
DROP TABLE
Truncate table
𝟯. 𝗗𝗮𝘁𝗮 𝗠𝗮𝗻𝗶𝗽𝘂𝗹𝗮𝘁𝗶𝗼𝗻 𝗟𝗮𝗻𝗴𝘂𝗮𝗴𝗲 (𝗗𝗠𝗟):
SELECT statement (SELECT, FROM, WHERE, ORDER BY, GROUP BY, HAVING, JOINs)
INSERT statement
UPDATE statement
DELETE statement
𝟰. 𝗔𝗴𝗴𝗿𝗲𝗴𝗮𝘁𝗲 𝗙𝘂𝗻𝗰𝘁𝗶𝗼𝗻𝘀:
SUM, AVG, COUNT, MIN, MAX
GROUP BY clause
HAVING clause
𝟱. 𝗗𝗮𝘁𝗮 𝗖𝗼𝗻𝘀𝘁𝗿𝗮𝗶𝗻𝘁𝘀:
Primary Key
Foreign Key
Unique
NOT NULL
CHECK
𝟲. 𝗝𝗼𝗶𝗻𝘀:
INNER JOIN
LEFT JOIN
RIGHT JOIN
FULL OUTER JOIN
Self Join
Cross Join
𝟳. 𝗦𝘂𝗯𝗾𝘂𝗲𝗿𝗶𝗲𝘀:
Types of subqueries (scalar, column, row, table)
Nested subqueries
Correlated subqueries
𝟴. 𝗔𝗱𝘃𝗮𝗻𝗰𝗲𝗱 𝗦𝗤𝗟 𝗙𝘂𝗻𝗰𝘁𝗶𝗼𝗻𝘀:
String functions (CONCAT, LENGTH, SUBSTRING, REPLACE, UPPER, LOWER)
Date and time functions (DATE, TIME, TIMESTAMP, DATEPART, DATEADD)
Numeric functions (ROUND, CEILING, FLOOR, ABS, MOD)
Conditional functions (CASE, COALESCE, NULLIF)
𝟵. 𝗩𝗶𝗲𝘄𝘀:
Creating views
Modifying views
Dropping views
𝟭𝟬. 𝗜𝗻𝗱𝗲𝘅𝗲𝘀:
Creating indexes
Using indexes for query optimization
𝟭𝟭. 𝗧𝗿𝗮𝗻𝘀𝗮𝗰𝘁𝗶𝗼𝗻𝘀:
ACID properties
Transaction management (BEGIN, COMMIT, ROLLBACK, SAVEPOINT)
Transaction isolation levels
𝟭𝟮. 𝗗𝗮𝘁𝗮 𝗜𝗻𝘁𝗲𝗴𝗿𝗶𝘁𝘆 𝗮𝗻𝗱 𝗦𝗲𝗰𝘂𝗿𝗶𝘁𝘆:
Data integrity constraints (referential integrity, entity integrity)
GRANT and REVOKE statements (granting and revoking permissions)
Database security best practices
𝟭𝟯. 𝗦𝘁𝗼𝗿𝗲𝗱 𝗣𝗿𝗼𝗰𝗲𝗱𝘂𝗿𝗲𝘀 𝗮𝗻𝗱 𝗙𝘂𝗻𝗰𝘁𝗶𝗼𝗻𝘀:
Creating stored procedures
Executing stored procedures
Creating functions
Using functions in queries
𝟭𝟰. 𝗣𝗲𝗿𝗳𝗼𝗿𝗺𝗮𝗻𝗰𝗲 𝗢𝗽𝘁𝗶𝗺𝗶𝘇𝗮𝘁𝗶𝗼𝗻:
Query optimization techniques (using indexes, optimizing joins, reducing subqueries)
Performance tuning best practices
𝟭𝟱. 𝗔𝗱𝘃𝗮𝗻𝗰𝗲𝗱 𝗦𝗤𝗟 𝗖𝗼𝗻𝗰𝗲𝗽𝘁𝘀:
Recursive queries
Pivot and unpivot operations
Window functions (Row_number, rank, dense_rank, lead & lag)
CTEs (Common Table Expressions)
Dynamic SQL
Here you can find quick SQL Revision Notes👇
https://whatsapp.com/channel/0029Vaovs0ZKbYMKXvKRYi3C
Like for more
Hope it helps :)
👍1
Complete topics & subtopics of #SQL for Data Engineer role:-
𝟭. 𝗕𝗮𝘀𝗶𝗰 𝗦𝗤𝗟 𝗦𝘆𝗻𝘁𝗮𝘅:
SQL keywords
Data types
Operators
SQL statements (SELECT, INSERT, UPDATE, DELETE)
𝟮. 𝗗𝗮𝘁𝗮 𝗗𝗲𝗳𝗶𝗻𝗶𝘁𝗶𝗼𝗻 𝗟𝗮𝗻𝗴𝘂𝗮𝗴𝗲 (𝗗𝗗𝗟):
CREATE TABLE
ALTER TABLE
DROP TABLE
Truncate table
𝟯. 𝗗𝗮𝘁𝗮 𝗠𝗮𝗻𝗶𝗽𝘂𝗹𝗮𝘁𝗶𝗼𝗻 𝗟𝗮𝗻𝗴𝘂𝗮𝗴𝗲 (𝗗𝗠𝗟):
SELECT statement (SELECT, FROM, WHERE, ORDER BY, GROUP BY, HAVING, JOINs)
INSERT statement
UPDATE statement
DELETE statement
𝟰. 𝗔𝗴𝗴𝗿𝗲𝗴𝗮𝘁𝗲 𝗙𝘂𝗻𝗰𝘁𝗶𝗼𝗻𝘀:
SUM, AVG, COUNT, MIN, MAX
GROUP BY clause
HAVING clause
𝟱. 𝗗𝗮𝘁𝗮 𝗖𝗼𝗻𝘀𝘁𝗿𝗮𝗶𝗻𝘁𝘀:
Primary Key
Foreign Key
Unique
NOT NULL
CHECK
𝟲. 𝗝𝗼𝗶𝗻𝘀:
INNER JOIN
LEFT JOIN
RIGHT JOIN
FULL OUTER JOIN
Self Join
Cross Join
𝟳. 𝗦𝘂𝗯𝗾𝘂𝗲𝗿𝗶𝗲𝘀:
Types of subqueries (scalar, column, row, table)
Nested subqueries
Correlated subqueries
𝟴. 𝗔𝗱𝘃𝗮𝗻𝗰𝗲𝗱 𝗦𝗤𝗟 𝗙𝘂𝗻𝗰𝘁𝗶𝗼𝗻𝘀:
String functions (CONCAT, LENGTH, SUBSTRING, REPLACE, UPPER, LOWER)
Date and time functions (DATE, TIME, TIMESTAMP, DATEPART, DATEADD)
Numeric functions (ROUND, CEILING, FLOOR, ABS, MOD)
Conditional functions (CASE, COALESCE, NULLIF)
𝟵. 𝗩𝗶𝗲𝘄𝘀:
Creating views
Modifying views
Dropping views
𝟭𝟬. 𝗜𝗻𝗱𝗲𝘅𝗲𝘀:
Creating indexes
Using indexes for query optimization
𝟭𝟭. 𝗧𝗿𝗮𝗻𝘀𝗮𝗰𝘁𝗶𝗼𝗻𝘀:
ACID properties
Transaction management (BEGIN, COMMIT, ROLLBACK, SAVEPOINT)
Transaction isolation levels
𝟭𝟮. 𝗗𝗮𝘁𝗮 𝗜𝗻𝘁𝗲𝗴𝗿𝗶𝘁𝘆 𝗮𝗻𝗱 𝗦𝗲𝗰𝘂𝗿𝗶𝘁𝘆:
Data integrity constraints (referential integrity, entity integrity)
GRANT and REVOKE statements (granting and revoking permissions)
Database security best practices
𝟭𝟯. 𝗦𝘁𝗼𝗿𝗲𝗱 𝗣𝗿𝗼𝗰𝗲𝗱𝘂𝗿𝗲𝘀 𝗮𝗻𝗱 𝗙𝘂𝗻𝗰𝘁𝗶𝗼𝗻𝘀:
Creating stored procedures
Executing stored procedures
Creating functions
Using functions in queries
𝟭𝟰. 𝗣𝗲𝗿𝗳𝗼𝗿𝗺𝗮𝗻𝗰𝗲 𝗢𝗽𝘁𝗶𝗺𝗶𝘇𝗮𝘁𝗶𝗼𝗻:
Query optimization techniques (using indexes, optimizing joins, reducing subqueries)
Performance tuning best practices
𝟭𝟱. 𝗔𝗱𝘃𝗮𝗻𝗰𝗲𝗱 𝗦𝗤𝗟 𝗖𝗼𝗻𝗰𝗲𝗽𝘁𝘀:
Recursive queries
Pivot and unpivot operations
Window functions (Row_number, rank, dense_rank, lead & lag)
CTEs (Common Table Expressions)
Dynamic SQL
Here you can find quick SQL Revision Notes👇
https://whatsapp.com/channel/0029Vaovs0ZKbYMKXvKRYi3C
Like for more
Hope it helps :)
𝟭. 𝗕𝗮𝘀𝗶𝗰 𝗦𝗤𝗟 𝗦𝘆𝗻𝘁𝗮𝘅:
SQL keywords
Data types
Operators
SQL statements (SELECT, INSERT, UPDATE, DELETE)
𝟮. 𝗗𝗮𝘁𝗮 𝗗𝗲𝗳𝗶𝗻𝗶𝘁𝗶𝗼𝗻 𝗟𝗮𝗻𝗴𝘂𝗮𝗴𝗲 (𝗗𝗗𝗟):
CREATE TABLE
ALTER TABLE
DROP TABLE
Truncate table
𝟯. 𝗗𝗮𝘁𝗮 𝗠𝗮𝗻𝗶𝗽𝘂𝗹𝗮𝘁𝗶𝗼𝗻 𝗟𝗮𝗻𝗴𝘂𝗮𝗴𝗲 (𝗗𝗠𝗟):
SELECT statement (SELECT, FROM, WHERE, ORDER BY, GROUP BY, HAVING, JOINs)
INSERT statement
UPDATE statement
DELETE statement
𝟰. 𝗔𝗴𝗴𝗿𝗲𝗴𝗮𝘁𝗲 𝗙𝘂𝗻𝗰𝘁𝗶𝗼𝗻𝘀:
SUM, AVG, COUNT, MIN, MAX
GROUP BY clause
HAVING clause
𝟱. 𝗗𝗮𝘁𝗮 𝗖𝗼𝗻𝘀𝘁𝗿𝗮𝗶𝗻𝘁𝘀:
Primary Key
Foreign Key
Unique
NOT NULL
CHECK
𝟲. 𝗝𝗼𝗶𝗻𝘀:
INNER JOIN
LEFT JOIN
RIGHT JOIN
FULL OUTER JOIN
Self Join
Cross Join
𝟳. 𝗦𝘂𝗯𝗾𝘂𝗲𝗿𝗶𝗲𝘀:
Types of subqueries (scalar, column, row, table)
Nested subqueries
Correlated subqueries
𝟴. 𝗔𝗱𝘃𝗮𝗻𝗰𝗲𝗱 𝗦𝗤𝗟 𝗙𝘂𝗻𝗰𝘁𝗶𝗼𝗻𝘀:
String functions (CONCAT, LENGTH, SUBSTRING, REPLACE, UPPER, LOWER)
Date and time functions (DATE, TIME, TIMESTAMP, DATEPART, DATEADD)
Numeric functions (ROUND, CEILING, FLOOR, ABS, MOD)
Conditional functions (CASE, COALESCE, NULLIF)
𝟵. 𝗩𝗶𝗲𝘄𝘀:
Creating views
Modifying views
Dropping views
𝟭𝟬. 𝗜𝗻𝗱𝗲𝘅𝗲𝘀:
Creating indexes
Using indexes for query optimization
𝟭𝟭. 𝗧𝗿𝗮𝗻𝘀𝗮𝗰𝘁𝗶𝗼𝗻𝘀:
ACID properties
Transaction management (BEGIN, COMMIT, ROLLBACK, SAVEPOINT)
Transaction isolation levels
𝟭𝟮. 𝗗𝗮𝘁𝗮 𝗜𝗻𝘁𝗲𝗴𝗿𝗶𝘁𝘆 𝗮𝗻𝗱 𝗦𝗲𝗰𝘂𝗿𝗶𝘁𝘆:
Data integrity constraints (referential integrity, entity integrity)
GRANT and REVOKE statements (granting and revoking permissions)
Database security best practices
𝟭𝟯. 𝗦𝘁𝗼𝗿𝗲𝗱 𝗣𝗿𝗼𝗰𝗲𝗱𝘂𝗿𝗲𝘀 𝗮𝗻𝗱 𝗙𝘂𝗻𝗰𝘁𝗶𝗼𝗻𝘀:
Creating stored procedures
Executing stored procedures
Creating functions
Using functions in queries
𝟭𝟰. 𝗣𝗲𝗿𝗳𝗼𝗿𝗺𝗮𝗻𝗰𝗲 𝗢𝗽𝘁𝗶𝗺𝗶𝘇𝗮𝘁𝗶𝗼𝗻:
Query optimization techniques (using indexes, optimizing joins, reducing subqueries)
Performance tuning best practices
𝟭𝟱. 𝗔𝗱𝘃𝗮𝗻𝗰𝗲𝗱 𝗦𝗤𝗟 𝗖𝗼𝗻𝗰𝗲𝗽𝘁𝘀:
Recursive queries
Pivot and unpivot operations
Window functions (Row_number, rank, dense_rank, lead & lag)
CTEs (Common Table Expressions)
Dynamic SQL
Here you can find quick SQL Revision Notes👇
https://whatsapp.com/channel/0029Vaovs0ZKbYMKXvKRYi3C
Like for more
Hope it helps :)
👍2❤1
Top 20 #SQL INTERVIEW QUESTIONS
1️⃣ Explain Order of Execution of SQL query
2️⃣ Provide a use case for each of the functions Rank, Dense_Rank & Row_Number ( 💡 majority struggle )
3️⃣ Write a query to find the cumulative sum/Running Total
4️⃣ Find the Most selling product by sales/ highest Salary of employees
5️⃣ Write a query to find the 2nd/nth highest Salary of employees
6️⃣ Difference between union vs union all
7️⃣ Identify if there any duplicates in a table
8️⃣ Scenario based Joins question, understanding of Inner, Left and Outer Joins via simple yet tricky question
9️⃣ LAG, write a query to find all those records where the transaction value is greater then previous transaction value
1️⃣ 0️⃣ Rank vs Dense Rank, query to find the 2nd highest Salary of employee
( Ideal soln should handle ties)
1️⃣ 1️⃣ Write a query to find the Running Difference (Ideal sol'n using windows function)
1️⃣ 2️⃣ Write a query to display year on year/month on month growth
1️⃣ 3️⃣ Write a query to find rolling average of daily sign-ups
1️⃣ 4️⃣ Write a query to find the running difference using self join (helps in understanding the logical approach, ideally this question is solved via windows function)
1️⃣ 5️⃣ Write a query to find the cumulative sum using self join
(you can use windows function to solve this question)
1️⃣6️⃣ Differentiate between a clustered index and a non-clustered index?
1️⃣7️⃣ What is a Candidate key?
1️⃣8️⃣What is difference between Primary key and Unique key?
1️⃣9️⃣What's the difference between RANK & DENSE_RANK in SQL?
2️⃣0️⃣ Whats the difference between LAG & LEAD in SQL?
Access SQL Learning Series for Free: https://t.me/sqlspecialist/523
Hope it helps :)
1️⃣ Explain Order of Execution of SQL query
2️⃣ Provide a use case for each of the functions Rank, Dense_Rank & Row_Number ( 💡 majority struggle )
3️⃣ Write a query to find the cumulative sum/Running Total
4️⃣ Find the Most selling product by sales/ highest Salary of employees
5️⃣ Write a query to find the 2nd/nth highest Salary of employees
6️⃣ Difference between union vs union all
7️⃣ Identify if there any duplicates in a table
8️⃣ Scenario based Joins question, understanding of Inner, Left and Outer Joins via simple yet tricky question
9️⃣ LAG, write a query to find all those records where the transaction value is greater then previous transaction value
1️⃣ 0️⃣ Rank vs Dense Rank, query to find the 2nd highest Salary of employee
( Ideal soln should handle ties)
1️⃣ 1️⃣ Write a query to find the Running Difference (Ideal sol'n using windows function)
1️⃣ 2️⃣ Write a query to display year on year/month on month growth
1️⃣ 3️⃣ Write a query to find rolling average of daily sign-ups
1️⃣ 4️⃣ Write a query to find the running difference using self join (helps in understanding the logical approach, ideally this question is solved via windows function)
1️⃣ 5️⃣ Write a query to find the cumulative sum using self join
(you can use windows function to solve this question)
1️⃣6️⃣ Differentiate between a clustered index and a non-clustered index?
1️⃣7️⃣ What is a Candidate key?
1️⃣8️⃣What is difference between Primary key and Unique key?
1️⃣9️⃣What's the difference between RANK & DENSE_RANK in SQL?
2️⃣0️⃣ Whats the difference between LAG & LEAD in SQL?
Access SQL Learning Series for Free: https://t.me/sqlspecialist/523
Hope it helps :)
❤1