See the Using the Query Table Data Construct page in the Using Query Tables section of the Authoring Guide.