How to convert a view to a query?

I have a lot of views that I would like to convert into query,
is there an easy way to do it?

There is no easy way to do that. You have to manually do it one by one.