I have following Query ,

```
(select student_id from student where std = 8)
intersect
(select student_id from student where std = 7)
intersect
(select student_id from student where std = 9)
union
(select student_id from student where std = 10)

```

Now, I do not want to use `intersect` , instead of it I want to use `inner join`

So I convert that query to following

```
select * from
(
(select student_id from student where std = 8)
as res1 inner join
(select student_id from student where std = 9)
as res2 on res1.student_id = res2.student_id inner join
(select student_id from student where std = 7)
as res3 on res2.student_id = res3.student_id
)
union
(select student_id from student where std = 10)

```

In this case I got following error:

> 
> All queries combined using a UNION, INTERSECT or EXCEPT operator must
>  have an equal number of expressions in their target lists.
> 
> 
>