I have to create a query in postgress where I have 2 tables , 1) Request(caseID, quantity, amount)
2) Activity ( caseId , bookingtime ) so I want to create a query which should give me the data from both the table…caseId should be matched…and results columns are date, bookedquantity , amount ..i will pass startdate and enddate from request and it should match that with bookingtime and give me result..since same caseID can be multiple in both table so need data based on date only and so for particular date if two distinct caseId is available..their quantity and amount should get added with other row quantity and amount for particular date but distinct caseid…..i tried many queries but couldn’t get expected result. Plz anyone can suggest how can I achieve this.TIA.