- The Query
- Posts
- 🤓 Free Stock Market Datasets
🤓 Free Stock Market Datasets
Read Time: 3 minutes
Hey crunchers! The Query here — the data analyst newsletter that's like a pivot table for your data career, summarizing and analyzing data to reveal hidden trends and insights.
Here’s what we have for you today:
Free stock market datasets 📈
SQL Cheat Sheet (once again)
Comparing values in a SQL table with
NULLIF
Another classic data meme 😂
def learn_data_analysis(👨💻):
1. Check out this subreddit to learn what other data analysts are asking
Social media is great for connecting with and learning from other data analysts.
But the algorithm does not always serve the most relevant content.
One type of algorithm that serves very relevant and different content than social media platforms are forums.
Reddit is probably the most popular forum site on the internet.
There are a lot of great subreddits to learn data analysis from, but one I really like is r/dataanalysis.
On this subreddit, you can see the top questions and answers that other people in a similar situation to you are asking.
Some of the top posts from the past week are:
Finance to data - just landed my first data role
So Lost Visualizing Data in Python
Data Analysis Project (beginner)
You can check out the discussions going on on these forums and learn from the smart and helpful people in the comments!
You may already use Reddit, but if you don’t I would check it out and see what you can learn!
Check out the subreddit here: r/dataanalysis
2. (Once Again) SQL cheatsheet PDF and desktop wallpaper download 😃
Last week we sent this SQL cheatsheet out, but some people were still asking about it who may have signed up after we sent the email. (I get it, it looks amazing 😉)
In case you missed it last week:
Here’s the link to download straight from G Drive
select * from dataset-of-the-week
Many of the best datasets for analysis come from the world of finance.
Every day millions of new data points are created from price changes in the stock market.
One free source of this data is the Alpha Vantage API.
To get the data, all you have to do is create an API key for free and use something like the Python requests library to access the data.
If you don’t know how to do this I recommend jumping headfirst into this project using ChatGPT to help you.
Try a prompt like this:
“Write me a python script that pulls AAPL daily stock prices from the alpha vantage API and saves it to a csv on my desktop.”
Then modify it based on the documentation to see if you can get it to work.
If you’ve never pulled data from an API with Python before, you’ll be amazed and so satisfied once you actually get it to run correctly and see the data sitting on your desktop.
By the way, I deliberately didn’t give you all the answers to this one as a challenge!
Enjoy!
class MiniLesson:
NULLIF Function in SQL
Last week I made a LinkedIn post about how to check duplicates in SQL.
I received a comment asking about not just duplicates, but how to compare whether two columns in the same table have the same value.
There are a number of ways to achieve this, but today I will be discussing one good approach.
The NULLIF function.
NULLIF() is a conditional function in SQL, meaning it uses IF/THEN logic.
It that compares two expressions and returns NULL if they are equal.
Otherwise, it returns the first expression.
Imagine you have a users
table with columns for email
and backup_email
. You want to ensure that the backup_email
is not the same as the primary email
for security reasons.
Here's how you could use NULLIF
in this case:
In the results of this query, email_comparison
will be NULL
if the email
and backup_email
are the same.
This could be helpful to quickly identify any instances where the backup email is the same as the primary email, which could be a security concern.
In other words, any row where email_comparison
is NULL
is a row where the email
and backup_email
are identical.
This way, NULLIF can be used to compare columns and identify identical values, which can be useful in a variety of scenarios where identical values in different columns could be a problem.
Quick tips like this can really speed up your workflow as an analyst.
Happy SQL’ing!
import memes as 😂
Do you pronounce it dei-ta or dah-ta?
Learn from us 🤓
1. LinkedIn
2. YouTube
We’re slowly starting to create YouTube content. You can subscribe to the channel here.
3. Courses
Our course on showcasing your data portfolio is live!
In this course you’ll learn to create a data portfolio that stands out from the crowd of other applicants and land more interviews. Check it out here.
For now, we’re giving all newsletter subscribers 50% off — just use the code NEWSLETTER at checkout.
4. Guides
We’ll be launching the ultimate guide to becoming a data analyst for free in the next 30 days.
This ~15k word beast will provide you with everything you need on your journey to landing your first Data Analyst job.
If you have any questions you’d like answered in the guide, reply to this email and we’ll make sure to include an in-depth and comprehensive answer in the guide.
That’s it for today.
Stay crunchin’ folks and see you next week!
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
What'd you think of today's newsletter? |