0

たとえば、レコードが表示される sqlite クエリを作成したい 連絡先テーブルとアカウント テーブルがある テーブルからカウント名と連絡先名を取得したい 連絡先名を group_concat したいので、繰り返してはならない私はクエリを返します:

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;

このクエリの実行は、私がやりたいことを完全に知っているため、昇順で group_concat の個別の名前を取得するため、クエリを作成しました。

 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;

注文時にエラーが発生する

10-25 10:29:25.601: E/SQLiteLog(2214): (1) near "order": syntax error

エラーの解決方法を教えてください。

4

1 に答える 1