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 (1) by M.Saeed Khurram

$
0
0

Try this

SELECT SUM(sales) AS Monthly_Sales
FROM Sales
WHERE salesdate BETWEEN Start_Date AND END_Date;

You can replace the start and end date with start and end date of the period for which you want to calculate the sum.
If you have a requirement to dynamically get sum of sales by month then we will have to modify this query.
 

 


Viewing all articles
Browse latest Browse all 14773

Trending Articles



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