1:drop view bbps_vwFirstAdjustmentSplits; 2:create view bbps_vwFirstAdjustmentSplits as 3:select 4: sequenceNums.adjustmentSequence, 5: 6: sequenceNums.giftId as giftLinkId, 7: 8: -0.5 + gs.giftsplitid as giftSplitId, 9: gs.giftid, 10: sequenceNums.giftId as originalGiftId, 11: gs.adjustmentid, 12: gs.amount, 13: gs.fundid, 14: gs.campaignid, 15: gs.appealid, 16: gs.packageid, 17: gs.sequence, 18: gs.import_id 19: 20: 21:from 22: ( 23: select 24: 0 as adjustmentSequence, 25: 26: giftid 27: from 28: giftadjustment 29: group by giftid 30: ) as sequenceNums 31: 32: inner join 33: gift g 34: on g.id = sequenceNums.giftId 35: 36: inner join 37: giftsplit gs 38: on gs.adjustmentid = g.id