Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2002
    Posts
    1

    Unanswered: SQL to modify data

    Hi out there

    I have a table (Access2k) representing measured data (in a vineyard) and I am finding it difficult to construct a query to display the following:

    First the relevant fields in tblYieldStats are:

    BlockNumber, SampleDate, pH, TA, and Baume. (obviously the latter 3 are measurements as numbers).

    In the source table there may be several records for a measured item on one date for one block (double and triple checking)

    I want a query to display single rows for each date for each block for use in a chart by averaging any multiple entries:

    so for Block 1:

    date1 averagepH averageTA averageBe
    date2 averagepH averageTA averageBe
    and so on for all dates this block

    can someone help? thanks..Jeff Hubbard

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    your subject said modify, but this is obviously just a retrieval --
    Code:
      select BlockNumber, SampleDate
           , avg(pH), avg(TA), avg(Baume)
        from tblYieldStats 
    group by BlockNumber, SampleDate
    rudy
    http://rudy.ca/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •