Advertisement
Guest User

Untitled

a guest
Jun 2nd, 2015
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. select DISTINCT ON (user_id, submittedat)
  2. id
  3. , user_id
  4. , (appliedloandata->'amount')::float
  5. , outcome
  6. , declinereason
  7. , decisionruledata->'score_Jesse$VJ2Score' AS VJ2Score
  8. , decisionruledata->'score_Jesse$VJScore' AS VJScore
  9. , decisionruledata->'score_Jesse$VJ2AndLoanAmountRegressionScore' AS VJ2Regression
  10. , decisionruledata->'score_Jesse$VJAndLoanAmountRegressionScore' AS VJRegression
  11. , decisionruledata->'VJRandomResearch' AS vj_random_research
  12. from credit_applications
  13. where user_id in (
  14. select user_id
  15. from experiment_records
  16. where source = 'LENDUP'
  17. and experiment_source_id = '1'
  18. and experiment_variant_source_id = '4' limit 229
  19. )
  20. and (appliedloandata->'amount')::float > 250
  21. and submittedat IS NOT NULL
  22. ORDER BY user_id, submittedat;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement