Queries

Queries help you to explore your data and investigate hunches as you progress through your project. You can:

  • Find and analyze the words or phrases in your files and codes.
  • Ask questions and find patterns based on your coding and check for coding consistency among team members.

Create quick and simple queries to get a sense of what is happening in the data, or build detailed queries for a more focused perspective. Queries & visualizations

What are the different queries?

Query Description Examples

Text search

Find all occurrences of a word, phrase, or concept.

  • Use the text search results to find and code the words fishery policy OR regulation to code them to a new code such as government.

  • Find content where the terms water and pollution occur within 20 words of each other.

  • Find all references to ocean, and find similar words such as sea.

Word frequency query

Find the most frequently occurring words or concepts.

  • Look for the most frequently occurring words in a set of interviews to identify an underlying theme from their responses.

Coding query

Find all content coded to selected codes, a combination of codes, or a combination of codes and attributes.

  • Run a query to answer the question What do Recreational Fishers say about water quality? by gathering content that has been coded to “water quality” for cases with the attribute “Recreational Fishing = Yes”

    For more examples, refer the sample project in NVivo.

Matrix coding query

Find the coding intersections or co-occurrence of themes in your project and display this in a matrix.

  • Compare views on the local economy (defined as codes in rows) based on gender (defined as case attributes)

  • Compare the positive and negative attitudes of interviewees to different aspects of the local economy.

  • Explore how tourism is related to a range of themes including water quality, real estate development and environmental change.

Crosstab query

Check how coding is distributed across the cases, or different types of cases in your project.

  • Check how often interview respondents refer to a particular topic or issue.
  • Check how many interview respondents (with attributes) refer to a topic or theme.

Compound query

 

Use a compound query to

  • Combine a text search query with a coding query
  • Search for two words that occur in the same paragraph (or other specified context).
  • Find content that contains the term zoning AND coded to Policy, Management.

  • Find content where the words Fish and sustainable occur in the same paragraph.

Coding comparison query

 

Compare coding done by two users or two groups of users.

This query measures the 'inter-rater reliability' or the degree of agreement for coding done by selected users.

Compare coding between users in different locations or from different disciplines who are coding the same data to check the consistency of their coding.

Group query

 

Find items that are associated in a particular way with other items. The items could be associated by coding, attribute value, relationships, 'see-also' links or maps.

  • Find the codes that I've used to code Interview with Barbara and Interview with Helen.

  • Which interviews have been coded to Balance and Local Knowledge?

  • Which files or cases have a certain set of attribute values—for example, who are the survey respondents from Harkers Island and Smyrna?

  • Find any maps that include tourism or natural environment.

Create a query

On the Explore tab, select the query you want to create.

By default, query results are discarded when you close a project, however you can save query settings to your project to run again, and save the results of some queries. Manage query results

Create a query with dynamic scope

When you create a query that you want to run at regular intervals—for example, a coding query to see how your coding is evolving—it is a good idea to use a dynamic set as the query's scope Dynamic Sets. Dynamic sets contain all the items that currently meet specified search criteria, so as your project changes, the items in the set change too.

For example, you could create a dynamic set that contains only files with the file classification Interview, and use the set as the scope of a coding query. Every time you run the query, any new files that you have added to the project that have the classification are added to the query (and any that have been removed, are removed).