Working with the SQL Template Designer > Example of a Pie Chart SQL Template: Job Size by Job Type
  
Version 10.0.01
Example of a Pie Chart SQL Template: Job Size by Job Type
The following example creates a pie chart that represents the various job types—such as, application backups, full backups, incremental backups, and restores—as sectors (slices) in a pie chart.
1. In the SQL Template Designer, do not check any Template Designer items.
2. In the Query window, enter the following select statement and click Validate Query:
SELECT job_type_name,
sum(kilobytes/1024/1024) Job_SIZE_GB
FROM APT_V_NBU_JOB_DETAIL
WHERE
finish_date > sysdate -7
AND job_type_name IS NOT NULL
GROUP BY job_type_name
ORDER BY job_type_name
3. In the Formatting window, select Pie Chart from the Display report as drop-down list.
4. For the Caption field, select job_type_name from the drop-down list.
5. Select all the fields to be displayed.
For a pie chart, you need at least one field to be the caption and another field to be the sector.
6. Click Next, enter a report name and Menu Group. Then, click Finish.
7. When you run this report, the output will look something like this:ì