1sf/bird-sql-train-with-schema huggingface dataset:
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: How many times on page number 16 does the second word in the pair of words 1 and 109 appear?
Evidence: How many times appear refer to occurrences; page number 16 refers to pid = 16; Pair is a relationship of two words: w1st and w2nd, where w1st is word id of the first word and w2nd is a word id of the second word; w1st = 1; w2nd = 109;
SQL: SELECT SUM(T1.occurrences) FROM pages_words AS T1 INNER JOIN biwords AS T2 ON T2.w2nd = T1.wid WHERE T2.w2nd = 109 AND T2.w1st = 1 AND T1.pid = 16
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: What is the percentage of the words that have been repeated under 180 times in the Catalan language?
Evidence: repeated under 180 times refers to occurrences < 180; Catalan language refers to lang = 'ca'; DIVIDE(COUNT(words WHERE occurrences < 180 and lang = 'ca'), COUNT(words WHERE lang = 'ca')) as percentage;
SQL: SELECT CAST(COUNT(CASE WHEN T2.occurrences < 180 THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.lid) FROM langs AS T1 INNER JOIN langs_words AS T2 ON T1.lid = T2.lid WHERE T1.lang = 'ca'
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: What percentage of Catalan-language Wikipedia pages have more than 10,000 words?
Evidence: Catalan-language refers to lang = 'ca'; more than 10,000 words refer to words > 10000; DIVIDE(COUNT(pages WHERE words > 10000 and lang = 'ca'), COUNT(pages WHERE lang = 'ca')) as percentage;
SQL: SELECT CAST(COUNT(CASE WHEN T2.words > 10000 THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T2.page) FROM langs AS T1 INNER JOIN pages AS T2 ON T1.lid = T2.lid WHERE T1.lang = 'ca'
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: How many times the word "desena" occurs?
Evidence: How many times occurs refers to occurrences;
SQL: SELECT occurrences FROM words WHERE word = 'desena'
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: How many words has the appearance times greater than 10?
Evidence: appearance times greater than 10 refers to occurrences > 10;
SQL: SELECT COUNT(w1st) AS countwords FROM biwords WHERE occurrences > 10
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: List out the total pages of Wikipedia in Catalan language.
Evidence: This is not;
SQL: SELECT pages FROM langs
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: How many words have repetitions greater than 2000 and lower than 5000?
Evidence: repetitions greater than 2000 and lower than 5000 refer to occurrences between 2000 and 5000;
SQL: SELECT COUNT(wid) FROM langs_words WHERE occurrences BETWEEN '2000' AND '5000'
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: List out the title of Catalan language Wikipedia page that has wikipedia revision page id as 106601.
Evidence: Wikipedia revision page id as 106601 refers to revision = 106601;
SQL: SELECT title FROM pages WHERE revision = 106601
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: State the Wikipedia page title that has revision page id of 28040864.
Evidence: revision page id of 28040864 refers to revision = 28040864;
SQL: SELECT title FROM pages WHERE revision = 28040864
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: How many times that the word pair of "barcelona" and "precolombina" occur?
Evidence: Pair is a relationship of two words: w1st and w2nd, where w1st is word id of the first word and w2nd is a word id of the second word; w1st or w2nd = 'barcelona'; w1st or w2nd = 'precolombina';
SQL: SELECT SUM(occurrences) FROM biwords WHERE w1st = ( SELECT wid FROM words WHERE word = 'barcelona' ) AND w2nd = ( SELECT wid FROM words WHERE word = 'precolombina' )
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: What is the locale of the language of the page titled "Anys 90"?
Evidence: page titled "Anys 90" refers to title = 'Anys 90';
SQL: SELECT T1.locale FROM langs AS T1 INNER JOIN pages AS T2 ON T1.lid = T2.lid WHERE T2.title = 'Anys 90'
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: Which word that has 71303 appearance in the Catalan language?
Evidence: has 71303 appearance refers to occurrences = 71303;
SQL: SELECT T1.word FROM words AS T1 INNER JOIN langs_words AS T2 ON T1.wid = T2.wid WHERE T2.occurrences = 71303
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: What is the locale of the language of the page titled "Abril"?
Evidence: the page titled "Abril" refers to title = 'Abril';
SQL: SELECT T1.locale FROM langs AS T1 INNER JOIN pages AS T2 ON T1.lid = T2.lid WHERE T2.title = 'Abril'
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: What is the total number of words in page containing pair of word id "100" and "317"?
Evidence: Pair is a relationship of two words: w1st and w2nd, where w1st is word id of the first word and w2nd is a word id of the second word; w1st = 100; w2nd = 317;
SQL: SELECT words FROM langs WHERE lid = ( SELECT lid FROM biwords WHERE w1st = 100 AND w2nd = 317 )
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: State the total pages of the words that has repeated times of 2593.
Evidence: repeated times of 2593 refers to occurrences = 2593;
SQL: SELECT COUNT(T1.pages) FROM langs AS T1 INNER JOIN langs_words AS T2 ON T1.lid = T2.lid WHERE T2.occurrences = 2593
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: List out the title of the word have id less than 20.
Evidence: word have id less than 20 refers to wid < 20;
SQL: SELECT DISTINCT T1.title FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid WHERE T2.wid < 20
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: How many word that has number of different words equal to 3?
Evidence: This is not;
SQL: SELECT COUNT(T2.wid) FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid WHERE T1.words = 3
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: How many word appeared 8 times? State the language id of the page.
Evidence: appeared 8 times refers to occurrences = 8;
SQL: SELECT COUNT(T2.wid), T1.lid FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid WHERE T2.occurrences = 8
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: Calculate the average percentage of word appearance in the page that have revision page id smaller than 106680.
Evidence: revision page id smaller than 106680 refers to revision < 106680; word appearance refers to occurrences; DIVIDE(SUM(occurrences where revision < 106680), COUNT(occurrences)) as percentage;
SQL: SELECT CAST(SUM(T1.words) AS REAL) * 100 / SUM(T2.occurrences) FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid WHERE T1.revision < 106680
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: List out the total pages of the words that has repeated times more than 3000.
Evidence: repeated more than 3000 times refers to occurrences > 3000;
SQL: SELECT T1.pages FROM langs AS T1 INNER JOIN langs_words AS T2 ON T1.lid = T2.lid WHERE T2.occurrences > 3000 GROUP BY T1.pages
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: State the name of the pair of word that have id of 20 and 50?
Evidence: word that have id of 20 refers to wid = 20; word that have id of 50 refers to wid = 50;
SQL: SELECT T1.word, T3.word FROM words AS T1 INNER JOIN biwords AS T2 ON T1.wid = T2.w1st INNER JOIN words AS T3 ON T3.wid = T2.w2nd WHERE T2.w1st = 20 AND T2.w2nd = 50
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: How many pages of Wikipedia are there in total on the Catalan language?
Evidence: Catalan language refers to lang = 'ca';
SQL: SELECT pages FROM langs WHERE lang = 'ca'
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: Please list the titles of the Wikipedia pages on the Catalan language with more than 4000 words.
Evidence: Catalan language refers to lid = 1; more than 4000 words refers to words > 4000;
SQL: SELECT title FROM pages WHERE lid = 1 AND words > 4000
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: How many words are there on the page titled "Asclepi"?
Evidence: page titled "Asclepi" refers to title = 'Asclepi' ;
SQL: SELECT words FROM pages WHERE title = 'Asclepi'
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: Which of these pages have more words, the page titled "Afluent" or "Asclepi"?
Evidence: COUNT(words where title = 'Afluent')> COUNT(words where title = 'Asclepi')
SQL: SELECT CASE WHEN ( SELECT words FROM pages WHERE title = 'Asclepi' ) > ( SELECT words FROM pages WHERE title = 'Afluent' ) THEN 'Asclepi' ELSE 'Afluent' END
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: What is the occurrence of the word "nombre"?
Evidence: This is not;
SQL: SELECT occurrences FROM words WHERE word = 'nombre'
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: Please list the Catalan words with an occurrence of over 200000.
Evidence: occurrence of over 200000 refers to occurrences > 200000;
SQL: SELECT word FROM words WHERE occurrences > 200000
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: What is the locale of the language of the page titled "Asclepi"?
Evidence: page titled "Asclepi" refers to title = 'Asclepi' ;
SQL: SELECT T2.locale FROM pages AS T1 INNER JOIN langs AS T2 ON T1.lid = T2.lid WHERE T1.title = 'Asclepi'
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: How many times did the word "grec" occur on the page titled "Àbac"?
Evidence: how many times occur refers to occurrences; page titled "Àbac" refers to title = 'Àbac' ;
SQL: SELECT T2.occurrences FROM words AS T1 INNER JOIN pages_words AS T2 ON T1.wid = T2.wid INNER JOIN pages AS T3 ON T2.pid = T3.pid WHERE T3.title = 'Àbac' AND T1.word = 'grec'
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: Please list the title of the pages on which the word "grec" occurred for over 20 times.
Evidence: occurred for over 20 times refers to occurrences > 20;
SQL: SELECT T3.title FROM words AS T1 INNER JOIN pages_words AS T2 ON T1.wid = T2.wid INNER JOIN pages AS T3 ON T2.pid = T3.pid WHERE T1.word = 'grec' AND T2.occurrences > 20
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: How many words are there on the page that the word "grec" has occurred for 52 times?
Evidence: the word "grec" refers to word = 'grec'; occurred for 52 times refers to occurrences = 52
SQL: SELECT SUM(T3.words) FROM words AS T1 INNER JOIN pages_words AS T2 ON T1.wid = T2.wid INNER JOIN pages AS T3 ON T2.pid = T3.pid WHERE T1.word = 'grec' AND T2.occurrences = 52
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: What's the occurrence of the biwords pair whose first word is "àbac" and second word is "xinès"?
Evidence: àbac refers to word = 'àbac'; xinès refers to word = 'xinès'; occurrence refers to occurrences
SQL: SELECT occurrences FROM biwords WHERE w1st = ( SELECT wid FROM words WHERE word = 'àbac' ) AND w2nd = ( SELECT wid FROM words WHERE word = 'xinès' )
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: Which biwords pair has a higher occurrence, "àbac-xinès" or "àbac-grec"?
Evidence: higher occurrence is MAX(occurrences); àbac refers to word = 'àbac'; xinès refers to word = 'xinès'; grec refers to word = 'grec'
SQL: SELECT CASE WHEN ( SELECT occurrences FROM biwords WHERE w1st = ( SELECT wid FROM words WHERE word = 'àbac' ) AND w2nd = ( SELECT wid FROM words WHERE word = 'xinès' ) ) > ( SELECT occurrences FROM biwords WHERE w1st = ( SELECT wid FROM words WHERE word = 'àbac' ) AND w2nd = ( SELECT wid FROM words WHERE word = 'grec' ) ) THEN 'àbac-xinès' ELSE 'àbac-grec' END AS CALUS FROM words LIMIT 1
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: How many more times does the first word in the biwords pair "àbac-xinès" occur than the biwords pair itself?
Evidence: àbac refers to word = 'àbac'; xinès refers to word = 'xinès'; How many more times the first word in the biwords occur than the biwords pair itself means SUBTRACT(words.occurrence, biwords.occurrences)
SQL: SELECT occurrences - ( SELECT occurrences FROM biwords WHERE w1st = ( SELECT wid FROM words WHERE word = 'àbac' ) AND w2nd = ( SELECT wid FROM words WHERE word = 'xinès' ) ) AS CALUS FROM words WHERE word = 'àbac'
Database: language_corpus
Tables: langs, pages, words, langs_words, pages_words, biwords
Columns (table index, column name): -1, *, 0, lid, 0, lang, 0, locale, 0, pages, 0, words, 1, pid, 1, lid, 1, page, 1, revision, 1, title, 1, words, 2, wid, 2, word, 2, occurrences, 3, lid, 3, wid, 3, occurrences, 4, pid, 4, wid, 4, occurrences, 5, lid, 5, w1st, 5, w2nd, 5, occurrences
Question: Please list all the biwords pairs with "àbac" as its first word.
Evidence: àbac refers to word = 'àbac'; first word refers to w1st
SQL: SELECT T1.word AS W1, T3.word AS W2 FROM words AS T1 INNER JOIN biwords AS T2 ON T1.wid = T2.w1st INNER JOIN words AS T3 ON T3.wid = T2.w2nd WHERE T1.word = 'àbac'