The question is best asked with an example.

I have a table

```
id   |    name      |   attr
1    |     foo      |     a
2    |     bar      |     a    
3    |     baz      |     b

```

and I want a query `give me all the rows which share the same attr as 'name==foo'`, and thus returns

```
id   |    name      |   attr
1    |     foo      |     a
2    |     bar      |     a    

```

because foo has attr=a, as does bar