Franco wrote:
"Harold Fuchs" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Franco wrote:
Hi,
Has anyone used Base to calculate the median value of a list of numbers?

I'd like to sort and group by zip code and then calculate a median value
for
sales in a given zip code.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Have you tried using the "median()" function? Assume you have values in
A1 to A50; in cell B1, for example, enter the formula "=median(A1:A50)"
(without the quotes). Seems to work for me ...


--
Harold Fuchs
London, England
Please reply *only* to [email protected]

Hi Harold -- I think you might be referring to Calc.  My post referred to
Base, which as far as I know does not have a built-in median calculation and
would therefore require some sort of work-around.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Franco, you are quite correct; sorry, I misread your question.

On the other hand, Calc has the facility to connect to a Base database. I have never played in this area but I am pretty sure you can persuade Calc to extract the data you need from Base, sort it and then do the calculation.

On a third hand ;-) , the Help in OpenOffice under "SQL Queries" says
=== Begin quote ===
You can also enter function calls directly into the SQL statement. The syntax is:
SELECT FUNCTION(column) FROM table.

For example, the function call in SQL for calculating a sum is:
SELECT SUM("Price") FROM "Article".

Except for the *Group* function, the above functions are so-called Aggregate functions. These are functions that calculate data to create summaries from the results. Additional functions that are not listed in the list box are also possible. These depend on the specific database system in use. To get information about driver specific functions refer to the documentation of your database system. To use other functions not listed in the list box, you must enter them under *Field*. They will then appear automatically in the *Function* line."
=== End quote ===

So, perhaps "SELECT MEDIAN("Price") FROM ..." might work ???

--
Harold Fuchs
London, England
Please reply *only* to [email protected]

Reply via email to