AnsweredAssumed Answered

Fetch column2 from records with distinct column1

Question asked by camberol on Nov 20, 2013
Latest reply on Nov 22, 2013 by mikebeargie

How do I find a distinct set of records based upon one field while returning a different field from those records?

 

ExecuteSQL ( "SELECT DISTINCT account FROM Albums2"; ""; "" ).

 

How do I get another field returned in this type of query?

 

SELECT DISTINCT account gives me 70 records. From this set only, do I want the id.

 

Solution:

 

ExecuteSQL ( "SELECT account, MAX(id) FROM Albums2 GROUP BY account"; ""; "" )

Outcomes