build a postgreSQL query as per the problem statement given -- 2
₹600-1500 INR
Closed
Posted about 8 years ago
₹600-1500 INR
Paid on delivery
Attached is the sample data for table:
1. Claim table where tid no is and unique
2. Policy table where each district has policy date.
I have requirement where my PostgreSQL query will count number of records on weekly/monthly/fortnightly basis based on admission date for each hospital fetched from table 1 i.e claim table.
Start date and end date criteria would be there to fetch the records between the two dates and will be calculated from table 2 i.e policy table.
Please see the attachment for table reference.
start date = policy date from policy table
end date = policy date + 1 year
example for district Jaipur :
start date = 01/07/2013 (this date would be fetched from policy table)
end date = 30/06/2014
for district Udaipur :
start date = 15/07/2013 (this date would be fetched from policy table)
end date = 14/07/2014
and so on..
Query resultset will be returned as below :
sample 1: I need data from query in the below format
weeks claim_count claim_Amount
week1 23 345600
week2 24 243666
.
.
.
week54 43 32000
Hello,
I am interested in your project. I am a software engineer and I have professional experience with SQL. Could you please send some records from the policy table in order to test different cases?
Thank you,
Best regards,
David
as an expert in databases and with over 10 years experience working with PostgreSQL I think the right person to help with this project in the shortest possible time. I will be available in the chat. Thank you.