I have 2 tables `A_ORDERS` and `A_ORDERS_LOG`. Columns of interest in table `A_ORDERS` are `PEN` and `SKL`, and Columns in table `A_ORDERS_LOG` that are of interest are `Status1` and `Status2` as well as `DATE` (just for ordering my result). `PEN` is unique.

This is what I have 

```
select
 l.pen,status1,status2,date,a.skl 

from A_ORDERS_LOG l

join A_ORDERS a on l.PEN=a.PEN 

where a.skl='XY'

and status1='75' or status1='13'

and status2='13' or status2='11'

order by l.id,l.date;

```

I get all the rows for all the other skl's there are in the table `A_ORDERS`, but I only want rows regarding `skl=XY` from `A_ORDERS`. The thing is that PENs travel through different status and I want all the rows for each `PEN` where it went through possible status from 75 to 13 and then from 13 to 11. 

When I put it like this I get what I want. 

```
and (status1='75' or status1='13')
and (status2='13' or status2='11');

```

Why is that?

Thanks in advance :)