Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code not working. #7

Open
anmoljain1230000 opened this issue Jan 19, 2021 · 1 comment
Open

Code not working. #7

anmoljain1230000 opened this issue Jan 19, 2021 · 1 comment

Comments

@anmoljain1230000
Copy link

Kk @

![20210119_134543](https://user-images.githubusercontent.com/77664305/105007144-a1ec2c00-5a5d-11eb-8766-4337c288c3df.jpg)

@SilvioCruzDeveloper
Copy link

The SQL query you found appears to have some syntax errors. I'll correct it and check if it's wrong

Here's the corrected SQL query:

SELECT year, SUM(precipitation) as total_snow, MAX(precipitation) as max_precipitation FROM STATION_DATA WHERE year >= 2000 GROUP BY year;
Changed SUM(precipitation) as max precipitation to MAX(precipitation) as max_precipitation to find the maximum precipitation value.

Corrected WHERE YER >=2000 to WHERE year >= 2000 to compare the year correctly.

This query should now work correctly to calculate the total snow precipitation (total_snow) and the maximum precipitation (max_precipitation) per year starting from 2000 in the STATION_DATA table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants