sql - Rewrite correlated scalar subquery in SELECT statement -


i having problem correlated scalar subquery in prestodb.

select      t.transaction_id, t.site_id, t.unit_id, t.quantity, t.reference_quantity,     (select              uf.factor                     unit_factor uf                         uf.unit_id = t.unit_id                 , uf.term_start <= t.term_start                 , uf.impact_id null                 , uf.site_id null                 , uf.target_class_id null                 , uf.position_id null                 , uf.factor not null         order uf.unit_id , uf.term_start desc , uf.impact_id , uf.site_id , uf.target_class_id , uf.position_id         limit 1) t     transaction t; 

is there way rewrite query prestodb can execute it?

thanks.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -