Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 1.37 KB

plmarkdown_hr_schema.md

File metadata and controls

33 lines (23 loc) · 1.37 KB

Oracle Database Sample Schemas

Human Resources (HR)

Data

The HR schema consists of several objects. With the following query...

SELECT * FROM user_objects

...you can select these objects from the data dictionary. An overview of the amount of each object is shown in the following table.

Index Procedure Sequence Table Trigger View
19 2 3 7 2 1
The same looks much better in a chart.
Chart from Chartspree.io

Interpretation

If you analyze the data, you can for example compare the salaries in different departments with a query like...

  SELECT InitCap(department_name) as "Department",
         Ceil(Min(salary)) AS "Minimum",
         Ceil(Avg(salary)) AS "Average",
         Ceil(Max(salary)) AS "Maximum"
    FROM emp_details_view
   WHERE department_name IN ('IT', 'Sales','Finance','Marketing','Shipping')
GROUP BY department_name
ORDER BY 1

...and then display the result in a big bar chart. Chart from Chartspree.io