I read about the YQL, but I didn't understand how can I get some simple data (like company ticker, market cap, stock price, etc.), for ALL COMPANIES?
And an additional question, how can I get all Yahoo Finance tables and theirs fields that can be queried by YQL?
To your first question, you can't really do any query through YQL to get data for all companies. It's more oriented towards obtaining data for a smaller query. (I.e., it's not going to give you a full data dump of the whole Yahoo! Finance database.)
To your second question, here's how you can get started exploring the Yahoo! Finance tables in YQL:
finance
in the search fieldThen you can try some example queries like the following:
select * from yahoo.finance.quote where symbol in ("YHOO","AAPL","GOOG","MSFT")
Update 2016-04-04: Here's a current screenshot showing the location of the Show Community Tables checkbox which must be clicked to see these finance tables: