input stringlengths 201 2.7k | output stringlengths 24 744 |
|---|---|
[INST] Here is a database schema:
city :
city_id [ INTEGER ] primary_key
city_name [ TEXT ]
state [ TEXT ]
population [ INTEGER ]
area [ REAL ]
shipment :
ship_id [ INTEGER ] primary_key
cust_id [ INTEGER ] shipment.cust_id = customer.cust_id
weight [ REAL ]
truck_id [ INTEGER ] shipment.truck_id = truck.truck_id
drive... | SELECT T2.city_name FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id ORDER BY T1.weight DESC LIMIT 1; |
[INST] Here is a database schema:
city :
city_id [ INTEGER ] primary_key
city_name [ TEXT ]
state [ TEXT ]
population [ INTEGER ]
area [ REAL ]
driver :
driver_id [ INTEGER ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
zip_code [ INTEGER ]
phone [ TEXT ]
shipment :
s... | SELECT DISTINCT T3.city_name FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id INNER JOIN city AS T3 ON T1.city_id = T3.city_id WHERE T2.first_name = 'Zachery' AND T2.last_name = 'Hicks'; |
[INST] Here is a database schema:
driver :
driver_id [ INTEGER ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
zip_code [ INTEGER ]
phone [ TEXT ]
shipment :
ship_id [ INTEGER ] primary_key
cust_id [ INTEGER ] shipment.cust_id = customer.cust_id
weight [ REAL ]
truck_i... | SELECT CAST(SUM(CASE WHEN T2.first_name = 'Zachery' AND T2.last_name = 'Hicks' THEN T1.ship_id ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE STRFTIME('%Y', T1.ship_date) = '2017'; |
[INST] Here is a database schema:
driver :
driver_id [ INTEGER ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
zip_code [ INTEGER ]
phone [ TEXT ]
shipment :
ship_id [ INTEGER ] primary_key
cust_id [ INTEGER ] shipment.cust_id = customer.cust_id
weight [ REAL ]
truck_i... | SELECT CAST(SUM(CASE WHEN T2.first_name = 'Zachery' AND T2.last_name = 'Hicks' THEN T1.weight ELSE 0 END) AS REAL) * 100 / SUM(T1.weight) FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE STRFTIME('%Y', T1.ship_date) = '2016'; |
[INST] Here is a database schema:
driver :
driver_id [ INTEGER ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
zip_code [ INTEGER ]
phone [ TEXT ]
shipment :
ship_id [ INTEGER ] primary_key
cust_id [ INTEGER ] shipment.cust_id = customer.cust_id
weight [ REAL ]
truck_i... | SELECT COUNT(*) FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T1.driver_id = 23; |
[INST] Here is a database schema:
city :
city_id [ INTEGER ] primary_key
city_name [ TEXT ]
state [ TEXT ]
population [ INTEGER ]
area [ REAL ]
shipment :
ship_id [ INTEGER ] primary_key
cust_id [ INTEGER ] shipment.cust_id = customer.cust_id
weight [ REAL ]
truck_id [ INTEGER ] shipment.truck_id = truck.truck_id
drive... | SELECT T1.ship_id FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id ORDER BY T2.area DESC LIMIT 1; |
[INST] Here is a database schema:
city :
city_id [ INTEGER ] primary_key
city_name [ TEXT ]
state [ TEXT ]
population [ INTEGER ]
area [ REAL ]
driver :
driver_id [ INTEGER ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
zip_code [ INTEGER ]
phone [ TEXT ]
shipment :
s... | SELECT T3.first_name, T3.last_name FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id INNER JOIN driver AS T3 ON T3.driver_id = T1.driver_id ORDER BY T2.population ASC LIMIT 1; |
[INST] Here is a database schema:
city :
city_id [ INTEGER ] primary_key
city_name [ TEXT ]
state [ TEXT ]
population [ INTEGER ]
area [ REAL ]
shipment :
ship_id [ INTEGER ] primary_key
cust_id [ INTEGER ] shipment.cust_id = customer.cust_id
weight [ REAL ]
truck_id [ INTEGER ] shipment.truck_id = truck.truck_id
drive... | SELECT COUNT(*) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T2.city_name = 'Cicero' AND T2.state = 'Illinois' AND T1.weight BETWEEN 9000 AND 15000; |
[INST] Here is a database schema:
truck :
truck_id [ INTEGER ] primary_key
make [ TEXT ]
model_year [ INTEGER ]
shipment :
ship_id [ INTEGER ] primary_key
cust_id [ INTEGER ] shipment.cust_id = customer.cust_id
weight [ REAL ]
truck_id [ INTEGER ] shipment.truck_id = truck.truck_id
driver_id [ INTEGER ] shipment.driver... | SELECT T1.model_year FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id WHERE T2.ship_id = '1233'; |
[INST] Here is a database schema:
customer :
cust_id [ INTEGER ] primary_key
cust_name [ TEXT ]
annual_revenue [ INTEGER ]
cust_type [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
zip [ REAL ]
phone [ TEXT ]
driver :
driver_id [ INTEGER ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
address [ TEXT ]
city ... | SELECT T3.address FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id INNER JOIN driver AS T3 ON T3.driver_id = T1.driver_id WHERE T2.address = '7052 Carroll Road' AND T2.city = 'San Diego' AND T2.state = 'CA'; |
[INST] Here is a database schema:
driver :
driver_id [ INTEGER ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
zip_code [ INTEGER ]
phone [ TEXT ]
shipment :
ship_id [ INTEGER ] primary_key
cust_id [ INTEGER ] shipment.cust_id = customer.cust_id
weight [ REAL ]
truck_i... | SELECT COUNT(*) FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T2.first_name = 'Maria' AND T2.last_name = 'Craft' AND STRFTIME('%Y', T1.ship_date) = '2017'; |
[INST] Here is a database schema:
truck :
truck_id [ INTEGER ] primary_key
make [ TEXT ]
model_year [ INTEGER ]
shipment :
ship_id [ INTEGER ] primary_key
cust_id [ INTEGER ] shipment.cust_id = customer.cust_id
weight [ REAL ]
truck_id [ INTEGER ] shipment.truck_id = truck.truck_id
driver_id [ INTEGER ] shipment.driver... | SELECT T1.model_year FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id WHERE T2.ship_id = '1245'; |
[INST] Here is a database schema:
driver :
driver_id [ INTEGER ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
zip_code [ INTEGER ]
phone [ TEXT ]
shipment :
ship_id [ INTEGER ] primary_key
cust_id [ INTEGER ] shipment.cust_id = customer.cust_id
weight [ REAL ]
truck_i... | SELECT T2.address FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T1.ship_id = '1127'; |
[INST] Here is a database schema:
customer :
cust_id [ INTEGER ] primary_key
cust_name [ TEXT ]
annual_revenue [ INTEGER ]
cust_type [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
zip [ REAL ]
phone [ TEXT ]
shipment :
ship_id [ INTEGER ] primary_key
cust_id [ INTEGER ] shipment.cust_id = customer.cust_id
weigh... | SELECT T2.annual_revenue FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id WHERE T1.ship_id = '1047'; |
[INST] Here is a database schema:
driver :
driver_id [ INTEGER ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
zip_code [ INTEGER ]
phone [ TEXT ]
shipment :
ship_id [ INTEGER ] primary_key
cust_id [ INTEGER ] shipment.cust_id = customer.cust_id
weight [ REAL ]
truck_i... | SELECT T1.weight FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T2.first_name = 'Andrea' AND T2.last_name = 'Simons' AND T1.ship_date = '2016-03-07'; |
[INST] Here is a database schema:
city :
city_id [ INTEGER ] primary_key
city_name [ TEXT ]
state [ TEXT ]
population [ INTEGER ]
area [ REAL ]
shipment :
ship_id [ INTEGER ] primary_key
cust_id [ INTEGER ] shipment.cust_id = customer.cust_id
weight [ REAL ]
truck_id [ INTEGER ] shipment.truck_id = truck.truck_id
drive... | SELECT T2.city_name FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T1.ship_date = '2017-01-16'; |
[INST] Here is a database schema:
customer :
cust_id [ INTEGER ] primary_key
cust_name [ TEXT ]
annual_revenue [ INTEGER ]
cust_type [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
zip [ REAL ]
phone [ TEXT ]
shipment :
ship_id [ INTEGER ] primary_key
cust_id [ INTEGER ] shipment.cust_id = customer.cust_id
weigh... | SELECT COUNT(*) FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id WHERE T2.state = 'NY'; |
[INST] Here is a database schema:
customer :
cust_id [ INTEGER ] primary_key
cust_name [ TEXT ]
annual_revenue [ INTEGER ]
cust_type [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
zip [ REAL ]
phone [ TEXT ]
shipment :
ship_id [ INTEGER ] primary_key
cust_id [ INTEGER ] shipment.cust_id = customer.cust_id
weigh... | SELECT T2.cust_name FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id WHERE T1.ship_id = '1147'; |
[INST] Here is a database schema:
city :
city_id [ INTEGER ] primary_key
city_name [ TEXT ]
state [ TEXT ]
population [ INTEGER ]
area [ REAL ]
shipment :
ship_id [ INTEGER ] primary_key
cust_id [ INTEGER ] shipment.cust_id = customer.cust_id
weight [ REAL ]
truck_id [ INTEGER ] shipment.truck_id = truck.truck_id
drive... | SELECT T1.ship_id FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id ORDER BY T2.population DESC LIMIT 1; |
[INST] Here is a database schema:
driver :
driver_id [ INTEGER ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
zip_code [ INTEGER ]
phone [ TEXT ]
shipment :
ship_id [ INTEGER ] primary_key
cust_id [ INTEGER ] shipment.cust_id = customer.cust_id
weight [ REAL ]
truck_i... | SELECT T2.first_name, T2.last_name FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T1.ship_date = '2016-02-22'; |
[INST] Here is a database schema:
customer :
cust_id [ INTEGER ] primary_key
cust_name [ TEXT ]
annual_revenue [ INTEGER ]
cust_type [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
zip [ REAL ]
phone [ TEXT ]
shipment :
ship_id [ INTEGER ] primary_key
cust_id [ INTEGER ] shipment.cust_id = customer.cust_id
weigh... | SELECT T1.weight FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id WHERE T2.annual_revenue = 39448581; |
[INST] Here is a database schema:
customer :
cust_id [ INTEGER ] primary_key
cust_name [ TEXT ]
annual_revenue [ INTEGER ]
cust_type [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
zip [ REAL ]
phone [ TEXT ]
shipment :
ship_id [ INTEGER ] primary_key
cust_id [ INTEGER ] shipment.cust_id = customer.cust_id
weigh... | SELECT T2.address FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id WHERE T1.ship_id = '1117'; |
[INST] Here is a database schema:
customer :
cust_id [ INTEGER ] primary_key
cust_name [ TEXT ]
annual_revenue [ INTEGER ]
cust_type [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
zip [ REAL ]
phone [ TEXT ]
shipment :
ship_id [ INTEGER ] primary_key
cust_id [ INTEGER ] shipment.cust_id = customer.cust_id
weigh... | SELECT CAST(SUM(CASE WHEN STRFTIME('%Y', T1.ship_date) = '2017' THEN 1 ELSE 0 END) AS REAL ) * 100 / COUNT(*) FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id WHERE T2.state = 'TX'; |
[INST] Here is a database schema:
truck :
truck_id [ INTEGER ] primary_key
make [ TEXT ]
model_year [ INTEGER ]
shipment :
ship_id [ INTEGER ] primary_key
cust_id [ INTEGER ] shipment.cust_id = customer.cust_id
weight [ REAL ]
truck_id [ INTEGER ] shipment.truck_id = truck.truck_id
driver_id [ INTEGER ] shipment.driver... | SELECT SUM(CASE WHEN T1.model_year = '2005' THEN 1 ELSE 0 END) - SUM(CASE WHEN T1.model_year = '2006' THEN 1 ELSE 0 END) FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id; |
[INST] Here is a database schema:
driver :
driver_id [ INTEGER ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
zip_code [ INTEGER ]
phone [ TEXT ]
shipment :
ship_id [ INTEGER ] primary_key
cust_id [ INTEGER ] shipment.cust_id = customer.cust_id
weight [ REAL ]
truck_i... | SELECT T2.first_name, T2.last_name FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T1.weight * 100 > ( SELECT 95 * AVG(weight) FROM shipment ); |
[INST] Here is a database schema:
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
Please write me a SQL statement that answers the following question: Name the longest Catalan language Wikipedia page title and state the nu... | SELECT title, words FROM pages WHERE title = ( SELECT MAX(LENGTH(title)) FROM pages ); |
[INST] Here is a database schema:
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
Please write me a SQL statement that answers the following question: List all the Catalan language wikipedia page title with less than 10 nu... | SELECT title FROM pages WHERE words < 10; |
[INST] Here is a database schema:
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
Please write me a SQL statement that answers the following question: List the page number for Catalan language wikipedia pages containing th... | SELECT page FROM pages WHERE title LIKE 'Art%' OR title LIKE '%Art%' OR title LIKE '%Art'; |
[INST] Here is a database schema:
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
Please write me a SQL statement that answers the following question: What is the title of Catalan language wikipedia page with revision page... | SELECT title FROM pages WHERE revision = 16203226; |
[INST] Here is a database schema:
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
Please write me a SQL statement that answers the following question: List the titles for all Catalan language wikipedia page from revision p... | SELECT title FROM pages WHERE revision BETWEEN 106600 AND 106700; |
[INST] Here is a database schema:
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
Please write me a SQL statement that answers the following question: How many Catalan language wikipedia pages have between 1000 to 2000 num... | SELECT COUNT(pid) FROM pages WHERE words BETWEEN 1000 AND 2000; |
[INST] Here is a database schema:
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: List the page id... | SELECT T2.pid FROM words AS T1 INNER JOIN pages_words AS T2 ON T1.wid = T2.wid WHERE T1.word = 'decimal'; |
[INST] Here is a database schema:
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: Which word has t... | SELECT T1.word FROM words AS T1 INNER JOIN pages_words AS T2 ON T1.wid = T2.wid WHERE T2.occurrences = ( SELECT MAX(occurrences) FROM pages_words ); |
[INST] Here is a database schema:
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
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 foll... | SELECT T1.word FROM words AS T1 INNER JOIN biwords AS T2 ON T1.wid = T2.w1st WHERE T2.w2nd = ( SELECT wid FROM words WHERE word = 'antic' ); |
[INST] Here is a database schema:
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 ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INT... | SELECT T1.title, T2.occurrences FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid INNER JOIN words AS T3 ON T2.wid = T3.wid WHERE T3.word = 'quipu'; |
[INST] Here is a database schema:
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
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 foll... | SELECT AVG(T2.occurrences) FROM words AS T1 INNER JOIN biwords AS T2 ON T1.wid = T2.w1st WHERE T2.w1st = ( SELECT wid FROM words WHERE word = 'sistema' ); |
[INST] Here is a database schema:
langs :
lid [ INTEGER ] primary_key
lang [ TEXT ]
locale [ TEXT ]
pages [ INTEGER ]
words [ INTEGER ]
Please write me a SQL statement that answers the following question: What is the total pages of Wikipedia in Catalan language? [/INST] [/INST] | SELECT pages FROM langs WHERE lang = 'ca'; |
[INST] Here is a database schema:
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 the Catalan language, which biwords pair appeared the m... | SELECT w1st, w2nd FROM biwords WHERE occurrences = ( SELECT MAX(occurrences) FROM biwords ); |
[INST] Here is a database schema:
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: What is the word id of the catalan language that was repeated no more than 10 times in the... | SELECT wid FROM langs_words WHERE occurrences <= 10; |
[INST] Here is a database schema:
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
Please write me a SQL statement that answers the following question: What is the title of the Catalan language Wikipedia page that has the h... | SELECT title FROM pages WHERE words = ( SELECT MAX(words) FROM pages ); |
[INST] Here is a database schema:
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
Please write me a SQL statement that answers the following question: What is the wikipedia page id of Arqueozoologia? [/INST] [/INST] | SELECT page FROM pages WHERE title = 'Arqueozoologia'; |
[INST] Here is a database schema:
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
Please write m... | 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:
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
Please write m... | 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:
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 t... | SELECT SUM(occurrences) FROM biwords WHERE w1st = 86 AND w2nd = 109; |
[INST] Here is a database schema:
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
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 foll... | 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:
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
biwords :
lid [... | 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:
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
Please write me a SQL statement that answers the following question: What is the total word of title "Adam" and "Acampada"? [/INST] [/INST] | SELECT SUM(words) FROM pages WHERE title IN ('Adam', 'Acampada'); |
[INST] Here is a database schema:
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
Please write me a SQL statement that answers the following question: What is the revision page ID of title "Aigua dolça"? [/INST] [/INST] | SELECT revision FROM pages WHERE title = 'Aigua dolça'; |
[INST] Here is a database schema:
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
Please write me a SQL statement that answers the following question: What is the title of corpus with most words? [/INST] [/INST] | SELECT title FROM pages WHERE words = ( SELECT MAX(words) FROM pages ); |
[INST] Here is a database schema:
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
Please write me a SQL statement that answers the following question: What is the average words of the 10 fewest words title? [/INST] [/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:
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ 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... | SELECT revision FROM pages WHERE words < 10 LIMIT 5; |
[INST] Here is a database schema:
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
Please write me a SQL statement that answers the following question: List down the page id of titles start with alphabet "b". [/INST] [/INST... | SELECT pid FROM pages WHERE title LIKE 'b%'; |
[INST] Here is a database schema:
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 ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INT... | 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:
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
Please write m... | 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:
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
Please write m... | 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:
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 ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INT... | 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:
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
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 foll... | 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:
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
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 foll... | 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:
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
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 foll... | SELECT w2nd FROM biwords WHERE w1st = ( SELECT wid FROM words WHERE word = 'john' ) LIMIT 10; |
[INST] Here is a database schema:
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 ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INT... | 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:
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
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 foll... | 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:
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 ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INT... | 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:
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
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] [/INST] | SELECT word FROM words WHERE occurrences = ( SELECT MAX(occurrences) FROM words ); |
[INST] Here is a database schema:
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
Please write me a SQL statement that answers the following question: Indicate the page id of Wikipedia about Catalan language of all the pag... | 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:
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ 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] [/INST... | SELECT title FROM pages WHERE title = ( SELECT MIN(words) FROM pages ); |
[INST] Here is a database schema:
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?... | SELECT w1st, w2nd FROM biwords WHERE occurrences = ( SELECT MAX(occurrences) FROM biwords ); |
[INST] Here is a database schema:
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
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] [/INST] | SELECT SUM(occurrences) FROM words WHERE LENGTH(word) = 3; |
[INST] Here is a database schema:
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
Please write me a SQL statement that answers the following question: Calculate the average number of different words that appear on all page... | SELECT AVG(words) FROM pages WHERE title LIKE 'A%'; |
[INST] Here is a database schema:
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 o... | SELECT CAST(SUM(CASE WHEN w1st = 34 THEN 1 ELSE 0 END) AS REAL) / COUNT(w1st) FROM biwords; |
[INST] Here is a database schema:
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
Please write me a SQL statement that answers the following question: Calculate the percentage of pages that have 1500 different words. [/INS... | 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:
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 appea... | 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:
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 ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INT... | 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:
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 ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INT... | 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:
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
Please write m... | SELECT occurrences FROM pages_words WHERE pid = ( SELECT pid FROM pages WHERE title = 'Llista de conflictes armats' ); |
[INST] Here is a database schema:
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
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 foll... | 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:
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
Please write m... | 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:
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
Please write me a SQL statement that answers the following question: Which Wikipedia page number does the Catalan language's name, Acampada,... | SELECT page FROM pages WHERE title = 'Acampada'; |
[INST] Here is a database schema:
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ 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:
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: How many times did the word number 8 appear? [/INST] [/INST] | SELECT occurrences FROM words WHERE wid = 8; |
[INST] Here is a database schema:
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
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] [/INST] | SELECT word, wid FROM words ORDER BY occurrences DESC LIMIT 3; |
[INST] Here is a database schema:
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? [/I... | SELECT occurrences FROM biwords WHERE w1st = 1 AND w2nd = 25; |
[INST] Here is a database schema:
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
Please write me a SQL statement that answers the following question: What number of words are there on revision page 27457362? [/INST] [/INS... | SELECT words FROM pages WHERE revision = 27457362; |
[INST] Here is a database schema:
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = 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 tha... | 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:
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
Please write me a SQL statement that answers the following question: Which Wikipedia page number has the highest number of words in the Cata... | SELECT page FROM pages WHERE words = ( SELECT MAX(words) FROM pages ); |
[INST] Here is a database schema:
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... | 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 ]
Please write me a SQL statement that answers the following question: How many Catalan-language Wikipedia pages are there overall? [/INST] [/INST] | SELECT pages FROM langs WHERE lang = 'ca'; |
[INST] Here is a database schema:
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
Please write me a SQL statement that answers the following question: Please list any three Wikipedia pages that are written in Catalan, toge... | 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 ]
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 sta... | 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:
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 ]
Please write me a SQL statement that answers the following question: How many times d... | 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:
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
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] [/INST] | SELECT word FROM words WHERE wid = 8968; |
[INST] Here is a database schema:
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 ]
Please write me a SQL statement that answers the following question: Which word has t... | 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:
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
pages_words :
pid [ INTEGER ] pages_words.pid = pages.pid
wid [ INTEGER ] pages_words.wid = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: How many times o... | 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:
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 ]
P... | 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 ]
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = words.wid
occurrences [ INTEGER ]
Please write me a SQL statement that answers the followin... | 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 ]
Please write me a SQL statement that a... | 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:
words :
wid [ INTEGER ] primary_key
word [ TEXT ]
occurrences [ INTEGER ]
Please write me a SQL statement that answers the following question: How many times the word "desena" occurs? [/INST] [/INST] | SELECT occurrences FROM words WHERE word = 'desena'; |
[INST] Here is a database schema:
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? [... | 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 ]
Please write me a SQL statement that answers the following question: List out the total pages of Wikipedia in Catalan language. [/INST] [/INST] | SELECT pages FROM langs; |
[INST] Here is a database schema:
langs_words :
lid [ INTEGER ] langs_words.lid = langs.lid
wid [ INTEGER ] langs_words.wid = 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] [/INST] | SELECT COUNT(wid) FROM langs_words WHERE occurrences BETWEEN '2000' AND '5000'; |
[INST] Here is a database schema:
pages :
pid [ INTEGER ] primary_key
lid [ INTEGER ] pages.lid = langs.lid
page [ INTEGER ]
revision [ INTEGER ]
title [ TEXT ]
words [ INTEGER ]
Please write me a SQL statement that answers the following question: List out the title of Catalan language Wikipedia page that has wikipedi... | SELECT title FROM pages WHERE revision = 106601; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.