Department Table Columns: Department_id, Department_Name, Location
Task: Write an SQL query to find the name and salary of the highest-paid employee in each department who joined in the last three years, along with their department name and location.
Complex Data Manipulation:
Question: You have two tables: Orders and Customers.
Orders Table Columns: Order_id, Customer_id, Order_Date, Amount, Status
Task: Write an SQL query to calculate the total order amount for each customer who joined in the current year and has made at least three orders. The output should include Customer_Name and the total amount, sorted by the total amount in descending order.
Subqueries and Conditional Logic:
Question: You have a single table: Transactions.
Transactions Table Columns: Transaction_id, Account_id, Transaction_Date, Amount, Type (‘credit’ or ‘debit’)
Task: Write an SQL query to find the account balance for all accounts as of today, assuming that the balance starts at zero and only transactions up to today are considered.
Task: Write an SQL query using window functions to rank the products by revenue in each quarter of the year. Include year, quarter, product_id, revenue, and rank.
2. Python Technical Round
Format: Technical Skills Assessment
Questions:
Complex Data Frame Manipulation:
Question: Given a DataFrame ‘df_sales’ with columns [‘Product_id’, ‘Sale_Date’, ‘Revenue’], write a pandas code snippet to calculate the cumulative revenue for each product up to the current date and display the last 10 entries.
NumPy Array Operations:
Question: Write a NumPy script to create a 2D array of shape (10,10) where each element is equal to the sum of its row index and column index. Then, extract and print a 4×4 subarray starting from the second row and second column of the original array.
Data Merging and Analysis:
Question: Assume you have two DataFrames, ‘df_customers’ with columns [‘Customer_id’, ‘Customer_Name’] and ‘df_orders’ with columns [‘Order_id’, ‘Customer_id’, ‘Order_Date’, ‘Amount’]. Write a pandas code snippet to merge these DataFrames on ‘Customer_id’ and calculate the average order amount for each customer. Sort the results by the average order amount in descending order.
Time Series and Data Aggregation:
Question: Using the ‘df_sales’ DataFrame, demonstrate how to resample the data to get monthly total revenue. Then, plot this monthly revenue trend using Matplotlib, ensuring to label the axes and provide a title to the graph.
3. Behavioral Interview
Format: Behavioral and General Interview
Questions:
Behavioral Questions:
General behavioral questions
Questions about past experience
Project Discussion:
Detailed discussion on projects mentioned in the resume