AnsweredAssumed Answered

SQL query with Order By clause

Question asked by sccardais on Oct 31, 2018
Latest reply on Oct 31, 2018 by beverly

Can someone help me with an SQL query?


I want a count of unique Org ID's ordered by their current status (9 possible status values)


Source Table = FT_STATS

Relevant Fields in FT_STATS:


_c_current status


Example of Desired Output


Count of all Unique Orgs in Table = x

Count Status "A" = x

Count Status "B" = x



SQL query that isn't working. (Getting syntax error)




"Select Count (Distinct \"_fk_org_id\")


ORDER BY \"c_current_status\"