I am trying to select items and get a total for those with multiple rows in our 
table based upon one column in the table (plotnum).
 
 
When I use the following command:
 
select distinct trial plotnum stand1=s from rawdata order by plotnum whe trial 
= '098781' and plotnum lt 1005
 
I get the following results.  This gives me a total across all of the rows, but 
I would like a total by the plotnum.
 
 trial    plotnum    stand1
 -------- ---------- --------
 098781   1001      16.
 098781   1001      22.
 098781   1002      22.
 098781   1002      25.
 098781   1003       9.
 098781   1003      25.
 098781   1004      14.
 098781   1004      19.
 -------- ---------- --------
                         152.
 
 
 
My desired result would be:
 
 trial    plotnum    stand1
 -------- ---------- --------
 098781   1001      38..
 098781   1002      47.
 098781   1003      33.
 098781   1004      33
 
and then export those results to Excel.
 
 
Can I do this with a SELECT statement?
 
Thanks.
 
Bill Niehaus
 
 


Reply via email to