SQL
A staple within industry, Standard Querying Language is a must know skill in the field of data. Below you will find some examples of where I have used SQL queries to conduct my analysis.
A staple within industry, Standard Querying Language is a must know skill in the field of data. Below you will find some examples of where I have used SQL queries to conduct my analysis.
Summary of task:
For this task, I was provided with data on various US Craft Beers. Using sqlite3, I made various queries to answer some questions on data provided.
First thing to do was to see what tables I was working with and also what those tables consisted of.
Above: Query to find out the table names
Left: Query to find out the headings found in each table
Next step, was to find out what each table actually looked like when opened:
'Beers' Table
'Breweries' Table
From the 'Beers' table, I created a query to find the max, minimum and average 'abv' for the beers in the data set using MIN(), MAX(), MEAN() query functions, alongside creating alias' for each.
To get a more thorough understanding of the abv values, I used the created list to create a histogram to show the distribution of abv values.
The histogram actually shows that the 2 most common abv values are lower than average.
After investigating the abv values of the beers, I then wanted to look into the bitterness of the different styles of beers available. I created 2 queries to get an ibu value for lagers and another for pale ales.
As expected, pale ales came out higher in terms of bitterness.
Another area I wanted to look into was what style were more popular. Again, I created a query to get the totals for the various styles in the data set.
American Pale Ales came out on top, however this is a data set relating to US Brewing Companies.
I wanted to see if any beers were brewed in New Orleans, simply because I support the American Football team based their.
So, I made a query to do this and found that 6 beers are brewed there.
From this I wanted to see if any of this brewery made the top 10 for beers produced. I made the query to show the top 10 breweries by beers produced along with the city they're located.
Unfortunately, it wasn't.
Expanding the search from cities, I made a final query to see what states have the most breweries.
Colorado came out on top with 47 breweries.