best strategy for histogram preparation

Beatrix Willius bwillius at gmx.de
Fri Jul 12 07:13:58 CDT 2013


I sometimes need to do this in Excel. Then I write a simple formula for what you want to do with SQL.

In pseudo-code

if m1 >=5 and m1 < 5.5 then
	result = 1
elseif m1 >= 5.5 and m1 < 6 then
	result = 2

and so on. 

HTH

On 12.07.2013, at 12:45, Franco Vaccari <vaccari at dst.units.it> wrote:

> I'd like to ask what is the best strategy to extract data from a database for producing a histogram. I'm using Xojo ADK.
> 
> The way I do it now is to call  SQLselect  in a loop to extract subsets of data and count the records of each subset (see the part // loop over histogram classes in the code below). For histograms made on the values stored in field M1, statements in the loop come out like this:
> 
>>> 
> select recID,M1,catLink from "Data" where "catLink" = 6 and "M1" >= 5 and "M1" < 5.5
> select recID,M1,catLink from "Data" where "catLink" = 6 and "M1" >= 5.5 and "M1" < 6
> select recID,M1,catLink from "Data" where "catLink" = 6 and "M1" >= 6 and "M1" < 6.5

Mit freundlichen Grüßen/Regards

Trixi Willius

http://www.mothsoftware.com
Mail Archiver X: The email archiving solution for professionals



More information about the Valentina mailing list