Generating a Query in DBSync:
1. Click on the LookUp hyperlink next to the query text area in the Reader Section to generate the query. A pop up window displays the list of all objects of that Adapter. You have an option to select the object and its fields for constructing a query. The WHERE condition and the JOINS has to be manually added to the query and this condition cannot be achieved from the QUERY Builder pop up window.
See individual Adapters to understand the Query support implemented by that adapter.