AnsweredAssumed Answered

ExecuteSQL and Pie Chart values

Question asked by user27832 on Nov 8, 2016
Latest reply on Nov 8, 2016 by philmodjunk

I have a list of potential clients grouped into market sectors.


My SQL statement:

ExecuteSQL ("
SELECT \"Market Sector\", COUNT ( \"Test Field\" )
FROM  \"Potential Clients\" 
WHERE \"Test Field\" = ? 
GROUP BY   \"Market Sector\", \"Test Field\" 
"  ; ", " ; "" ; 1 )


The output is something like this:


Commercial: Healthcare, 2

Education: College/University , 16

Manufacturing: Automotive, 12

Manufacturing: Food & Beverage, 7

Manufacturing: Other, 3


We're counting the number of potential clients grouped by a market sector and we need to put that into a pie chart.

I need to figure out some method of separating this list into two lists.


While that is easy to do with the pie chart labels, the count values are aggregated so they can't appear in a SQL statement on their own because they need some qualifier to be aggregated against.


What techniques would you all recommend for splitting this list so it can be accepted by a pie chart?