This article demonstrates how to write a SQL statement that returns the sum of gift amounts donated to funds.
select top 10 sum(G.AMOUNT), F.DESCRIPTION
from GIFT G join GIFTSPLIT GS on GS.GIFTID = G.ID join RECORDS R on R.ID = G.CONSTIT_ID join FUND F on F.ID = GS.FUNDID
group by F.DESCRIPTION
Blackbaud provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with Structured Query Language and the tools used to create and modify SQL statements. Blackbaud Customer Support can help explain the functionality of a particular procedure but we will not modify, or assist you with modifying, these examples to provide additional functionality. If you are interested in learning more about the Read Only Database Assistance (RODBA), contact your Account Representative at email@example.com.