SQL Tutorial | How to Avoid a Divide By Zero Error in SQL | NULLIF
HTML-код
- Опубликовано: 15 май 2023
- In this SQL tutorial, we learn some techniques to avoid the Divide By Zero error in SQL.
How to install SQL Server for practice?
• How to install SQL Ser...
Check out the complete list of SQL Query Interview Questions -
• SQL Query Interview Qu...
Must Do Data Analytics Certifications -
Google Data Analytics Professional Certificate
imp.i384100.net/OR37oQ
Google Advanced Data Analytics Professional Certificate
imp.i384100.net/eK1WmQ
Best Data Science / Analytics / SQL courses
Learn SQL Basics for Data Science Specialization
imp.i384100.net/qnXYk5
IBM Data Science Professional Certificate
imp.i384100.net/LPQvg3
Data Science Fundamentals with Python and SQL Specialization
imp.i384100.net/mgVYre
Python for Everybody Specialization
imp.i384100.net/DVz7Aj
Google Data Analytics Professional Certificate
imp.i384100.net/OR37oQ
Coursera Plus - Data Science Career Skills
imp.i384100.net/c/3299742/132...
Please do not forget to like, subscribe and share.
For enrolling and enquiries, please contact us at
Website - knowstar.org/
Instagram - / learn.knowstar
Blog - know-star.blogspot.com/
Facebook - / knowstartrainings
Linkedin - www.linkedin.com/company/know...
Email - learn@knowstar.org
Thanks I really need this help with sql server
Glad it helped
Thank you for posting this video. Though it sounds simple, it is of great use for many folks.Keep posting the tricky SQL videos.
Thank you
Thanks, helpful!
Thank you
I use case statement in that condition
Yes, it is easiest to understand.
Select Date_reported, SUM(New_cases) as Totalcases,SUM(cast(New_deaths as int)) as TotalDeaths ,
SUM(cast(New_deaths as int))/NULLIF (SUM(New_cases,0),0)*100 as TotalPercentage
From portfolioproject.. ['WHO-COVID-19-global-data$']
Group by Date_reported Can you please help me about this i got an error it says the sum functions requires 1 argument.
If I'm not wrong you need to delete last ,0) => NULLIF (SUM(New_cases,0)*100