daily pastebin goal
43%
SHARE
TWEET

Untitled

a guest Sep 14th, 2018 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT DISTINCT
  2. COUNT(DISTINCT "pms_patients"."id")                  AS count_id
  3. ,
  4. "pms_patients"."insurance_company_name_standardized" AS
  5. pms_patients_insurance_company_name_standardized
  6. FROM   "pms_patients"
  7.        JOIN pms_transactions
  8.          ON ( pms_patients.practice_id = pms_transactions.practice_id
  9.               AND pms_patients.pms_patient_id =
  10.             pms_transactions.pms_patient_id )
  11. WHERE  ( pms_patients.practice_id = 5904
  12.          AND STATUS IN ( 'A', 'Active', 'Pat', 'patient' )
  13.          AND transaction_date BETWEEN '2016-09-14' AND '2018-09-14'
  14.          AND transaction_type = 'Procedure' )
  15.        AND ( insurance_company_name_standardized IS NOT NULL )
  16. GROUP  BY "pms_patients"."insurance_company_name_standardized"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top