I cannot figure out how to do a report query. Here's my set up:

Class: Band
   Fields: Name, ContactPerson, ContactPhone
   Collection: Performances

Class: Performance
   Fields: Payout, Attendance

I need to do a report query that will give me 5 columns: Band.Name, Band.ContactPerson, Band.ContactPhone, Avg(Performance.Payout), Avg(Performance.Attendance).

I then need to order by Name, Attendance or Payout based on the user's selection.

In real SQL it would look something like this:

SELECT Band.Name, AVG(Performance.Payout) As Payout, AVG(Performance.Attendance) As Attendace, Band.ContactPerson, Band.ContactPhone

FROM Band

INNER JOIN Performance ON Performance.BandID = Band.ID

GROUP BY Band.Name, Band.ContactPerson, Band.ContactPhone
ORDER BY Attendance ASC

I have been thoroughly impressed with the quality of the OJB product, but I have had the hardest time learning how to use it using only the online documentation. I am willing to help out with documentation writing of examples to answer questions like mine above.

Thank you for your time,
Aaron Longwell



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



Reply via email to