select demographic_no as No, demographic_name as 'Demographic Name', bd.service_code as 'Service Code',
bs.description as 'Service Desc', bd.dx as 'diag. Code', bd.ser_num as 'Billing Unit',
b.billing_date as 'Billing Date'
from billing_on_cheader1 b, billing_on_item bd, billingservice bs
where b.provider_no = {provider_no} and b.id = bd.ch1_id
and b.status <> 'D'
and b.billing_date >='{billing_date_start}' and b.billing_date <='{billing_date_end}'
and bs.service_code = bd.service_code
select provider_no, CONCAT(last_name, ', ', first_name, ' (', provider_no, ')') from provider order by last_name;