<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<html><head><meta name="Generator" content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Arial","sans-serif";
        color:windowtext;
        font-weight:normal;
        font-style:normal;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body lang="EN-US" link="blue" vlink="purple"><div class="WordSection1"><p class="MsoNormal"><span style="color:#1F497D">Try something like this:</span></p><p class="MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="color:#1F497D">SELECT round(Sum(accountlines.amount),2) AS 'Writeoffs Last 3 Months' FROM accountlines WHERE accounttype = 'W' and date like concat(date_format(LAST_DAY(now() - interval 3 month),'%Y-%m-%'))</span></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p><p class="MsoNormal"><span style="color:#1F497D">(haven’t tested this variant, but I run similar reports for 1 month and payments)</span></p><p class="MsoNormal">
<span style="color:#1F497D"> </span></p><div><p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#1F497D">Jane Wagner</span></p><p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#1F497D">Senior Project Manager</span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#1F497D">LibLime, a division of PTFS</span></p><p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#1F497D">Content Management and Library Solutions</span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#1F497D">11501 Huff Court</span></p><p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#1F497D">North Bethesda, MD  20895</span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#1F497D">(301) 654-8088 x 151</span></p><p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#1F497D"><a href="mailto:jwagner@ptfs.com"><span style="color:blue">jwagner@liblime.com</span></a></span></p>
</div><p class="MsoNormal"><span style="color:#1F497D"> </span></p><div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:koha-bounces@lists.katipo.co.nz">koha-bounces@lists.katipo.co.nz</a> [mailto:<a href="mailto:koha-bounces@lists.katipo.co.nz">koha-bounces@lists.katipo.co.nz</a>] <b>On Behalf Of </b>Peel Lisa<br>
<b>Sent:</b> Wednesday, October 19, 2011 3:08 PM<br><b>To:</b> '<a href="mailto:koha@lists.katipo.co.nz">koha@lists.katipo.co.nz</a>'<br><b>Subject:</b> [Koha] report help - total amount writeoff</span></p></div></div>
<p class="MsoNormal"> </p><p class="MsoNormal"><span lang="FR-CH" style="font-size:12.0pt;font-family:"Arial","sans-serif"">Hello</span></p><p class="MsoNormal"><span lang="FR-CH" style="font-size:12.0pt;font-family:"Arial","sans-serif""> </span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12.0pt;font-family:"Arial","sans-serif"">Report help again I am afraid!</span></p><p class="MsoNormal"><span lang="EN-GB" style="font-size:12.0pt;font-family:"Arial","sans-serif""> </span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12.0pt;font-family:"Arial","sans-serif"">Could anyone supply me with the SQL for a report which will show me the amount of fines being written off at a specific library for a given period of time (for example the last three months?)</span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12.0pt;font-family:"Arial","sans-serif""> </span></p><p class="MsoNormal"><span lang="EN-GB" style="font-size:12.0pt;font-family:"Arial","sans-serif"">Regards and thanks in advance</span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12.0pt;font-family:"Arial","sans-serif""> </span></p><p class="MsoNormal"><span lang="EN-GB" style="font-size:12.0pt;font-family:"Arial","sans-serif"">Lisa</span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:12.0pt;font-family:"Arial","sans-serif""> </span></p><p class="MsoNormal"><span lang="EN-GB" style="font-size:12.0pt;font-family:"Arial","sans-serif""> </span></p>
<p class="MsoNormal" style="margin-left:.25in;line-height:12.0pt;text-autospace:none"><span lang="FR-CH" style="font-size:12.0pt;font-family:"Arial","sans-serif";color:black"><img border="0" width="227" height="51" id="Picture_x0020_1" src="cid:image001.jpg@01CC8E73.434636C0" alt="Description: Description: Description: CR_logo_POS_COULEUR b"></span><b><span style="color:black"></span></b></p>
<p class="MsoNormal" style="margin-left:.25in;line-height:12.0pt;text-autospace:none"><b><span style="color:black"> </span></b></p><p class="MsoNormal" style="margin-left:.25in;line-height:12.0pt;text-autospace:none"><b><span style="color:black"> </span></b></p>
<p class="MsoNormal" style="margin-left:.25in;line-height:12.0pt;text-autospace:none"><b><span lang="FR-CH" style="color:black">LISA PEEL, PGDip, MA.</span></b><b><span lang="FR-CH" style="font-size:12.0pt;font-family:"Times New Roman","serif";color:black"></span></b></p>
<p class="MsoNormal" style="margin-left:.25in;line-height:12.0pt;text-autospace:none"><span lang="FR-CH" style="color:black">Librarian</span></p><p class="MsoNormal" style="margin-left:.25in;line-height:12.0pt;text-autospace:none">
<span lang="FR-CH" style="color:black">César Ritz Colleges Switzerland</span></p><p class="MsoNormal" style="margin-left:.25in;line-height:12.0pt;text-autospace:none"><span lang="FR-CH" style="color:black">1897 Le Bouveret - Switzerland</span></p>
<p class="MsoNormal" style="margin-left:.25in;line-height:12.0pt;text-autospace:none"><span style="color:black">Tel: +41 24 482 82 82 Fax: +41 24 482 82 80</span></p><p class="MsoNormal" style="margin-left:.25in;line-height:12.0pt;text-autospace:none">
<span style="color:black">E-mail: <b><a href="mailto:hortense.hofer@ritz.edu">lisa.peel@ritz.edu</a></b></span></p><p class="MsoNormal" style="margin-left:.25in;line-height:12.0pt;text-autospace:none"><span style="color:black"><a href="http://www.ritz.edu/">http://www.ritz.edu</a> - <a href="http://www.culinaryarts.ch/">http://www.culinaryarts.ch</a></span></p>
<p class="MsoNormal"><span lang="FR-CH"> </span></p></div></body></html>