DataEngPrep.tech
QuestionsPracticeAI CoachDashboardPacksBlog
ProLogin

Interview Questions

Real questions from top companies in SQL

700+ Easy450+ Medium650+ Hard
All CategoriesBehavioralSpark/Big DataSQLPython/CodingSystem Design/ArchitectureCloud/ToolsGeneral/Othereasymediumhard
461

Write a query to find employees in the same department as 'John'.

SQLmediumjoin0.3 min read
Incedo
β†’
462

Write a query to find minimum age.

SQLeasy0.1 min read
Altimetrik
β†’
463

Write a query to find the 5th highest salary in an employee table and calculate the number of employees whose salary is greater than that of their manager.

SQLmediumjoin0.3 min read
S&P Global
β†’
464

Write a query to find the first number repeating consecutively three times in a sequence.

SQLeasy0.3 min read
American Express
β†’
465

Write a query to find the median salary of employees in a table.

SQLeasybigquery0.2 min read
Goldman Sachs
β†’
466

Write a query to find the top 5 most-sold Adidas products in the last month.

SQLmediumjoin0.2 min read
Adidas
β†’
467

Write a query to find the top three customers by total revenue within each region.

SQLmediumpartition0.2 min read
Uber
β†’
468

Write a query to find the total number of rides per driver in the last 30 days.

SQLmedium0.2 min read
Uber
β†’
469

Write a query to generate the specified output using advanced SQL skills with joins, aggregations, and window functions.

SQLhardjoinpartitionsql0.4 min read
Carelon
β†’
470

Write a query to get the latest rule_id and rule_status.

SQLmediumpartitionsnowflakesql0.3 min read
Gartner
β†’
471

Write a query to get the names of all employees who are managers with five or more direct reports.

SQLmediumjoin0.3 min read
Chryselys
β†’
472

Write a query to identify duplicate customer entries based on email and phone number.

SQLmediumjoin0.4 min read
Swiggy
β†’
473

Write a query to identify unique user sessions.

SQLmediumetlpartition0.2 min read
Wayfair
β†’
474

Write a query to remove duplicate records from a table while retaining the earliest entry.

SQLmediumpartition0.3 min read
BCG
β†’
475

Write a query to retain only the latest record and delete others in case of duplicates.

SQLmediumpartition0.3 min read
Fossil Group
β†’
476

Write a query to select the latest record based on a time_of_insertion column.

SQLmediumpartitionsnowflakesql0.3 min read
Fossil Group
β†’
477

Write a query to switch values in the Gender column (M to F and F to M).

SQLeasy0.3 min read
Fossil Group
β†’
478

Write a self join query to get the manager's name for each employee.

SQLmediumjoin0.2 min read
Gartner
β†’
479

Write an SQL query to find the top 3 performing products in each category

SQLmediumpartitionsqlwindow0.3 min read
Kagina
β†’
480

Write code to find the third-highest salary in a dataset using Pandas.

SQLmediumspark0.2 min read
Chryselys
β†’

Reading isn't practice. Get AI feedback on your answers.

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.

Try AI Answer Coach β€” FreeStart a Mock Interview
Previous1...22232425Next
Categories
All QuestionsSQLSpark / Big DataPython / CodingSystem DesignCloud / ToolsBehavioral
By Company
AmazonGoogleDatabricksSnowflakeMicrosoftNetflixUberTCS
Interview Guides
All GuidesTop SQL QuestionsTop Spark QuestionsTop Python QuestionsTop System DesignSQL Window FunctionsETL QuestionsData Modeling
Products
AI Interview CoachAnswer AnalyzerSQL PlaygroundResume AnalyzerInterview PacksPricing
Company
About UsContact UsAI DisclosureDisclaimerTerms of ServicePrivacy Policy
Β© 2026 DataEngPrep.tech. All rights reserved.
AboutBlogContactDisclaimer