Query a list of field values of a node in drupal 7 I am new to drupal 7, I have a question and hope to receive your helpful responses! :D

I've created a new content type named 'school', and create a custom 'city' field in it.
After that, I create two new nodes of 'school', and their city are 'London' and 'Beijing'.
How can I get a list of city of schools programmatically in Drupal 7?

Any help will be appreciated!
Consider using the Forena module, it comes with all sorts of reporting features. And all sorts of hooks if you want to use them in your own custom modules.
Here is an excerpt from its Community documentation:

Forena Reports is built of the idea of using SQL to get data out of a database and use XHTML and CSS to format it into web reports.
It is designed to leverage existing knowledge of HTML, CSS, SQL and JavaScript to help you create rich interactive web reports.

Disclosure: I'm a co-maintainer of Forena,
I hope this does not violate the site's policy on self-promotion.