AnsweredAssumed Answered

Add Sum to SQL Query

Question asked by sccardais on Nov 1, 2018
Latest reply on Nov 1, 2018 by beverly

Continuing on my journey to learn FM SQL ...

 

The query below shows a count of Orgs based on their current status in a table that tracks outcomes from Free Trials.

 

ExecuteSQL

(

"Select \"c_current Status\", Count (Distinct \"_fk_org_id\")

FROM \"FT_STATS\"

Group By \"c_current Status\"

ORDER BY \"c_current Status\"

"

;"";""

)

 

The result looks like this:

Canceled,4

Client, 120

Free Trial, 215

Spam, 5

Test,5

Trial Expired,292

 

Can I modify the query to show the sum ? e.g.

 

Sum, 641

Canceled,4

Client, 120

Free Trial, 215

Spam, 5

Test,5

Trial Expired,292

 

FWIW: Eventually, I'd like to use SQL to gather the data needed to implement the PivotJS technique described by Jeremy Brown which looks like a very, very useful tool.

Outcomes