AnsweredAssumed Answered

ExecuteSQL to FMP Calculation assistance

Question asked by xxx202xxx on Aug 13, 2017
Latest reply on Sep 13, 2017 by beverly

I was attempting to use executeSQL which would have been better but I could not get the rows to show like I needed them to and the directions where to deep for me to follow.  So I would like to come up with 3 filemaker calculation fields given the executesql querry. Field 1 = I need to show the top ten IncidentSummary_Software for whatever the current month is.  Field 2 = I need the count of those IncidentSummary_Software and Field 3 (which I could figure out) = the % of the Total..  Thank You

 

Example would be:   Disk Drives     15     19%

 

ExecuteSQL ("

SELECT COUNT (IncidentSummary_Software), IncidentSummary_Software
FROM Service_Management
WHERE Month (Time_Created)=?
GROUP BY  IncidentSummary_Software
ORDER BY 1 DESC
FETCH FIRST 10 ROWS ONLY"

; Char(9)  ; ""; Month (Get (CurrentDate)))

Outcomes