good day everyone, i would like to ask you guys for help.
see i have a table Table1
with columns
Item_id,
date,
count
what i need is a MySQL query that will: query conditions *all items with the same id should be merged in one row *sort dates from earliest to latest into one row.
thank you and have a great day.
Table1
Item_id||Date |Count
1 |01-20-2017| 12
1 |02-02-2017| 5
1 |03-01-2017| 10
2 |03-01-2017| 45
3 |01-26-2017| 15
1 |04-09-2017| 12
2 |04-25-2017| 5
3 |02-15-2017| 45
Table2
Item_id Date1 Count1 Date2 Count2 Date3 Count3 Date4 Count4
1 01-20-2017 12 02-02-2017 5 03-01-2017 10 04-09-2017
2 03-01-2017 45 04-25-2017 5
3 01-26-2017 15 02-15-2017 45