HomeInterview QuestionsAggregations Interview Questions

Aggregations Interview Questions

19 real Aggregations questions asked in live technical interviews — each with a model answer. Updated weekly.

🎤 Auto-captured by Assisting AI during live interviews

These Aggregations interview questions were captured from real interviews by candidates using Assisting AI. Each links to a full model answer. For real-time help during your own interview, get Assisting AI from ₹500/day.

Given a table 'employees' with columns id, name, salary, department, write a query to find the third highest salary.🟡 Medium · Coding · Asked 1×Given a table named Orders with columns OrderID, CustomerID, OrderDate, ProductID, and Amount, write a SQL query to retrieve the latest record for each customer.🟡 Medium · Coding · Asked 1×In SQL, suppose you have a table with customer ID, transaction date, and amount. How would you find the latest transaction for each customer? Explain your approach.🟡 Medium · Coding · Asked 1×I have customers and orders tables. I want the top three customers based on order amount per year. How would you write the SQL query?🟡 Medium · Coding · Asked 1×Assume you have an employees table. Write a query to fetch the second highest salary.🟡 Medium · Coding · Asked 1×Write a fresh query to fetch the second highest salary from the employees table.🟡 Medium · Coding · Asked 1×Find employees who are working on more than two projects.🟡 Medium · Coding · Asked 1×Write an SQL query that finds the employee(s) who earn the maximum salary in each department.🟡 Medium · Coding · Asked 1×Write an SQL query that lists all departments where the average salary is greater than 60,000.🟡 Medium · Coding · Asked 1×Are you aware of aggregations? Have you used aggregations in Spark?🟡 Medium · Conceptual · Asked 1×Write an SQL query to select the top 10 users by order count.🟢 Easy · Coding · Asked 1×How do you find both the second highest and second lowest values in a dataset?🟡 Medium · Coding · Asked 1×Write an SQL query to count the number of employees reporting to each manager.🟡 Medium · Coding · Asked 1×Find the top 3 highest salaries in each department.🟡 Medium · Coding · Asked 1×How would you find the second highest paid employee in each department?🟡 Medium · Coding · Asked 1×Suppose you have two tables, Employee and Department. Verbally explain how you would find the highest paid employee in each department.🟡 Medium · Coding · Asked 1×Could you explain the difference between COUNT(*) and COUNT(1)?🟢 Easy · Conceptual · Asked 1×Write a SELECT query to retrieve each customer ID and the total number of orders from the orders table.🟡 Medium · Coding · Asked 1×For each customer ID, return the total number of orders they placed in 2025 where the order number is greater than 5.🟡 Medium · Coding · Asked 1×

🎤 Get Aggregations questions answered in real-time

Assisting AI listens to your interview, captures questions live, and gives you instant AI-powered answers on a discreet on-screen overlay.

Get Assisting AI — Starts at ₹500

Browse Other Topics