<font size="2"><font face="verdana,sans-serif">Hi Cab,<br><br>Here's the query with a date range:<br><br></font></font><font size="2"><font face="verdana,sans-serif">select borrowers.surname,
borrowers.firstname, borrowers.cardnumber, borrowers.categorycode,
borrowers.dateexpiry from statistics, borrowers where
statistics.borrowernumber = borrowers.borrowernumber and statistics.type
= 'issue' group by statistics.borrowernumber having max(date(datetime))
between 'YYYY-MM-DD' and 'YYYY-MM-DD' order by borrowers.surname, borrowers.firstname</font></font><br><br><span style="font-family: verdana,sans-serif;">Bev</span><br clear="all"><br>* * * * <br>Beverly Church <br>
LibLime Project Manager<br><br>phone: 1-888-564-2457 ext. 717 <br> 1-301-654-8088 ext. 292<br>email: <a href="mailto:bchurch@liblime.com" target="_blank">bchurch@liblime.com</a><br>skype: beverlychurch<br>
<br><br><div class="gmail_quote">On Wed, Feb 9, 2011 at 5:11 PM, Cab Vinton <span dir="ltr"><<a href="mailto:bibliwho@gmail.com">bibliwho@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Thank you, Bev!<br>
<br>
Seems to work fine for our small library.<br>
<br>
The only improvement would be to be able to specify a date range, the<br>
syntax for which isn't immediately obvious to me.<br>
<br>
Thank you again,<br>
<div class="im"><br>
Cab Vinton, Director<br>
Sanbornton Public Library<br>
Sanbornton, NH<br>
<br>
<br>
<br>
<br>
</div><div><div></div><div class="h5">On Wed, Feb 9, 2011 at 4:48 PM, Church, Beverly <<a href="mailto:bchurch@liblime.com">bchurch@liblime.com</a>> wrote:<br>
> select borrowers.surname, borrowers.firstname, borrowers.cardnumber,<br>
> borrowers.categorycode, borrowers.dateexpiry from statistics, borrowers<br>
> where statistics.borrowernumber = borrowers.borrowernumber and<br>
> statistics.type = 'issue' group by statistics.borrowernumber having<br>
> max(date(datetime)) >= 'YYYY-MM-DD' order by borrowers.surname,<br>
> borrowers.firstname<br>
</div></div></blockquote></div><br>