Ransomware attackers specifically target and attempt to destroy backup systems to increase the probability of payment. Hardening your system is critical. Please ensure you have reviewed your platform security using the Security Hardening Checklist
Cohesity

COHESITY Documentation

Explore our documentation to get started, discover products & new features, access troubleshooting guides, register sources, platforms support.

Products
Data Security Alliance
Visit Cohesity.com
Demos
Support
Blogs
Developers
Partner Portals
Cohesity Community
© 2026 Cohesity, Inc. All Rights Reserved.
Terms of Use|
Privacy Policy|
Legal|
  1. Home
  2. IT Analytics Help
  3. Section IV. End user
  4. Work with the SQL template designer
  5. Construct the SQL Query

Construct the SQL Query

The SQL Template Designer supports SQL select statements. You cannot specify UPDATE, DROP, ALTER, or CREATE statements.

To view the available database views and fields that can be used when you create a query, click the Help icon.

See Access Help for Database Views.

Refer to examples of queries.

See Sample SQL Queries.

  • In the Query window, construct your select statement using the following tips:

  • Use the drop-down list at the bottom left of the window to select views and fields.

  • Use the Help to look up the valid tables, fields and variables.

    See Access Help for Database Views.

  • To insert a view name into a query, double-click a field and then delete the field portion. For example, in the aps_v_database_datafiles_log view, click on datafile_id. Then, in the query, delete the .datafile_id portion.

  • Double-click on fields to insert them into the query with the correct syntax.

  • Double-click on variables in the list at the right of the window, to insert variables with proper syntax into the query--for example, ${endDate}

  • If you checked Host Group and Client Scope in the initial tabbed Template Designer window, you will see that the drop-down list of Template Designer Variables (at the right of the window) includes Report Scope selections. Using these selections, you can enumerate a list of values for Host Groups (hostGroups) and Clients (hosts).

  • All evaluated columns--for example, nvl(t2.das_capacity,0)--must have an alias name.

  • Certain special characters, when used in SQL queries, must be escaped with a backslash so that they can be evaluated as literals. For example, to treat a $ character as a literal value, use: \$.

    See Special Characters in SQL Queries.

    See Example of Using a Special Character as a Literal in a SQL Query.

  • Click Validate Query.

  • Correct the statement before you proceed. Use the available lists to view valid tables, fields, and variables.

  • Once the query validates, click Next to proceed to format the SQL template output.

    See Format the SQL Template Output.

Feedback

Was this page helpful?
Previous

Example of a Query Custom Combo Configuration in a SQL Template

Next

Help for Database Views

Feedback

Was this page helpful?