1. You can extract the ecid or any identities like this.
SELECT identityMap['ecid']['id'] from profile_snapshot_export_XXXXXX ;
2. To understand the field's structure, look at the json of the profile attributes that will help you write/understand a query. I generally look at the templates to know how they work. You can find some sample queries here: Dataset query examples | Adobe Journey Optimizer