![]() How do I keep the ability to generate the theDate by month, with the ability to select specific IDs ![]() My generate_series stops working (as I understand it, because I set certain conditions for generating a request) and instead of 30 lines, I get only 3. But the fact is that I need all the data, and for example only with a certain facility_id, and when I insert a condition WHERE f.id = :id and tr.tranche_number_id = :trancheNumberId I use this select in my Spring Boot application. But the matter is that this select gives me superfluous results. In this select, I'm using generate_series to get each month since there are no records in the database for each month. LEFT JOIN facilities f on tr.facility_id = f.id LEFT JOIN tranches tr ON asl.tranche_id = tr.id (SELECT MAX(ams.date) + INTERVAL '1' MONTH FROM amortization_schedules ams),įULL JOIN amortization_schedules asl on to_char(the_date, 'yyyy-mm') = to_char(asl.date, 'yyyy-mm') (SELECT MIN(ams.date) FROM amortization_schedules ams), InterestPaymentModified, asl.date, asl.amortization_schedule_initial_id as amortizationScheduleInitialId, asl.tranche_id as trancheId, asl.user_id as userId, tr.local_currency_id as localCurrencyId, Asl.id, asl.outstanding_principal as outstandingPrincipal, the_date as theDate, asl.interest_rate as interestRate, asl.interest_payment as interestPayment, asl.principal_payment as principalPayment,Īsl.total_payment as totalPayment, asl.actual_delta as actualDelta, asl.outstanding_usd as outstandingUsd, asl.disbursement, asl.floating_index_rate as floatingIndexRate,Īsl.upfront_fee as upfrontFee, asl.commitment_fee as commitmentFee, asl.other_fee as otherFee, asl.withholding_tax as withholdingTax, asl.default_fee as defaultFee,Īsl.prepayment_fee as prepaymentFee, asl.total_out_flows as totalOutFlows, asl.net_flows as netFlows, asl.modified, asl.new_row as newRow, asl.interest_payment_modified as
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |