Messaging Queries are setup to enable end users to send in queries and receive a response.

The query builder offers two ways to enter queries, either via the simple query builder with menus, or by using SQL language.

The message builder lets you determine how the query will be accessed and how many results are to be returned.

Lastly, define the format of the message response and add in free form text as needed. Additionally, as below, it's easy to setup replies to queries to request more information.
This is where you query the data and create the messages which are sent back to the users. For each query, you can add user reply functionality.
Properties
Add details about the query you will create and select what kind of query you want to use, to retrieve (Select), edit (update) or add (insert) data. Select the datasource you want to use for the query.
Query Builder
Define what data you want to get from the database with the query builder. Or you can type in SQL statements for more complicated queries.
Test your query after setting it up to make sure you get the correct data.
Message Builder
Add the email, sms or IM number which the queries will be sent to and associate a keyword with that query. Add in the number of results you want back. Next, setup how you want the message to look when it is retrieved.
Test the results to make sure you get the correct data.