Quantcast
Channel: SCN : Unanswered Discussions - Data Services and Data Quality
Viewing all articles
Browse latest Browse all 3719

Subquery with sum

$
0
0

Hi,

 

How can I perform the following query in data services? I tried lookup function but I can't because it doesn't has sum, only max and min.

 

Select account

          ,total

         ,(select sum(total) from tbl_account b where a.account = b.account and b.period<2)

  From tbl_account b

Where a.period = 2


Viewing all articles
Browse latest Browse all 3719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>