title: Flutter sqfLite , SELECT DISTINCT not working
body: <p>My rawQuery SELECT DISTINCT... not working in flutter sqflite.</p>
  
  <p>This is quiz like app and I have series of questions from db, user answer yes /no and I save index number in sherePref,
  latter from method   _getAnswer() I get those numbers and pass to the getList method from DB.
  I get results Details and Output  but SELECT DISTINCT not working I get all answers and duplicates..</p>
  
  <p>My method from dataBase:</p>
  
  <pre><code>  Future&lt;List&lt;List&lt;Widget&gt;&gt;&gt; getList(List&lt;int&gt; list, String column) async {
      List&lt;Widget&gt; list1 = List();
      List&lt;Widget&gt; list2 = List();
      List&lt;Widget&gt; list3 = List();
      List&lt;List&lt;Widget&gt;&gt; listFromDB = [list1, list2, list3];
      var databasesPath = await getDatabasesPath();
      String path = join(databasesPath, 'books.db');
      Database database = await openDatabase(path, version: 1);
      for (int i = 0; i &lt; list.length; i++) {
        var result = await database
            .rawQuery('SELECT DISTINCT $column FROM $booksTable WHERE $colId= ${list[i]}');
  
        debugPrint('List: ' +list[i].toString());
        if (list[i] &lt; 18) list1.add(_item(result[0][column].toString()));
        if (list[i] &gt; 17 &amp;&amp; list[i] &lt; 50)
          list2.add(_item(result[0][column].toString()));
        if (list[i] &gt; 49) list3.add(_item(result[0][column].toString()));
      }
  
     // await database.close();
      return listFromDB;
    }
  </code></pre>
  
  <pre><code> bool _summary = false;
  
    _getAnswer() async{
      SharedPreferences pref = await SharedPreferences.getInstance();
      List&lt;String&gt; listString = pref.getStringList('Answers') ?? List();
  
      if(listString.isNotEmpty){
        List&lt;int&gt; listInt = listString.map(int.parse).toList();
        listInt.sort();
        _list = await DB().getList(listInt, _summary ? 'Detail' : 'Output'); //colums from db.
  
        setState((){});
      }
    }
  </code></pre>
  
  <p>What im doing wrong? I want to colums Detail and Otput be free of duplicates.</p>