I started reading about SQL and learned how to join certain data from two different tables that share an identical row.
_comprofiler and _users share the id (user) so that makes it possible to link the primary email adress from _users to all the relevant entries in _comprofiler and build a new table.
The query looks like this (short version without a ton of cb_fields):
Code:
SELECT firstname, lastname, cb_mobile, jos_users.email
FROM `jos_comprofiler` JOIN `jos_users`
ON jos_comprofiler.id = jos_users.id