gkunter / coquery

Coquery is a free corpus query tool for linguists, lexicographers, translators, and anybody who wishes to search and analyse a text corpus.
GNU General Public License v3.0
18 stars 4 forks source link

COCA: File table not correctly joined with corpus table #291

Open gkunter opened 6 years ago

gkunter commented 6 years ago

Test case: COCA corpus; query string honestly, selected columns Word and Filename. Running the query returns an SQL error Unknown column 'COQ_FILE_1.Filename' in 'field list'. Apparently, the Files table is not correctly joined with the corpus table during the query:

SELECT COQ_WORD_1.Word AS coq_word_label_1,
       COQ_FILE_1.Filename AS coq_file_name_1,
       ID1 AS coquery_invisible_corpus_id,
       SourceId1 AS coquery_invisible_origin_id
FROM
  (SELECT ID AS ID1,
          SourceId AS SourceId1,
          WordId AS WordId1
   FROM Corpus) AS COQ_CORPUS_1
INNER JOIN Lexicon AS COQ_WORD_1 ON COQ_WORD_1.WordId = WordId1
WHERE (COQ_WORD_1.Word = 'honestly')