I want to find, for free, or at a reasonable price, a database of historic fundamental stock data for the NYSE and Nasdaq from inception till date. Where can I get this information? I am willing to get raw financial statement data and calculate whatever I need from it. The key is that the data should be SQL queriable. The best I found was global finance data which charges from 2500$ to 8000$ per year depending on the amount of data. Anything that can top that?