I have the following query:
select distinct profile_id from userprofile_... union select distinct profile_id from productions_...
How wou
If you want a total count for all records, then you would do this:
SELECT COUNT(*) FROM ( select distinct profile_id from userprofile_... union all select distinct profile_id from productions_... ) x