If we are looking at an integer column that has some null rows:
select day1, tickets1
from stats1;
day1 | tickets1 |
2022-07-03 | 2 |
2022-05-08 | null |
2022-03-05 | 5 |
Rather than having the null, we can set that row to “0.” For doing that, we utilise the “coalesce()” function that gives the first not-null argument it has passed:
select day1, coalesce(tickets1, 3)
from stats1;
day1 | tickets1 |
2022-04-05 | 2 |
2022-06-03 | 4 |
2022-01-08 | 5 |
This blog help you implement Coalesce() function to delete the null rows from the columns. I hope this blog is adequate for eliminating the null rows.
Snowflake Related Articles
If you have any queries, let us know by commenting below.
Stay updated with our newsletter, packed with Tutorials, Interview Questions, How-to's, Tips & Tricks, Latest Trends & Updates, and more ➤ Straight to your inbox!
Name | Dates | |
---|---|---|
Snowflake Training | Aug 05 to Aug 20 | |
Snowflake Training | Aug 08 to Aug 23 | |
Snowflake Training | Aug 12 to Aug 27 | |
Snowflake Training | Aug 15 to Aug 30 |
1 /10
Copyright © 2013 - 2023 MindMajix Technologies