Query Results Table

After executing a query, the query results are presented in the Query Results window. In this window, the number of results returned for the query, the time it took to execute the query, and the overall query execution status are included, as shown in Fig. 211.

**Query Results** window for ’What are all the grandparent/grandson pairs?’

Fig. 211 Query Results window for ’What are all the grandparent/grandson pairs?’

Results in the Query Results window are by default presented in a table format. Each row in the table represents a result found. Each column within a row contains the returned value of the column variable for that row. Fig. 212 shows query results displayed in this default view for the query What are all the grandparent/grandson pairs?

**Query Results** window default view for ’What are all the grandparent/grandson pairs?’

Fig. 212 Query Results window default view for ’What are all the grandparent/grandson pairs?’

Also by default, results are sorted in ascending order by the first column of the table. In the case of What are all the grandparent/grandson pairs?, the results are sorted in ascending alphabetical order of the variable ?Grandparent, as seen in Fig. 212. To sort the results by another column variable, click the corresponding column header. For example, click the column header ?Grandson, and the results will be presented in ascending alphabetical order of the variable ?Grandson, as illustrated in Fig. 213.

Results for ’What are all the grandparent/grandson pairs?’ are sorted by column variable **?Grandson** in ascending order

Fig. 213 Results for ’What are all the grandparent/grandson pairs?’ are sorted by column variable ?Grandson in ascending order

Click a column variable a second time reverses the sort order by that column variable. For example, click the column header ?Grandson again, the results will be sorted in descending alphabetical order by ?Grandson, as shown in Fig. 213.

Results for ’What are all the grandparent/grandson pairs?’ are sorted by column variable **?Grandson** in descending order

Fig. 214 Results for ’What are all the grandparent/grandson pairs?’ are sorted by column variable ?Grandson in descending order

Each row in the results table is accompanied by a ? button. This button, when clicked, provides an explanation for the result in the corresponding row. For example, click the ? button to the right of the result row Florian as grandparent and Peter as grandson, as shown in Fig. 215.

Click **?** to the right of the result row **Florian** as grandparent and **Peter** as grandson

Fig. 215 Click ? to the right of the result row Florian as grandparent and Peter as grandson

A new tab is created to explain the result. Click this new tab to see the explanation tree. Expand the tree to see all the rules and facts used to derive the result. The fully expanded explanation tree for the result Florian as grandparent and Peter as grandson is shown in Fig. 216.

Result explanation for **Florian** as grandparent and **Peter** as grandson

Fig. 216 Result explanation for Florian as grandparent and Peter as grandson