Extract data from Field Collection using db_select()
I got it to work like this:

$pid = $profile-&gt;pid;

$query = db_query('SELECT nn.field_street_number_value AS number,
                          ss.field_field_street_name_value AS street, 
                          cc.field_city_tid AS city, 
         FROM field_data_field_my_address AS aa
         LEFT JOIN field_data_field_street_number AS nn ON aa.field_my_address_value = nn.entity_id 
         LEFT JOIN field_data_field_street_name AS ss ON aa.field_my_address_value = ss.entity_id 
         LEFT JOIN field_data_field_city AS cc ON aa.field_my_address_value = cc.entity_id 
         WHERE aa.entity_id = '.$pid);

$records = $query-&gt;fetchAll();