In the below example, I am trying to return the value of a field from all the field collections in the database but only get field_collection_item. This example is just the most basic field collection sql possible.
SELECT field_collection_item.item_id AS item_id, 'field_collection_item' AS field_data_field_grade_decimal_field_collection_item_entity_
FROM
field_collection_item field_collection_item
What do I need to change in this example? My SQL is terrible unfortunately. I just can't return any values from field collections using sql. I need to be able to do this for Forena Reports. I'm getting the above code from views which returns the field collection values.
'field_collection_item' AS field_data_field_grade_decimal_field_collection_item_entity_
andFROM field_collection_item field_collection_item
can simply beFROM field_collection_item
.