The ubiquitous HR.EMPLOYEES table – how many different ways can we look at this data?
How much money people make, by department?
By reading the column comments, we know that HR.EMPLOYEES.SALARY is
“Monthly salary of the employee. Must be greater than zero (enforced by constraint emp_salary_min)”
So let’s chart that.
This charts the data we get back from
SELECT avg(SALARY), JOB_ID FROM HR.EMPLOYEES GROUP BY JOB_ID ORDER BY 1 DESC
We want our reports, charts, and pictures to tell a story. Maybe this data would make more sense if we had some point of reference? Like, how much money did I make in my first job out of college?
Adding the Static Chart Element
Remember, you can select a connection during design-time to live-preview your chart as you design it. Hitting the check-box ‘test’ button in the upper right hand corner generates the chart with the live-data from the query defined in the report.
This ability to test your reports as you go is one my big reasons you should upgrade to version 4.0 of SQL Developer. The others being, of course, that any other version is quite old now, and that Java 7 runs much better than Java 6. But that’s a different sermon, and we’ll save that for another day.