Histogram with Query

  • Thread starter Thread starter Antoine
  • Start date Start date
A

Antoine

Am trying to construct a query to generate a histogram an the
distribution of a variable TimeDiff that is defined in a query ART.

I defined a table called HoursBin:
0 1
1 2
3 4.5
4.5 7
7 10

Here's the SQL statement that I generated:

SELECT HourBins.From AS FromBin, Count(ART.TimeDiff) AS TimeDiffCount
FROM ART
RIGHT JOIN HourBins ON (ART.TimeDiff>=HourBins.From) AND
(ART.TimeDiff<HourBins.To)

For some reason it does not work.

Any ideas?
 
Does not work? As in returns no records, returns the wrong results, doesn't
run but returns a syntax error?

What type of field is Art.TimeDiff? Is it a datetime field? Or is it a
number field?
 
I get an "Invalid Procedure Call" pop up. I realized this is because
TimeDiff (a number field) is a computed field. I modified the initial
query to create a table where TimeDiff is included, and then the above
works.

Thanks. 1
 
Back
Top