STEP 1: Enter a Google spredsheet key (and optional sheet ID) and hit preview to preview the column headings
STEP 2: Once you have previewed the column headings, you can write your query. [Google Query Language reference docs]. Use the column letters shown above in your query (eg SELECT A,B LIMIT 10).
Try out some visualisation queries here...