1. since we're joining this data, thats the structure of the returned SQL that we need to do the joins. As for the specific value of those, thats up to you, but you should alias them to those names.
2. The mapping is done in the assignment query, which can be found on the data source page. This data typically comes from the trackingCallback event which is fired from the SDK. That exposure event data needs to be selected from the data source - so we can tell which user got which experiment variant, and then join that user to all the other metrics you've defined for that experiment.