The type of Gantt graph is thought to represent values between two temporary measures.
1 Example
This example shows the occupation of employees over time.
For this example, the following table will be created: employee_inout where the employees' check-in and check-out is stored.
Copy
CREATE TABLE employee_inout ( employeeid integer not null, time_in datetime year to second not null, time_out datetime year to second not null ); ALTER TABLE employee_inout LOCK MODE (ROW); CREATE INDEX f_employee_inout1 ON employee_inout(employeeid); ALTER TABLE employee_inout ADD CONSTRAINT FOREIGN KEY (employeeid) REFERENCES employee(employeeid) CONSTRAINT f_employee_inout1;
Insert the following records:
Copy
INSERT INTO employee_inout (employeeid, time_in, time_out) VALUES(1,'2013-12-01 08:00:00','2013-12-01 13:00:00'); INSERT INTO employee_inout (employeeid, time_in, time_out) VALUES(2,'2013-12-01 08:00:00','2013-12-01 12:00:00'); INSERT INTO employee_inout (employeeid, time_in, time_out) VALUES(3,'2013-12-01 08:00:00','2013-12-01 10:00:00'); INSERT INTO employee_inout (employeeid, time_in, time_out) VALUES(3,'2013-12-01 11:00:00','2013-12-01 13:00:00'); INSERT INTO employee_inout (employeeid, time_in, time_out) VALUES(4,'2013-12-01 16:00:00','2013-12-01 19:00:00'); INSERT INTO employee_inout (employeeid, time_in, time_out) VALUES(5,'2013-12-01 15:30:00','2013-12-01 18:00:00'); INSERT INTO employee_inout (employeeid, time_in, time_out) VALUES(6,'2013-12-01 16:00:00','2013-12-01 17:30:00'); INSERT INTO employee_inout (employeeid, time_in, time_out) VALUES(7,'2013-12-01 18:00:00','2013-12-01 20:00:00');
Now the data is:
You see the parameterization of the box:

- Selector type of Gantt graph.
- Column of the sentence with which you want to group and divide the graph, in this case the name of the employee firstname.
- SQL statement to execute, in this case:
Copy
<select> <columns> employee.firstname, time_in, time_out </columns> <from table='employee_inout'> <join table='employee'> <on>employee_inout.employeeid = employee.employeeid</on> </join> </from> <order>2,3</order> </select>
* Starting from the table of the entry and exit of the employees.
4. In the series a series of gantt type is added with the two temporary columns, in this case ' time_in' and ' time_out'. That correspond to the temporal columns of the sentence.


- In the y-axis, each one of the existing employees is represented in the sentence.
- Time range
* When positioning on a zone, it details the value.