use market_data;


Investigate 
Analyst Ratings
Currency Conversion


-- STATISTICS
select 'Zacks Rank' description,count(*) records,date from zacksrank group by 3 order by date desc
select 'Valuations' description, count(*), valuation_date from valuations group by 3 order by valuation_date desc
select 'Yield Curve' description,count(*), date from yieldcurve group by 3 order by date desc
select 'Splits' description,count(*), modified from splits group by 3 order by modified desc
select 'Security Master' description,count(*), date(create_date) from securitymaster group by 3 order by create_date desc
select 'SEC Filings' description,count(*), filing_date from secfilings group by 3 order by filing_date desc
select 'Prices' description,count(*), date from prices group by 3 order by date desc
select 'Options' description,count(*), modified from options group by 3 order by modified desc
select 'Insider Transaction' description,count(*), filing_date from insidertransaction group by 3 order by filing_date desc
select 'Fundamentals' description,count(*), asof from fundamentals group by 3 order by asof desc
select 'Income Statement' description,count(*), modified from incomestatement group by 3 order by modified desc
select 'Cashflow Statement' description,count(*), modified from cashflowstatement group by 3 order by modified desc
select 'Balance Sheet' description,count(*), modified from balancesheet group by 3 order by modified desc
select 'Historical' description,count(*), asof from historical group by 3 order by asof desc
select 'Headlines' description,count(*), asof from headlines group by 3 order by asof desc
select 'ETF Holdings' description,count(*), modified from etfholdings group by 3 order by modified desc
select 'Economic Indicators' description,count(*), modified from economicindicators group by 3 order by modified desc
select 'Earnings Announcements' description,count(*), period_ending from earningsannouncements group by 3 order by period_ending desc
select 'Dividend History' description,count(*), modified from dividendhistory group by 3 order by modified desc
select 'Currency Conversion' description,count(*), asof from currencyconversion group by 3 order by asof desc
select 'Analyst Ratings' description,count(*), date from analystratings group by 3 order by date desc
select 'Anayst Price Target' description,count(*), date from analystpricetarget group by 3 order by date desc



--
select * from analystpricetarget limit 1
select * from historical where asof='2019-07-31 00:00:00'




