build a postgreSQL query as per the problem statement given

Attached is the sample data for two tables:

1. Claim table where claim number is unique and each entry is having district and claim date.

2. Policy table where each district has policy date.

I have requirement where my PostgreSQL query will count number of records on weekly/monthly basis based on claim date for each district fetched from table 1 i.e claim table.

Start date and end date crtieria would be there to fetch the records between the two dates and will be calcualted 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

Distrcit Week 1 Week 2 Week 3 Week 4.......... Week 52

Jaipur 0 0 4 6 0

Udaipur 0 2 3 0 0

Kota 1 4 0 5 8

sample 2:

District Month 1 Month 2 Month 3 Month 4.........Month 12

Jaipur 10 20 4 6 0

Udaipur 5 2 3 0 0

Kota 9 4 8 5 8

Kemahiran: PostgreSQL

Lihat lagi: statement problem example, statement problem, statement of the problem sample, statement of the problem example, statement of problem sample, statement of a problem, sample problem statement, sample of problem statement, problem statement sample, problem statement format example, problem statement format, problem statement example, problem statement, example problem statement, example of statement of the problem, example of problem statement, example of a statement of the problem, example of a problem statement, a sample problem statement, a problem statement, build pic based volt amp meter, build web based data entry form, build web based data entry application aspnet, php build text based multiplayer game site, build windows based auto dialer

Tentang Majikan:
( 2 ulasan ) delhi, India

ID Projek: #10108495

Dianugerahkan kepada:


Hi , I am an experienced DB developer with 4 years of experience in Postgresql and oracle. I am expert in query designing and query running and I am confident to complete your task. Thanks.

₹600 INR dalam 2 hari
(1 Ulasan)