<div dir="ltr"><div class="gmail_extra">Yes, you are right that I just needed the basic window function. I must have
beenconfused because I was using percentile_disc() and assumed I would be using the same WITHIN GROUP syntax. <br /><br
/>Iwas not clear before about the hypothetical set functions and their purpose. I have looked at the documentation at
<a
href="http://www.postgresql.org/docs/9.4/static/functions-aggregate.html">http://www.postgresql.org/docs/9.4/static/functions-aggregate.html</a>
andnow see the difference. <br /><br /></div><div class="gmail_extra">Might it be worthwhile to include a suggestion in
theerror message and/or documentation "Use of percent_rank() WITHIN GROUP is a hypothetical-set aggregate function. If
youdo not intend to use a hypothetical-set aggregate function, try using a window function with PARTITION BY instead of
WITHINGROUP"? Not sure if that aligns with your style guidelines, but just a thought.<br /><br /></div><div
class="gmail_extra">Thanksso much for your previous response,<br /></div><div class="gmail_extra">Jon<br /></div></div>