# How to create a search that returns trial customers who do not have a purchased license

If you want to target emails to trial customers who do not have a purchased license, you can create a search that excludes customers with a permanent or subscription license.

* Launch the QLM Management Console
* Go to the Manage Keys tab
* Click Search and then Edit Searches
* Click Add to add a new search
* Set a name to: Trials that expired in last 30 days
* Set the SQL fied to: licenseModel='trial' and Email Not In (Select Email from qryLicenseInfo where licensemodel<>'trial' and Email is not NULL) and SubscriptionExpiryDate > \[today\_start-30] and SubscriptionExpiryDate < \[today\_start] and IncludeInMailList <> 0 and Disabled=0
* Click Ok

Now you can create a scheduled task that uses this search.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.soraco.co/docs/how-to/how-to-create-a-search-that-returns-trial-customers-who-do-not-have-a-purchased-license.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
