Services For Specified Payors For Period

I need a query that would yield all services provided for August and
September grouped by the effected insurance carriers. It would be
helpful if the services listed within each carrier group were in
ascending order by service code.

  c.payorname, a.srvcode, a.lastname, a.firstname,,
  a.provcode, a.amount
  sos.rv_charges a
  JOIN sos.ptpayors b ON a.ptpayornum = b.ptpayornum
  JOIN sos.ptpolicies d ON b.ptpayornum = d.ptpayornum
  JOIN sos.payors c ON b.payornum = c.payornum
  trandate BETWEEN '2008-08-01' AND '2008-09-30'
  /* replace with appropriate payor numbers in line below */
  AND c.payornum IN (122,25626,9750,178,8807,120,8439,25627,25584,25585)
  c.payorname, a.srvcode, a.lastname, a.firstname,, a.trandate

Leave a Reply

Your email address will not be published. Required fields are marked *

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.