Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

sum of amout for the date falling in the respective month i.e months wise sum amount is required - response (4) by qbeg

$
0
0

Could you send the example in the form of tables?

Because if was in order to one table and one date after which it is necessary to be to sum it up the code could look this way:
 

SELECT 
cast((order_date(FORMAT 'Y4MM')) as char(6)) as period
,sum(amount) as sum_of_amount

FROM Database.tablename

 


Viewing all articles
Browse latest Browse all 14773

Trending Articles



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