Hi,
I need help with identifying unique row after fetching data using pivot and group by.
Data in table Table_1:
ID is the primary key in table
Delivery_id + Role_id also identifies a unique row in the table
ID | Project | Deliverable | Role |FTE_Days | Delivery_ID | Role_ID
- | p1 | D1 | R1 | 1 | 11 | 10
- | p1 | D1 | R2 | 5 | 11 | 11
- | p1 | D2 | R1 | 1 | 13 | 10
In UI, data is displayed as below from table_1 (using pivot and group by):
Pivot over 'Role' and Group by 'Deliverable'
Project | Deliverable | Role R1 | Role R2
p1 | D1 | 1 | 5
p1 | D2 | 5 |
Now when user edits Role R1:
Project | Deliverable | Role R1 | Role R2
p1 | D1 | 2 | 5
p1 | D2 | 6 |
DB data:
ID | Project | Deliverable | Role |FTE_Days | Delivery ID | Role ID
- | p1 | D1 | R1 | 2 | 11 | 10
- | p1 | D1 | R2 | 6 | 11 | 11
- | p1 | D2 | R1 | 1 | 13 | 10