Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ataylorn/sql-data-exploration
Exercises where I went through large data sets, formatted the data so that it was consistent and easier to manipulate, and ran multiple SQL queries to analyze the data.
https://github.com/ataylorn/sql-data-exploration
Last synced: 4 days ago
JSON representation
Exercises where I went through large data sets, formatted the data so that it was consistent and easier to manipulate, and ran multiple SQL queries to analyze the data.
- Host: GitHub
- URL: https://github.com/ataylorn/sql-data-exploration
- Owner: ATaylorN
- Created: 2024-02-10T19:41:00.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-04-23T18:23:18.000Z (7 months ago)
- Last Synced: 2024-04-23T20:15:29.981Z (7 months ago)
- Homepage:
- Size: 61.8 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Projects:
> (followed a FreeCodeCamp.org tutorial called 'Data Analysis Bootcamp' hosted by 'Alex the Analyst')## Covid Analysis-Data Exploration.sql
> The data I used is located in CovidDeaths.xlsx and CovidVaccinations.xlsxUsed SQL to analyze Covid data. Looked at things like countries with the highest rates of infection per population, countries with the highest death count per population, and continents with the highest death count per population.
**What I Learned:**
How to create temporary tables, How to create views, What common table expressions(CTEs) are and how to create them. I also dealt with an interesting additional challenge in that my dataset had an additional 2 years worth of data. When I went to create rolling totals, for example, I ran into issues with the data type not being large enough to hold the data I needed it to. Long story short, I used the cast and convert functions a lot as well as bigint.
Example of Creating a View:
`CREATE VIEW PercentPopulationVaccinated AS`
`SELECT dea.continent, dea.location, dea.date, dea.population, vac.new_vaccinations,`
`SUM(CONVERT(bigint,vac.new_vaccinations)) OVER (PARTITION BY dea.location ORDER BY dea.location, dea.date) AS rolling_people_vaccinated`
`FROM CovidAnalysis..CovidDeaths dea`
`JOIN CovidAnalysis..CovidVaccinations vac`
`ON dea.location = vac.location and`
`dea.date = vac.date`
`WHERE dea.continent IS NOT NULL`## Nashville Housing-Data Cleaning.sql
> The table that I cleaned is NashvilleHousingDataDataCleaning.xlsxUsed SQL to reformat the data in an Excel spreadsheet to make it more readable. It was a great refresher on making updates to SQL tables.
**What I Learned:**
How to use Parsename function, how to join a table on itself and where that
might be useful. This exercise was mostly a great refresher on what I already knew of SQL