Charges By Sort Code

SELECT
  b.lucode AS Code,
  b.remark AS Description,
  SUM(a.chgsplamt) AS Charges  
FROM
  sos.rv_charges a JOIN sos.lookups b ON a.sortcode=b.lunum
WHERE
  trandate BETWEEN '1999-01-01' AND TODAY()
GROUP BY
  b.lucode,b.remark

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.