MENU

Fun & Interesting

EY SQL Interview Question | Medium-level

Nishtha Nagar 12,852 7 months ago
Video Not Working? Fix It Now

In this video, we’ll be solving an exciting problem that involves calculating the average monthly revenue from each sector using financial transaction data. Script - Table: Transactions CREATE TABLE Transactions ( transaction_id INT PRIMARY KEY, company_id INT, transaction_date DATE, revenue DECIMAL(10, 2) ); INSERT INTO Transactions (transaction_id, company_id, transaction_date, revenue) VALUES (101, 1, '2020-01-15', 5000.00), (102, 2, '2020-01-20', 8500.00), (103, 1, '2020-02-10', 4500.00), (104, 3, '2020-02-20', 9900.00), (105, 2, '2020-02-25', 7500.00); Table: Sectors CREATE TABLE Sectors ( company_id INT PRIMARY KEY, sector VARCHAR(50) ); INSERT INTO Sectors (company_id, sector) VALUES (1, 'Technology'), (2, 'Healthcare'), (3, 'Technology'); TIMESTAMP 00:00 Introduction 00:05 Problem Description 04:32 Solution Approach 06:12 Solution Method 1 12:20 Solution Method 2 #sql #dataanalysts #dataengineer #dataanalysis #interviewquestion #sqlinterview #sqlinterviewquestions

Comment