Services For Specified Payors For Period


Back to Query Directory

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.


SELECT DISTINCT
  c.payorname, a.srvcode, a.lastname, a.firstname, a.id,
  a.trandate,d.insdid,d.insgroup,
  a.provcode, a.amount
FROM
  rv_charges a
  JOIN ptpayors b ON a.ptpayornum = b.ptpayornum
  JOIN ptpolicies d ON b.ptpayornum = d.ptpayornum
  JOIN payors c ON b.payornum = c.payornum
WHERE
  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)
ORDER BY
  c.payorname, a.srvcode, a.lastname, a.firstname, a.id, a.trandate



CategoryQueries



Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki