Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Player performance in two years Write a query to find the details of all the batsmen whose score in the current year is greater than
Player performance in two years Write a query to find the details of all the batsmen whose score in the current year is greater than or equal to their score in the previous year. Order the output by BatsmanName. Sample input Table: Cricketinformation Field Type BatsmanName Text Score Integer Year Integer Sample BatsmanName Score Year Richard 90 2016 Richard 100 2017 Rick 100 2015 Richard 150 2018 Rick 50 2016 Rick 100 2017 Sample output BatsmanName Year Score Previous Year PreviousYearScore Richard 2017 100 2016 90 Richard 2018 150 2017 100 Rick 2017 100 2016 50 Note: Your SQL query must be able to print the sample output from the provided sample input. However, the query is run against multiple hidden test cases. Therefore, your query must pass these hidden test cases to solve the problem statement. Time Limit: 5 sec(s) for each Input file Memory Limit: 256 MB Source Limit: 1024 KB
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started