How does Bloomberg extract the overall PE data of foreign stock markets?

You are lucky that I happened to see it.

With the api, you can input stocks, such as aapl us equity, then flds, which will search for pe or price earning, and the API of Bloomberg, and you can just bring it up directly.

Or you can call Bloomberg's help desk.

For example, I want to find a PE of a stock in the past 12 months, which should be =BDH (code, "TRAIL _ 12m _ EPS", "ED- 1CD", Date, "Points = 1", "dts = H.

If you need details, you can add me QQ by private message.