Skip to main content

Posts

Showing posts with the label sql interveiew questions

Complex SQL Written Questions for Data Engineer

1.We need to populate male and female alternatively For Example: Above records need to Populate as below: Ans: 2.Find all the students whose marks greater than the average marks in each subject within a class For Example: Expected Output: Output: 3.      Find the data given below, and display the data with cumulative values CREATE TABLE MONTHLYVOLUME   (YEAR NUMBER(4),   MONTH CHAR(3),   SALES NUMBER(3)); / INSERT INTO MONTHLYVOLUME VALUES (2007,'JAN',11); INSERT INTO MONTHLYVOLUME VALUES (2007,'FEB',9); INSERT INTO MONTHLYVOLUME VALUES (2007,'MAR',7); INSERT INTO MONTHLYVOLUME VALUES (2007,'APR',5); INSERT INTO MONTHLYVOLUME VALUES (2007,'MAY',14); INSERT INTO MONTHLYVOLUME VALUES (2007,'JUN',6); INSERT INTO MONTHLYVOLUME VALUES (2007,'JUL',8); INSERT INTO MONTHLYVOLUME VALUES (2007,'AUG',17); INSERT INTO MONTHLYVOLUM...