Queries > Coding query

Coding query

Coding queries can help you to test ideas, explore patterns and see the connections between the themes, topics, people and places in your project.

To see what has been coded at a node, you can simply open the node (double-click in List View). You can use Coding queries to find content coded at selected nodes, a combination of nodes, or cases with particular attribute values.

You could use a Coding query to:

  • Gather material coded at combinations of nodes—for example, gather content coded at green policy and conservative government and explore the associations.
  • Gather material from cases with specific attribute values—for example, what do young farmers say about alternative energy?

A Coding query will only find content that has been coded. For example, if you ask the question what do fishery employees say about rising sea levels?—make sure you have coded content at the node rising sea levels and at nodes with the attribute fishery employee.

Create a Coding query

  1. On the Query tab, in the Create group, click Coding.
  2. Choose where you want to search for coding
    • Files and Externals—search for content in all the files and externals in your project
    • Selected Items—restrict your search to selected items (for example, a set containing interview transcripts)
    • Items in Selected Folders—restrict your search to content in selected folders (for example, a folder of interview transcripts)
  3. By default, the query will look for content where All of the following are true (i.e. all of the criteria you specify in the rows below are true). Select Any, from the pop-up menu, if you want content that meets any of your criteria.
  4. Define your criteria—the query will search for content that is coded in the way you specify here. You can find content that is coded at:
    • all of these nodes—the content must be coded at every node that you select (e.g. is coded at Node A, B and C)
    • any of these nodes—the content must be coded to at least one of the nodes you select (e.g. is coded at Node A or B or C)
    • any case where—the content must be coded at a case that has the attribute value that you select (e.g. is coded at a case with classification = Person and the attribute value for Sex = Female)
  5. To add additional criteria, click the Add Icon representing add button to the right of the last criteria in your list. 
  6. Click the Run Query button at the top of Detail View.

When the query has finished running, the results are displayed as a temporary preview in Detail View.

NOTES

  • When selecting nodes, you can select all descendent nodes in a hierarchy by holding down the Option key when you select a node higher in the hierarchy.
  • For more complex Coding queries, you may want to combine an All of the following are true criteria group with an Any of the following are true criteria group. To add an additional criteria group, press the Option key and click the Add Icon with three dots button.
  • To move a criteria row to a new location (for example, move a row down a level into another criteria group), drag the row to a new location.
  • To save the query, click the Save Query button and enter the name and description (optional).

TIP  Click the Expand icon at the top of Detail View to make more room for reviewing query results. Customize the work area

Examples of Coding query criteria

The following examples show how you can build query criteria to answer specific questions:

To answer the question

Do this

What do fishery employees say about rising sea levels?

Build a query where all of the following are true:

  • Coded at all of these nodes 'rising sea level'
  • Coded at any case where person:occupation = fishery employee

In what ways is the traffic management plan positively perceived? 

Build a query where all of the following are true:

  • Coded at all of these nodes positive
  • Coded at any of these nodes traffic, parking, shuttle bus

View the results

When you run a Coding query the results are shown as a preview in Detail View.

Click on the tabs displayed at the top to see different views of the results.

  • Summary lists the files that contain the content that matches the query criteria.
  • Reference displays the content that was returned by the query.

Click the Expand button (at the top right of Detail View) to make more room for working with your data. Customize the work area

Save the preview results as a node

If your query has returned interesting content, you may want to save it as a node, so that you can explore it further. For example, you might find all the content coded at both the nodes water quality and the node development. You can save the results to a new node that holds your evidence that Development negatively impacts water quality.

The node will contain the content displayed on the Reference tab in the query results in Detail View. If you repeatedly run the same query, you may want to merge the references into an existing node, rather than create them as a new node.

  1. Click the Save Results button at the top of Detail View.
  2. If you are creating a new node, enter a name and description.
  3. Click Save Results.

NOTE  By default new nodes are created in the Query Results folder, unless you choose another location by clicking The location icon represented by an arrow.