1sf/bird-sql-train-with-schema huggingface dataset:
Database: shipping
Tables: city, customer, driver, truck, shipment
Columns (table index, column name): -1, *, 0, city_id, 0, city_name, 0, state, 0, population, 0, area, 1, cust_id, 1, cust_name, 1, annual_revenue, 1, cust_type, 1, address, 1, city, 1, state, 1, zip, 1, phone, 2, driver_id, 2, first_name, 2, last_name, 2, address, 2, city, 2, state, 2, zip_code, 2, phone, 3, truck_id, 3, make, 3, model_year, 4, ship_id, 4, cust_id, 4, weight, 4, truck_id, 4, driver_id, 4, city_id, 4, ship_date
Question: Calculate the difference between the number of shipments shipped by the truck with the model year 2005 and model year 2006.
Evidence: "2005" and "2006" are both model_year of truck; difference = Subtract (Count (ship_id where model_year = 2005), Count(ship_id where model_year = 2006))
SQL: SELECT SUM(CASE WHEN T1.model_year = '2005' THEN 1 ELSE 0 END) - SUM(CASE WHEN T1.model_year = '2006' THEN 1 ELSE 0 END) FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id
Database: shipping
Tables: city, customer, driver, truck, shipment
Columns (table index, column name): -1, *, 0, city_id, 0, city_name, 0, state, 0, population, 0, area, 1, cust_id, 1, cust_name, 1, annual_revenue, 1, cust_type, 1, address, 1, city, 1, state, 1, zip, 1, phone, 2, driver_id, 2, first_name, 2, last_name, 2, address, 2, city, 2, state, 2, zip_code, 2, phone, 3, truck_id, 3, make, 3, model_year, 4, ship_id, 4, cust_id, 4, weight, 4, truck_id, 4, driver_id, 4, city_id, 4, ship_date
Question: List the driver's name of the shipment with a weight greater than 95% of the average weight of all shipments.
Evidence: weight greater than 95% of average weight refers to weight > Multiply (AVG(weight), 0.95); driver name refers to first_name, last_name
SQL: SELECT T2.first_name, T2.last_name FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T1.weight * 100 > ( SELECT 95 * AVG(weight) FROM shipment )
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: Name the longest Catalan language Wikipedia page title and state the number of different words in this page.
Evidence: longest title refers to max(length(title))
SQL: SELECT title, words FROM pages WHERE title = ( SELECT MAX(LENGTH(title)) FROM 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: List all the Catalan language wikipedia page title with less than 10 number of different words in these pages.
Evidence: less than 10 number of different words refers to words < 10
SQL: SELECT title FROM pages WHERE words < 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 the page number for Catalan language wikipedia pages containing the word 'Art' in the page title.
Evidence: containing the word 'Art' refers to title LIKE '% Art %'
SQL: SELECT page FROM pages WHERE title LIKE 'Art%' OR title LIKE '%Art%' OR title LIKE '%Art'
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 title of Catalan language wikipedia page with revision page id '16203226'?
Evidence: revision page id '16203226' refers to revision = 16203226
SQL: SELECT title FROM pages WHERE revision = 16203226
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 the titles for all Catalan language wikipedia page from revision page id 106600 to 106700.
Evidence: from revision page id 106600 to 106700 refers to revision BETWEEN 106600 AND 106700
SQL: SELECT title FROM pages WHERE revision BETWEEN 106600 AND 106700
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 Catalan language wikipedia pages have between 1000 to 2000 number of different words?
Evidence: between 1000 to 2000 number of different words refers to words BETWEEN 1000 AND 2000
SQL: SELECT COUNT(pid) FROM pages WHERE words BETWEEN 1000 AND 2000
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 the page id of wikipedia about Catalan language which have the appearance of the word 'decimal'?
Evidence: have the appearance of 'decimal' refers to word = 'decimal'
SQL: SELECT T2.pid FROM words AS T1 INNER JOIN pages_words AS T2 ON T1.wid = T2.wid WHERE T1.word = 'decimal'
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 has the most occurrences within the same page of wikipedia about Catalan language?
Evidence: most occurrences refers to max(occurrences)
SQL: SELECT T1.word FROM words AS T1 INNER JOIN pages_words AS T2 ON T1.wid = T2.wid WHERE T2.occurrences = ( SELECT MAX(occurrences) FROM pages_words )
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 all the first words of the biwords pair where the second word is 'antic'.
Evidence: first words refer to w1st.word; second word is 'antic' refers to w2nd.word = 'antic'
SQL: SELECT T1.word FROM words AS T1 INNER JOIN biwords AS T2 ON T1.wid = T2.w1st WHERE T2.w2nd = ( SELECT wid FROM words WHERE word = 'antic' )
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: Show all the title of pages and number of occurences for each page where the word 'quipu' appears.
Evidence: word 'quipu' appears refers to word = 'quipu'
SQL: SELECT T1.title, T2.occurrences FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid INNER JOIN words AS T3 ON T2.wid = T3.wid WHERE T3.word = 'quipu'
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 number of the word occurrences in which ‘system’ appeared as the first word in the pair.
Evidence: average word occurrences = divide(sum(occurrences), count(occurrences)); ‘system’ appeared as the first word refers to w1st = 'system'
SQL: SELECT AVG(T2.occurrences) FROM words AS T1 INNER JOIN biwords AS T2 ON T1.wid = T2.w1st WHERE T2.w1st = ( SELECT wid FROM words WHERE word = 'sistema' )
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 pages of Wikipedia in Catalan language?
Evidence: total pages refers to sum(pages); 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: In the Catalan language, which biwords pair appeared the most in this language/page?
Evidence: biwords pair refers to w1st.word w2nd.word; appeared the most refers to max(occurrences)
SQL: SELECT w1st, w2nd FROM biwords WHERE occurrences = ( SELECT MAX(occurrences) FROM biwords )
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 word id of the catalan language that was repeated no more than 10 times in the said language?
Evidence: word id refers to wid; repeated no more than 10 times refers to occurrences < = 10
SQL: SELECT wid FROM langs_words 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: What is the title of the Catalan language Wikipedia page that has the highest number of different words?
Evidence: highest number of different words refers to max(words)
SQL: SELECT title FROM pages WHERE words = ( SELECT MAX(words) FROM 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: What is the wikipedia page id of Arqueozoologia?
Evidence: page id refers to pid; Arqueozoologia refers to title = 'Arqueozoologia'
SQL: SELECT page FROM pages WHERE title = 'Arqueozoologia'
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: In Abadia, what is the word id of the of the Catalan language that appeared the highest amount of times? Indicate the how many times did they said word id appeared.
Evidence: Abadia refers to title = 'Abadia'; word id refers to wid; the highest amount of times refers to max(occurrences)
SQL: SELECT T2.wid, T2.occurrences FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid WHERE T1.title = 'Abadia' ORDER BY T2.occurrences DESC 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: What are the titles of the top 5 Catalan language Wikipedia page with the least number of different words? Indicate each title's word id that has appeared the most in the said pages.
Evidence: least number of different words refers to min(words); word id refers to wid; appeared the most refers to max(occurrences)
SQL: SELECT T1.title FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid ORDER BY T1.words LIMIT 5
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 pair "i" and "a" appeared in the Cataln language/page?
Evidence: times appeared refers to occurrences; word pair "i" and "a" refers to w1st.word = 'i' w2st.word = 'a'
SQL: SELECT SUM(occurrences) FROM biwords WHERE w1st = 86 AND w2nd = 109
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 are the word pairs that occured only twice?
Evidence: word pair refers to w1st.word w2nd.word; occured only twice refers to occurrences = 2
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.occurrences = 2
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 word pair that occured the highest amount of times in Addicio? Indicate how many times such word pair occured.
Evidence: word pair refers to w1st.word w2nd.word; occurred the highest amount of times refers to max(occurrences); Addicio refers to title = 'Addicio'; times occurred refer to occurrences
SQL: SELECT T3.w1st, T3.w2nd, T3.occurrences FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid INNER JOIN biwords AS T3 ON T2.wid = T3.w1st OR T2.wid = T3.w2nd WHERE T1.title = 'Addicio' ORDER BY T3.occurrences DESC 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: What is the total word of title "Adam" and "Acampada"?
Evidence: total word refers to sum(words); title "Adam" and "Acampada" refers to title IN('Adam','Acampada')
SQL: SELECT SUM(words) FROM pages WHERE title IN ('Adam', 'Acampada')
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 revision page ID of title "Aigua dolÃ§a"?
Evidence: title "Aigua dolÃ§a" refers to title LIKE 'Aigua dolÃ§a%'
SQL: SELECT revision FROM pages WHERE title = 'Aigua dolÃ§a'
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 title of corpus with most words?
Evidence: most words refers to max(words)
SQL: SELECT title FROM pages WHERE words = ( SELECT MAX(words) FROM 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: What is the average words of the 10 fewest words title?
Evidence: average words = avg(words); 10 fewest words refers to words > = 10
SQL: SELECT CAST(SUM(CASE WHEN words >= 10 THEN words ELSE 0 END) AS REAL) / SUM(CASE WHEN words >= 10 THEN 1 ELSE 0 END) FROM 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: Among the title with single digit word count, list down 5 revision page ID of these titles.
Evidence: single digit word count refers to words < 10
SQL: SELECT revision FROM pages WHERE words < 10 LIMIT 5
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 down the page id of titles start with alphabet "b".
Evidence: start with alphabet "b" refers to title LIKE 'b%'
SQL: SELECT pid FROM pages WHERE title LIKE 'b%'
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 title of corpus where word "desena" appear?
Evidence: This is not
SQL: SELECT T1.title FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid INNER JOIN words AS T3 ON T2.wid = T3.wid WHERE T3.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: What is the word id for title "Sometent"?
Evidence: word id refers to wid
SQL: SELECT T2.wid FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid WHERE T1.title = 'Sometent'
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: Is word id "88" the word id for title "Animals"?
Evidence: word id "88" refers to wid = 88
SQL: SELECT CASE WHEN COUNT(T1.pid) > 0 THEN 'YES' ELSE 'NO' END AS YORN FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid WHERE T2.wid = 88 AND T1.title = 'Animals'
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 are the occurance of word "del" in title "Any anomalÃ­stic"?
Evidence: This is not
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 T1.word = 'del' AND T3.title = 'Any anomalÃ­stic'
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 one biword pair with occurence of 4.
Evidence: biword pair refers to w1st.word w2nd.word; occurrence of 4 refers to occurrences = 4
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.occurrences = 4 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: What are the total occurence of words that paired with "nombre"?
Evidence: total occurrence refers to sum(occurrences); paired with "nombre" refers to w1st.word = "nombre" or w2nd.word = "nombre"
SQL: SELECT SUM(T2.occurrences) FROM words AS T1 INNER JOIN biwords AS T2 ON T1.wid = T2.w1st OR T1.wid = T2.w2nd WHERE T2.w1st IN (( SELECT wid FROM words WHERE word = 'nombre' ) OR T2.w2nd IN ( SELECT wid FROM words WHERE word = 'nombre' ))