Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- DATE_FORMAT(B.date, '%b/%Y') DD,
- (B.confirmed - A.confirmed) + (B.total_reinfections - A.total_reinfections) as cases_with_reinfections,
- (B.total_deaths - A.total_deaths) as deaths
- FROM cases A INNER JOIN cases B
- ON A.date = LAST_DAY(B.date - interval 1 month) and B.date = LAST_DAY(B.date)
- ORDER BY B.date DESC
Add Comment
Please, Sign In to add comment