joining to query windows