MySQL Pivot

Hi, colleague,

I need help here. I want to create a dynamic table to show the output I want.

Here is my database table:

sample.png
SEMrush

I want it to show

clientele | last name first name Work 1 | Quantity | Work 2 | Quantity
283641 King Ann 04-18-2017 268.00 07-11-2016 708.00

Where the Columns of work are dynamic, which contains the date of work and the amount is also dynamic that contains the amount of work.

Can you help me create a PIVOT outside the table I presented and the output I need?

Thank you

Neil

The work number is dynamic, since it contains the date of the work that a client has, so if the client x has 4 jobs, it will show 4 columns of Jobs and Quantity. and if the client has only 2 Jobs, it will show 2 Jobs and Quantity and two Jobs will be 0