Tom, > Um ... does that work? I thought LIMIT was fairly restrictive about > what it would take as a parameter --- like, constants or $n > parameters > only. > > I do not know of any median-finding algorithm that doesn't require a > depressingly large amount of storage...
Me neither. You're right; the query didn't work. Here's a link to the median-finding function I posted to the CookBook: http://www.brasileiro.net/postgres/cookbook/view-one-recipe.adp?recipe_id=1654 Anyone who can improve it is welcome! -Josh ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology [EMAIL PROTECTED] and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly