<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Getting last 3 records</TITLE>
<META content="MSHTML 6.00.2722.900" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=663165122-12052003><FONT face=Arial color=#0000ff size=2>You
can use a subquery, have the subquery return the last three dates per
well.</FONT></SPAN></DIV>
<DIV><SPAN class=663165122-12052003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=663165122-12052003><FONT face=Arial color=#0000ff
size=2>Drew</FONT></SPAN></DIV>
<BLOCKQUOTE>
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Kaup, Chester A
[mailto:kaupca@chevrontexaco.com]<BR><B>Sent:</B> Monday, May 12, 2003 4:47
PM<BR><B>To:</B> accessd@databaseadvisors.com<BR><B>Subject:</B> [AccessD]
Getting last 3 records<BR><BR></FONT></DIV><!-- Converted from text/rtf format -->
<P><FONT face=Arial size=2>I have a table that is full of oil well test data.
Basically date and volumes. There are dozens of records with different dates
for each well. I need to get the average of the last (I.e. most
recent) three tests for each well. Tried the top values but could not
see how to do it for each individual well. Your assistance
appreciated.</FONT></P>
<P><FONT face="Times New Roman" size=1>No trees were killed in the sending of
this message. However a large number of electrons were terribly
inconvenienced.</FONT><BR></P><BR></BLOCKQUOTE></BODY></HTML>