May 2020
Beginner
564 pages
14h 9m
English
Another important thing to look for is missing values to determine whether you need to fix the values or remove the data points. To see the count of NULL versus NON NULL values in a table, execute the following query:
USE lahmansbaseballdb; SELECT SUM(!ISNULL(h)) AS hits_count,SUM(ISNULL(h)) AS null_hits_countFROM batting;
The results from the preceding query can be seen in the following table:
| hits_count | null_hits_count |
| 105861 | 0 |
Looking at the results in the preceding table, you can see that there aren't any NULL values for hits since null_hits_count is 0.
Let's try a different column in our preceding query, as follows:
USE lahmansbaseballdb; SELECT SUM(!ISNULL(ibb)) AS ibb_count,SUM(ISNULL(ibb)) AS null_ibb_count ...
Read now
Unlock full access