Ad Hoc Distributed Queries