I want to write an sqlite query in which a record will be displayed for example i have a contact table and account table i want to fetch a acount name and contact name from table i want to group_concat the contact name and it should not be repeated so i return a query:
select a.account_name, group_concat(DISTINCT c.contact_name) from account_table a join contact_table c on a.account_id = c.account_id;
this query execute perfectly know what i want to do is to get group_concat distinct name in asc order so i written the query :
select a.account_name, group_concat(DISTINCT c.contact_name order by c.contact_name) from account_table a join contact_table c on a.account_id = c.account_id;
its giving me error at order by
10-25 10:29:25.601: E/SQLiteLog(2214): (1) near "order": syntax error
can any one tell me how to solve the error.