Quantcast
Channel: SCN : Discussion List - Data Services and Data Quality
Viewing all articles
Browse latest Browse all 4237

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 4237

Trending Articles