Real questions from top companies Β· medium
Explain row_number, rank, and dense_rank with examples.
Explain the difference between a clustered and non-clustered index.
Explain the difference between a fact table and a dimension table.
Explain the difference between a primary key and a unique key.
Explain the concept of window functions in SQL and provide an example
Explain the difference between Star and Snowflake schemas. When would you choose one over the other?
Explain the difference between partition count and query performance in Spark.
Explain the differences between table re-creation and ALTER TABLE operations.
Explain the order in which SQL clauses are executed.
Explain the process you would follow for optimizing a database query that is running slow.
Explain the use of surrogate keys vs. natural keys in data modeling.
Explain types of joins in Spark with examples.
Explain your approach to optimizing a slow-running query on a table with billions of rows.
Explain your understanding of indexing, partitioning, and execution plans.
Fact vs Dimension Table - categorize data
Facts and Dimension Tables Properties
Filter Rows Where Employee Salary > Manager Salary
Find 3rd Highest Salary
Find Employees with Maximum Salary in Each Department
Find average salary by department, max average salary, and list of employees for the max salary department.
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.