I have a 'point' table, with columns (id, pis, date, time), which record the input and output of a product ('pis'). I wanted to group it into another table, where the data, pee and date, are the same group all the 'time' data are grouped into a single column. Ex Table 1
+-------+--------------+-------------+----------+
| id | pis | data | hora |
+-------+--------------+-------------+----------+
| 1 | 12113879222 | 2018-02-02 | 07:21:00 |
| 2 | 12113879222 | 2018-02-02 | 11:59:00 |
| 3 | 21056646219 | 2018-02-02 | 07:32:00 |
| 4 | 21056646219 | 2017-05-17 | 12:01:00 |
For table 2
+-------+--------------+-------------+----------+----------+
| id | pis | data | hora1 | hora2 |
+-------+--------------+-------------+----------+----------+
| 1 | 12113879222 | 2018-02-02 | 07:21:00 | 11:59:00 |
| 3 | 21056646219 | 2018-02-02 | 07:32:00 | |
| 4 | 21056646219 | 2017-05-17 | 12:01:00 | |