Anybody up for a sample SQL help.
ClaimHeader
PK-claimid
FK-enrollid
FK-providerid
StartDate
EndDate
PlaceOfService
TotalBilledAmount
ClaimDetail
PK-claimid
PK-claimline
ServiceCode
LineBilledAmount
Member
PK-memberid
FirstName
LastName
Gender
Enrollment
PK-enrollmentid
FK-memberid
Program
Network
Display the claim ID, member ID and sum of line billed amounts for members enrolled in the “Medi-Cal” program in the “HIL” network where the service code begins with “G”
Select Distinct A.Claimid, C.memberid, Sum(b.LineBilledAmount)
from ClaimHeader A, ClaimDetail B, Member C, Enrollment D
where A.claimid = B.claimid
And A.enrollid= D.enrollmentid
And D.memberid C.memberid
And D.Program = 'Medi-Cal'
And D.Network = 'HIL'
And B.ServiceCode like ('G%');
Thanks Yekku. Do you mind if I ask you some follow-up questions privately. Thanks!
Please log in to reply to this post
You can also log in using your Facebook
What people are reading
You might like these other discussions...
· Posts 4
· Viewed 386
· Likes 1
· Posts 3
· Viewed 197
· Likes 1
· Posts 24
· Viewed 7548
· Likes 2
· Posts 26
· Viewed 2744
· Likes 5