added order and group to raw_select