Dynamic state of a column header in a pivot table (MySQL)

Good day to all! How can I create a pivot table with this data? i can't find a way how.

enter image description here

here is my request

SELECT titles.id, titles.title, titles.description,payRates.employment_type,payRates.salaryRateType, payRates.rate, payRates.frequency FROMsetting_job_titles titles INNER JOIN setting_job_titles_pay_rates payRates on titles.id = payRates.jobTitleId;

      

I wanted to group it by id and make job_type as the column header and evaluate it as data

here is the sample I wanted (using Creative Director): enter image description here

Note. The type of employment is not fixed (a new type may exist) Thank you so much in advance!

0
mysql


source to share


No one has answered this question yet

See similar questions:

223
MySQL pivot table

or similar:

809
Insert into MySQL table or update if exists
777
How to set default value for MySQL Datetime column?
769
How to get the sizes of MySQL database tables?
734
How do I specify a unique constraint for multiple columns in MySQL?
624
Duplicate MySQL table, indexes and data
590
How do I find all tables in MySQL with specific column names in them?
315
How to remove a column from a table in MySQL
223
MySQL pivot table
152
PHP MySQL two-column ordering
1
Is it possible to declare the datatype for each column of a pivot table in MySQL?



All Articles
Loading...
X
Show
Funny
Dev
Pics