add split by in a query