Run a complex custom DB SQL query without building it from the scratch!

How can we execute a complex custom query that involves 10 different tables (and three schemas) without starting to build the query from scratch?