This took me a while to figure out because I had to figure out what was actually going on in these excel data sets. Once I looked over those thoroughly, and cleaned them up it became a bit easier.
When I was first trying to join the FL_Nativity and FL_Poverty2, it took me a few times but I got it. I mainly messed it up due to slight typing errors, or something of the sorts. Once I got it to join them, I wasn’t so sure of what exactly it did. After reading some of the supplemental reading you provided, I saw that it is pulling out the matching data from both Id2 columns. This is when I finally felt like I could start working on what you were actually asking of us.
Once I got it all working and figured out I was able to run the first few queries. Assuming, I understood what you were asking us to look for, I found that Miami-Dade had the most people that were in the category, “below_poverty”. The total was 530,006.
I did this in two different steps. First I found the number of people by using the code,
SELECT MAX (Income_Below)
FROM FL_poverty2
Once I ran that, it only gave me the Miami-Dade, “Income_Below”. It didn’t provide me with the county name. So to find the county name that corresponded with that number I ran this code.
SELECT * FROM FL_poverty2
WHERE Income_Below = 530006
That code then brought up the whole Miami-Dade row.
I did this same process for the, MIN (Income_Below). I found that Liberty County was the county with the fewest people with Income_Below. The number it gave me 1,237 people.
I then strugged with the next question a little bit. Initially, I just didn’t understand what it was asking. Once I figured it out I used the following code to find the top three counties which were Miami-Dade, Broward, and Palm Beach.
SELECT * FROM FL_poverty2 ORDER BY Income_Below_Foreign_Not_Citizen DESC
I wasn’t able to figure out the bonus question to have it ready for the blog post to be turned in on time. The other parts of the assignment took me a while to figure out as I had to go back through the w3schools.com website many times to refresh myself on the content and what commands did what.
I probably could have cleaned up my poverty database a bit more too. I could have deleted the word, “income” in all of my rows. Considering it is in every row, it is a little unnecessary. I also renamed and cleaned up all the rows within the SQL manager which tool me a while. It was frustrating because out of habit I would press the, “enter” key when I was done re-naming a row, and then it would try to create the new database. Then I would have to start the whole process over again.
Overall it was tedious things for me that took up my time, like renaming the rows, understanding the spreadsheets, understanding what you wanted, and refreshing myself on the commands.
Good job on this. Nice blog post. Yes, it is tedious no matter how you cut it, but once you get the basics down, this is a very powerful tool.