AMAZON INTERVIEW QUESTION - Current year marks vs Previous year marks

 DML Script:

DROP TABLE IF EXISTS StudentDetails

CREATE TABLE StudentDetails( [Student_Name] varchar(30), [Total_Marks] int , [Year] int) INSERT INTO StudentDetails VALUES('Rahul',90,2010) ,('Sanjay',80,2010) ,('Mohan',70,2010) ,('Rahul',90,2011) ,('Sanjay',85,2011) ,('Mohan',65,2011) ,('Rahul',80,2012) ,('Sanjay',80,2012) ,('Mohan',90,2012)

Comments

Popular posts from this blog

How to find all the customers who placed orders on three consecutive days | SQL Scenario questions

50 Essential SQL Questions to Land Your Dream Job

NTT DATA SQL INTERVIEW QUESTION | Solve 80/20 Pareto rule