Question: We have two tables.

```
1. information

title    body     name   

title1   body1   author1   
title2   body2   author1    
title1   body1  author2 
title1   body1   author3

2. interactions

name      favorited    user_favorited_by

author1      yes          user1 
author2      yes          user1 
author1      yes          user2 
author1      no          user3

```

The question is: who is for each user the favourite author or authors?

The query should give us the following answer based on the example:

```
user1    author1
user1    author2
user2    author1

```

Any help appreciated.

Answer: 
Here is a JOIN that works:

```
SELECT DISTINCT user_favorited_by,   a.name
  FROM information a
  JOIN interactions b
  ON a.name = b.name
 WHERE  favorited = 'yes'

```

Since you only have 'name' to join on, you need DISTINCT, or you could GROUP BY selected fields to remove duplicate lines from your output.

And here is a demo: [SQL Fiddle](http://sqlfiddle.com/#!2/ca2be/3/0)
May I suggest:

```
select user_favorited_by, author from information a
inner join interaction b on a.name = b.name 
where b.favorited = 'yes'

```