I have 3 tables : account id name 1 Google 2 Apple custom_field id name 1 Phone 2 Email custom_field_submission id custom_field_id entity_id value 1 1 1 555-444-333 2 1 2 111-111-111 3 2 1 google@goog.com 4 2 2 apple@apple.com Expected result after query id name Phone Email 1 Google 555-444-333 google@goog.com 2 Apple 111-111-111 apple@apple.com I have a query
Tag: entity-attribute-value
How can I convert an EAV schema to a normal schema using PIVOT?
I have a table called SourceTable, in that I have 4 fields. Properties_title field it has got 3 values (AAA,BBB,CCC) but can also have more. Depending on each of them, NumericValue field and Property_item_title field has a value.According to the table in the below, if Properties_title be AAA or CCC so Property_item_title it has value and if Properties_title be BBB