add advance query