Small update to SQL query
- Status: Pending
- Hadiah: £10
- Entri Diterima: 9
- Pemenang: dtrighatia
I need a small update to my already existing SQL query.
Task is if a company comes in 2017 and skips 2018, then comes in 2019, they should be counted as YEAR1 rather than YEAR2. In short, if any company skips a year, they should be treated as fresh company in the following year if they come.
Please download the attached sql file, where the table and data is given, also the query is given. The query was basically skipping any missing year for a company and was incrementing the year reargless.