input
stringlengths 358
16.1k
| output
stringlengths 24
805
|
---|---|
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following 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. [/INST] | 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; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following 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. [/INST] | SELECT T1.title FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid ORDER BY T1.words LIMIT 5; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: How many times did the word pair "i" and "a" appeared in the Cataln language/page? [/INST] | SELECT SUM(occurrences) FROM biwords WHERE w1st = 86 AND w2nd = 109; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: What are the word pairs that occured only twice? [/INST] | 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; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: What is the word pair that occured the highest amount of times in Addicio? Indicate how many times such word pair occured. [/INST] | 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; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: What is the total word of title "Adam" and "Acampada"? [/INST] | SELECT SUM(words) FROM pages WHERE title IN ('Adam', 'Acampada'); |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: What is the revision page ID of title "Aigua dolça"? [/INST] | SELECT revision FROM pages WHERE title = 'Aigua dolça'; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: What is the title of corpus with most words? [/INST] | SELECT title FROM pages WHERE words = ( SELECT MAX(words) FROM pages ); |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: What is the average words of the 10 fewest words title? [/INST] | 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; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: Among the title with single digit word count, list down 5 revision page ID of these titles. [/INST] | SELECT revision FROM pages WHERE words < 10 LIMIT 5; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: List down the page id of titles start with alphabet "b". [/INST] | SELECT pid FROM pages WHERE title LIKE 'b%'; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: What is the title of corpus where word "desena" appear? [/INST] | 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'; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: What is the word id for title "Sometent"? [/INST] | SELECT T2.wid FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid WHERE T1.title = 'Sometent'; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: Is word id "88" the word id for title "Animals"? [/INST] | 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'; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: What are the occurance of word "del" in title "Any anomalÃstic"? [/INST] | 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'; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: State one biword pair with occurence of 4. [/INST] | 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; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: What are the total occurence of words that paired with "nombre"? [/INST] | 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' )); |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: What are the words that were paired with "John", list down 10 of them. [/INST] | SELECT w2nd FROM biwords WHERE w1st = ( SELECT wid FROM words WHERE word = 'john' ) LIMIT 10; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: List down the revision page id of titles where "fresc" appears. [/INST] | SELECT T3.revision 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 = 'fresc'; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: List down the words with word id from 1 to 10 and write down a paired word for each of them. [/INST] | SELECT T1.word AS W1, T3.word AS W2 FROM words AS T1 LEFT JOIN biwords AS T2 ON T1.wid = T2.w1st LEFT JOIN words AS T3 ON T3.wid = T2.w2nd WHERE T1.wid <= 10 GROUP BY T1.wid; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: For corpus title "Atomium", pick 3 words appear in the title and calculate the total occurence of these words. [/INST] | SELECT T1.word, T1.occurrences FROM words AS T1 INNER JOIN pages_words AS T2 ON T1.wid = T2.wid WHERE T2.pid = ( SELECT pid FROM pages WHERE title = 'Atomium' ) LIMIT 3; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: Indicate which is the word that is repeated the most times. [/INST] | SELECT word FROM words WHERE occurrences = ( SELECT MAX(occurrences) FROM words ); |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: Indicate the page id of Wikipedia about Catalan language of all the pages that have a numeric value in their title. [/INST] | SELECT pid, title FROM pages WHERE title LIKE '%0%' OR '%1%' OR '%2%' OR '%3%' OR '%4%' OR '%5%' OR '%6%' OR '%7%' OR '%8%' OR '%9%'; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: What is the title of the page that has the fewest words? [/INST] | SELECT title FROM pages WHERE title = ( SELECT MIN(words) FROM pages ); |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: What is the pair of words that is repeated the most times? Identify them by their ID. [/INST] | SELECT w1st, w2nd FROM biwords WHERE occurrences = ( SELECT MAX(occurrences) FROM biwords ); |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: How many total occurrences are there in the three-letter words? [/INST] | SELECT SUM(occurrences) FROM words WHERE LENGTH(word) = 3; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: Calculate the average number of different words that appear on all pages whose title begins with A. [/INST] | SELECT AVG(words) FROM pages WHERE title LIKE 'A%'; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: Calculate the average number of repetitions in the pairs of words in which the first word id is number 34. [/INST] | SELECT CAST(SUM(CASE WHEN w1st = 34 THEN 1 ELSE 0 END) AS REAL) / COUNT(w1st) FROM biwords; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: Calculate the percentage of pages that have 1500 different words. [/INST] | SELECT CAST(COUNT(CASE WHEN words = 1500 THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(page) FROM pages WHERE words > 300 LIMIT 3; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: Calculate the percentage of times that the same word appears in a pair. [/INST] | SELECT CAST(COUNT(CASE WHEN w1st = w2nd THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(w1st) FROM biwords; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: Indicate the title of all the pages in which the word comunitat appears. [/INST] | 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 = 'comunitat'; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: Indicate on how many different pages the word ripoll appears. [/INST] | SELECT T3.page 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 = 'ripoll'; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: How many words are repeated on the Llista de conflictes armats page? [/INST] | SELECT occurrences FROM pages_words WHERE pid = ( SELECT pid FROM pages WHERE title = 'Llista de conflictes armats' ); |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: Indicate if there is any pair formed by the words fukunaga and d'egees. [/INST] | SELECT CASE WHEN COUNT(T1.wid) > 0 THEN 'yes' ELSE 'no' END FROM words AS T1 INNER JOIN biwords AS T2 ON T1.wid = T2.w1st OR T1.wid = T2.w2nd WHERE T2.w1st = ( SELECT wid FROM words WHERE T1.word = 'fukunaga' ) AND T2.w2nd = ( SELECT wid FROM words WHERE word LIKE 'd%egees' ); |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: Calculate the average of repetitions in the pages that have a total of 100 different words. [/INST] | SELECT CAST(SUM(T2.occurrences) AS REAL) / COUNT(T1.page) FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid WHERE T1.words = 100; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: Which Wikipedia page number does the Catalan language's name, Acampada, appear on? [/INST] | SELECT page FROM pages WHERE title = 'Acampada'; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: Please list any three Wikipedia pages with more than 300 words. [/INST] | SELECT page FROM pages WHERE words > 300 LIMIT 3; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: How many times did the word number 8 appear? [/INST] | SELECT occurrences FROM words WHERE wid = 8; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: Please list the top three most frequently occurring words and their ids. [/INST] | SELECT word, wid FROM words ORDER BY occurrences DESC LIMIT 3; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: How frequently did the words 1 and 25 appear together? [/INST] | SELECT occurrences FROM biwords WHERE w1st = 1 AND w2nd = 25; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: What number of words are there on revision page 27457362? [/INST] | SELECT words FROM pages WHERE revision = 27457362; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: What is the percentage of words in the Catalan language that have a repetition of more than 16,000 times? [/INST] | SELECT CAST(COUNT(CASE WHEN occurrences > 16000 THEN lid ELSE NULL END) AS REAL) * 100 / COUNT(lid) FROM langs_words; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: Which Wikipedia page number has the highest number of words in the Catalan language? [/INST] | SELECT page FROM pages WHERE words = ( SELECT MAX(words) FROM pages ); |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: What proportion of a pair of words in the Catalan language have been repeated less than 80 times? [/INST] | SELECT CAST(COUNT(CASE WHEN occurrences < 80 THEN lid ELSE NULL END) AS REAL) * 100 / COUNT(lid) FROM biwords; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: How many Catalan-language Wikipedia pages are there overall? [/INST] | SELECT pages FROM langs WHERE lang = 'ca'; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: Please list any three Wikipedia pages that are written in Catalan, together with their titles and revision page numbers. [/INST] | SELECT title, revision FROM pages WHERE lid = 1 LIMIT 3; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: What is the language of the pair of words numbered 1 and 616? [/INST] | SELECT T2.lang FROM biwords AS T1 INNER JOIN langs AS T2 ON T1.lid = T2.lid WHERE T1.w1st = 1 AND T1.w2nd = 616; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: How many times does the Catalan word "nombre" repeat itself? [/INST] | SELECT T1.occurrences FROM langs_words AS T1 INNER JOIN words AS T2 ON T1.wid = T2.wid WHERE T2.word = 'nombre'; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: What is the second word in the pair of words number 1 and 8968? [/INST] | SELECT word FROM words WHERE wid = 8968; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: Which word has the most repetitions in the Catalan language? [/INST] | SELECT T2.word FROM langs_words AS T1 INNER JOIN words AS T2 ON T1.wid = T2.wid WHERE T1.occurrences = ( SELECT MAX(occurrences) FROM langs_words ); |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: How many times on page number 44 does the word "votives" appear? [/INST] | SELECT T2.occurrences FROM words AS T1 INNER JOIN pages_words AS T2 ON T1.wid = T2.wid WHERE T1.word = 'votives' AND T2.pid = 44; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: How many times on page number 16 does the second word in the pair of words 1 and 109 appear? [/INST] | 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; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: What is the percentage of the words that have been repeated under 180 times in the Catalan language? [/INST] | 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'; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: What percentage of Catalan-language Wikipedia pages have more than 10,000 words? [/INST] | 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'; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: How many times the word "desena" occurs? [/INST] | SELECT occurrences FROM words WHERE word = 'desena'; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: How many words has the appearance times greater than 10? [/INST] | SELECT COUNT(w1st) AS countwords FROM biwords WHERE occurrences > 10; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: List out the total pages of Wikipedia in Catalan language. [/INST] | SELECT pages FROM langs; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: How many words have repetitions greater than 2000 and lower than 5000? [/INST] | SELECT COUNT(wid) FROM langs_words WHERE occurrences BETWEEN '2000' AND '5000'; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: List out the title of Catalan language Wikipedia page that has wikipedia revision page id as 106601. [/INST] | SELECT title FROM pages WHERE revision = 106601; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: State the Wikipedia page title that has revision page id of 28040864. [/INST] | SELECT title FROM pages WHERE revision = 28040864; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: How many times that the word pair of "barcelona" and "precolombina" occur? [/INST] | SELECT SUM(occurrences) FROM biwords WHERE w1st = ( SELECT wid FROM words WHERE word = 'barcelona' ) AND w2nd = ( SELECT wid FROM words WHERE word = 'precolombina' ); |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: What is the locale of the language of the page titled "Anys 90"? [/INST] | SELECT T1.locale FROM langs AS T1 INNER JOIN pages AS T2 ON T1.lid = T2.lid WHERE T2.title = 'Anys 90'; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: Which word that has 71303 appearance in the Catalan language? [/INST] | SELECT T1.word FROM words AS T1 INNER JOIN langs_words AS T2 ON T1.wid = T2.wid WHERE T2.occurrences = 71303; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: What is the locale of the language of the page titled "Abril"? [/INST] | SELECT T1.locale FROM langs AS T1 INNER JOIN pages AS T2 ON T1.lid = T2.lid WHERE T2.title = 'Abril'; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: What is the total number of words in page containing pair of word id "100" and "317"? [/INST] | SELECT words FROM langs WHERE lid = ( SELECT lid FROM biwords WHERE w1st = 100 AND w2nd = 317 ); |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: State the total pages of the words that has repeated times of 2593. [/INST] | SELECT COUNT(T1.pages) FROM langs AS T1 INNER JOIN langs_words AS T2 ON T1.lid = T2.lid WHERE T2.occurrences = 2593; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: List out the title of the word have id less than 20. [/INST] | SELECT DISTINCT T1.title FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid WHERE T2.wid < 20; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: How many word that has number of different words equal to 3? [/INST] | SELECT COUNT(T2.wid) FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid WHERE T1.words = 3; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: How many word appeared 8 times? State the language id of the page. [/INST] | 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; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: Calculate the average percentage of word appearance in the page that have revision page id smaller than 106680. [/INST] | 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; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: List out the total pages of the words that has repeated times more than 3000. [/INST] | 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; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: State the name of the pair of word that have id of 20 and 50? [/INST] | 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; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: How many pages of Wikipedia are there in total on the Catalan language? [/INST] | SELECT pages FROM langs WHERE lang = 'ca'; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: Please list the titles of the Wikipedia pages on the Catalan language with more than 4000 words. [/INST] | SELECT title FROM pages WHERE lid = 1 AND words > 4000; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: How many words are there on the page titled "Asclepi"? [/INST] | SELECT words FROM pages WHERE title = 'Asclepi'; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: Which of these pages have more words, the page titled "Afluent" or "Asclepi"? [/INST] | SELECT CASE WHEN ( SELECT words FROM pages WHERE title = 'Asclepi' ) > ( SELECT words FROM pages WHERE title = 'Afluent' ) THEN 'Asclepi' ELSE 'Afluent' END; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: What is the occurrence of the word "nombre"? [/INST] | SELECT occurrences FROM words WHERE word = 'nombre'; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: Please list the Catalan words with an occurrence of over 200000. [/INST] | SELECT word FROM words WHERE occurrences > 200000; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: What is the locale of the language of the page titled "Asclepi"? [/INST] | SELECT T2.locale FROM pages AS T1 INNER JOIN langs AS T2 ON T1.lid = T2.lid WHERE T1.title = 'Asclepi'; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: How many times did the word "grec" occur on the page titled "Àbac"? [/INST] | 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'; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: Please list the title of the pages on which the word "grec" occurred for over 20 times. [/INST] | 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; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: How many words are there on the page that the word "grec" has occurred for 52 times? [/INST] | 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; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: What's the occurrence of the biwords pair whose first word is "àbac" and second word is "xinès"? [/INST] | SELECT occurrences FROM biwords WHERE w1st = ( SELECT wid FROM words WHERE word = 'àbac' ) AND w2nd = ( SELECT wid FROM words WHERE word = 'xinès' ); |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: Which biwords pair has a higher occurrence, "àbac-xinès" or "àbac-grec"? [/INST] | 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; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: How many more times does the first word in the biwords pair "àbac-xinès" occur than the biwords pair itself? [/INST] | 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'; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: Please list all the biwords pairs with "àbac" as its first word. [/INST] | 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'; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: What is the total occurrence of the biwords pairs with "àbac" as its first word? [/INST] | SELECT COUNT(T2.w1st) 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'; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: How many Wikipedia pages are there on the language of the biwords pair "àbac-xinès"? [/INST] | SELECT COUNT(T1.pages) FROM langs AS T1 INNER JOIN biwords AS T2 ON T1.lid = T2.lid WHERE T2.w1st = ( SELECT wid FROM words WHERE word = 'àbac' ) AND T2.w2nd = ( SELECT wid FROM words WHERE word = 'xinès' ); |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: How much higher in percentage does the word "grec" occur on the page titled "Àbac" than on the page titled "Astronomia"? [/INST] | SELECT CAST((SUM(CASE WHEN T3.title = 'Àbac' THEN T2.occurrences END) - SUM(CASE WHEN T3.title = 'Astronomia' THEN T2.occurrences END)) AS REAL) * 100 / SUM(CASE WHEN T3.title = 'Astronomia' THEN T2.occurrences END) 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'; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: How many pages does the Catalan language have in Wikipedia? [/INST] | SELECT pages FROM langs WHERE lang = 'ca'; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: Which word has the most repetitions in the Catalan language? Give the ID of the word. [/INST] | SELECT wid FROM langs_words WHERE occurrences = ( SELECT MAX(occurrences) FROM langs_words ); |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: What is the word ID for the second word for the biwords pair with most repetitions? [/INST] | SELECT w2nd FROM biwords WHERE occurrences = ( SELECT MAX(occurrences) FROM biwords ); |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: How many occurrences does the word "panajot" have? [/INST] | SELECT occurrences FROM words WHERE word = 'panajot'; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: Which word has the time of occurrences as 340691? [/INST] | SELECT word FROM words WHERE occurrences = 340691; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: State the word ID for "periodograma". [/INST] | SELECT wid FROM words WHERE word = 'periodograma'; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: For the biwords pair that appears "116430" times, what is the second word of the pair? [/INST] | SELECT T1.word FROM words AS T1 INNER JOIN biwords AS T2 ON T1.wid = T2.w2nd WHERE T2.occurrences = 116430; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: How many times does the word "riu" appears in the biwords pair? [/INST] | SELECT COUNT(T1.wid) 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 = 'riu'; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: Which word has the most appearances in the Wikipedia page with the title of "Agricultura"? Give the word ID. [/INST] | SELECT T2.wid FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid WHERE T1.title = 'Agricultura' ORDER BY T2.occurrences DESC LIMIT 1; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: How many appearances does the word ID No. 2823 have in the Wikipedia page "Astre"? [/INST] | SELECT SUM(T2.occurrences) FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid WHERE T1.title = 'Astre' AND T2.wid = 2823; |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [ INTEGER ] biwords.lid = langs.lid
w1st [ INTEGER ] biwords.w1st = words.wid
w2nd [ INTEGER ] biwords.w2nd = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: In which Wikipedia page does the word ID No. 174 have the most appearances? Give the title. [/INST] | SELECT title FROM pages WHERE pid = ( SELECT pid FROM pages_words WHERE wid = 174 ORDER BY occurrences DESC LIMIT 1 ); |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.