This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- There is no readily apparent unique identifier for the dataset so far, | |
| -- this appears to have caused duplication issues during importing in DBeaver | |
| -- this will be addressed first. | |
| -- city_ID could be a unique identifier for all rows. | |
| SELECT city_ID, | |
| scientific_name, | |
| COUNT(*) AS row_count | |
| FROM dc_tree | |
| GROUP BY city_ID, scientific_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Washington DC Tree Survey, Exploratory Data Analysis | |
| SELECT * | |
| FROM dc_tree_unique | |
| ; | |
| -- How many total trees are there? | |
| SELECT COUNT(*) | |
| FROM dc_tree_unique |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Welcome to my Washington DC Tree Survey Project. | |
| -- Lets first select all and view the data | |
| SELECT * | |
| FROM dc_tree | |
| ; | |
| SELECT * | |
| FROM dc_tree |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT * | |
| FROM dc_tree_final | |
| ; | |
| -- Removing any rows that have nulls in both name columns | |
| SELECT * | |
| FROM dc_tree_final | |
| WHERE scientific_name = '' | |
| AND common_name = '' |