Real questions from top companies in SQL Β· medium
How do you handle NULL values in SQL? Mention functions like COALESCE and ISNULL.
How would you handle duplicate records in an SQL table?
Implement a query to find the top 5 customers by total sales amount.
SQL query to find the second highest salary from each department.
What are primary keys and foreign keys? Why are they important?
What is a self-join, and when would you use it?
What is normalization and denormalization? When would you use each?
What is the difference between a view and a materialized view?
Write an SQL query to find duplicate emails in a users table.
Triggers in ADF, especially tumbling window triggers.
What is a window function? Explain with an example.
What is the difference between OLTP and OLAP?
Write a SQL query to find top 3 earners in each department.
Write a query to find the top three highest-paid employees in each department using window functions.
Write complex SQL queries involving multiple joins, subqueries, and data aggregation logic.
Compare Airflow's @daily vs once trigger scheduling.
Compare OLTP and OLAP systems in the context of financial transactions.
Compare PostgreSQL vs Snowflake. How do they handle duplicate record errors?
Compare the star schema and snowflake schema. Which one would you use for reporting at Swiggy, and why?
Connecting BigQuery with Linux
Type or paste your answer to any of these questions and our AI Coach scores it, highlights gaps, and rewrites it at FAANG quality. Free to try.