Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Useful stock SQL datasets?

Does anyone know of any resources that provide good, useful stock datasets? For example, I've downloaded a SQL script that includes all of the U.S. states, cities, and zipcodes. This saved me a lot of time in a recent application where I wanted to be able to do lookups by geography. Are any of you aware of other useful datasets that are freely available for download?

For example:

  • Blacklisted IP addresses
  • Names of colleges/universities
  • Names of corporations/stock symbols

Anyone have any recommendations?

EDIT:

As an example, here is the location where I found a MySQL script containing all of the U.S. zip codes and their corresponding latitude/longitude. Has anyone else found similarly useful datasets in SQL that can be easily imported and used?

http://www.chrissibert.com/blog/wp-content/uploads/2009/06/zipcodes.7z

EDIT 2:

To clarify what type of datasets I'm talking about... I'm referring to datasets that can be immediately useful for applications, can be applied across a variety of scenarios, and typically represent information that is easy to find for small cases but harder to compile for larger data sets. The zip code database is a great example to me. It's not hard to get the lat/long for a single given zip code. But, it's a bit more time consuming to get the values for all valid zip codes in the U.S. This data is also not useful to a single industry or business sector, but can be applied across a range of applications.

like image 851
Shadowman Avatar asked Dec 22 '10 18:12

Shadowman


People also ask

How SQL is used in stock market?

Analytical function in SQL may help us to take an average or other aggregation with a group of rows in a table. Using this, we can use the analytical function to help us gather the last 50 days of the closing price and take an average for every trading day in 2019. Now, the result looks more promising.

Which database is best for financial data?

If you had no concerns about storage costs (managed MongoDB Atlas is a bit pricey), MongoDB is a clear winner for storing end-of-day OHLC data. It has the fastest reads and very good writes and multi-record appends.

How is SQL used in finance?

What is SQL used for in finance? In finance teams, transactional data are stored in relational databases. SQL can be used to easily search for either single instances of data or for data that match a set of requirements, like withdrawals over $5,000 in the last month.


2 Answers

Lots of links to open data sets here:

http://readwrite.com/2008/04/09/where_to_find_open_data_on_the/

although I doubt any of them will generate SQL statements for you.

like image 91
Ed Harper Avatar answered Sep 22 '22 01:09

Ed Harper


Shadowman, better if you say detail list of what you want.

  • Blacklisted IP addresses - Ad? Xxx? Fraud?
  • Names of colleges/universities - All in the world? Wouldn't it be too much?

Here is an idea how to drop down a list of something - this is how I do that:

For example, I need a list of colleges/universities in California.

  1. I google for: colleges california wikipedia. Then open the first found item there;
  2. By using mouse I select all the colleges and universities from there to clipboard;
  3. Open Excel and paste copied names into the first row+column;
  4. In the second cell of the first row write templated script, like:

    ="INSERT INTO Colleges (state, name) VALUES ('CA', '" & RC[-1] & "');"
    

    This should produce something like

    INSERT INTO Colleges (state, name) VALUES ('CA', 'Academy of Art University, San Francisco');
    INSERT INTO Colleges (state, name) VALUES ('CA', 'Allied American University, Laguna Hills (Online)');
    INSERT INTO Colleges (state, name) VALUES ('CA', 'American Jewish University, Los Angeles');
    INSERT INTO Colleges (state, name) VALUES ('CA', 'American Sports University, San Bernardino');
    INSERT INTO Colleges (state, name) VALUES ('CA', 'Anaheim University, Anaheim (Online)');
    INSERT INTO Colleges (state, name) VALUES ('CA', 'Antioch University, Culver City');
    -- etc...
    
  5. Then just copy generated script and use it for your database
like image 32
Genius Avatar answered Sep 23 '22 01:09

Genius