Allow query and options for Distinct