1 Reply Latest reply on Nov 22, 2013 5:43 AM by mikebeargie

    Fetch column2 from records with distinct column1


      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.




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