Question: I have 4 tables.

1 with just sitenames.

3 tables, which contains sitenames and the ammount of hits on them for different user types.

I need to make a report on the number of hits on thoose sites for each user type like this

Site Userype1hits Userype2hits Userype3hits

so in the select part I neeed to crosscheck with a table called noanswer

like 

```
select *
from table
where site in (select site from noanswer)

```

So from what I understand I need to use join, and in this case right join? 

How do I do with join in this query?

Answer: 
You would use `left join`:

```
select sn.*, t1.cnt, t2.cnt, t3.cnt
from sitenames sn left join
     table1 t1
     on t1.name = sn.name left join
     table2 t2
     on t2.name = sn.name left join
     table3 t3
     on t3.name = sn.name;

```

Your question is vague on the field names.

A `left join` keeps all rows in the first table and matches rows in the subsequent tables. It is much more commonly used than `right join`, probably because it is easier to read the logic thinking "I'll keep all of these rows". A series of `right join`s actually keeps all rows in the last table, so you have to wait to see which rows stay.
I did like this, googled some further as I did not get it to work even with the answer here, joins are totaly new to me. The internalusers, external and so on is just fake to post what I did here as I cant use the real names.

```
select s.Site,s2.Total_hits as 'Internalusers',s3.Total_Hits as 'ExternalUsers', 
s4.Total_hits as 'Comapany2users'  from Database.Table as S
left outer join HITAnalyze.dbo.Internal as s2 on s2.site = s.Site
left outer join HITAnalyze.dbo.External1 as s3 on s3.site = s.Site
left outer join HITAnalyze.dbo.Company2 as s4 on s4.site = s.Site

```