I want to get the count of addmited records by user in 2 table. for example, I have a list of users(table STF) and want to know how many product did a user create (in table PV1) and how many product did he sell (in table dpq), I want to show these data like below:
I have these 2 queries, and don't know how to show them in one table with 3 columns...
Query 1:
select staff_username, COUNT(*) as 'count 1'
from STF right join PV1 on STF.staff_username = PV1.admit_user
group by staff_username, staff_name + ' ' + staff_family
Query 2:
select trf_staff_id, COUNT(trf_staff_id)
from dpq join stf on trf_staff_id = stf.staff_username
group by trf_staff_id