Added having, groupby, and pagination options to shortcode