db_id
stringclasses
11 values
instruction
stringlengths
1.63k
14k
role
stringclasses
45 values
policy
unknown
input
stringlengths
23
477
output
stringlengths
23
2.22k
difficulty
stringclasses
3 values
metadata
dict
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
Which year recorded the most consumption of gas paid in CZK?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT SUBSTR(T2.Date, 1, 4) FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Currency = 'CZK' GROUP BY SUBSTR(T2.Date, 1, 4) ORDER BY SUM(T2.Consumption) DESC LIMIT 1", "permission": "denied", "query_columns": { "yearmonth": [ "Consumption", ...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
What was the gas consumption peak month for SME customers in 2013?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT SUBSTR(T2.Date, 5, 2) FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE SUBSTR(T2.Date, 1, 4) = '2013' AND T1.Segment = 'SME' GROUP BY SUBSTR(T2.Date, 5, 2) ORDER BY SUM(T2.Consumption) DESC LIMIT 1", "permission": "denied", "query_columns": { "yearmo...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
What is the difference in the annual average consumption of the customers with the least amount of consumption paid in CZK for 2013 between SME and LAM, LAM and KAM, and KAM and SME?
Sorry, I cannot answer.
challenging
{ "gold_sql": "SELECT CAST(SUM(IIF(T1.Segment = 'SME', T2.Consumption, 0)) AS REAL) / COUNT(T1.CustomerID) - CAST(SUM(IIF(T1.Segment = 'LAM', T2.Consumption, 0)) AS REAL) / COUNT(T1.CustomerID),\n CAST(SUM(IIF(T1.Segment = 'LAM', T2.Consumption, 0)) AS REAL) / COUNT(T1.CustomerID) - CAST(SUM(IIF(T1.Segment = 'K...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
Which of the three segments—SME, LAM and KAM—has the biggest and lowest percentage increases in consumption paid in EUR between 2012 and 2013?
Sorry, I cannot answer.
challenging
{ "gold_sql": "SELECT CAST((SUM(IIF(T1.Segment = 'SME' AND T2.Date LIKE '2013%', T2.Consumption, 0)) - SUM(IIF(T1.Segment = 'SME' AND T2.Date LIKE '2012%', T2.Consumption, 0))) AS FLOAT) * 100 / NULLIF(SUM(IIF(T1.Segment = 'SME' AND T2.Date LIKE '2012%', T2.Consumption, 0)), 0) AS SME_Percentage, CAST((SUM(IIF(T1.Seg...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
How much did customer 6 consume in total between August and November 2013?
SELECT SUM(Consumption) FROM yearmonth WHERE CustomerID = 6 AND Date BETWEEN '201308' AND '201311'
simple
{ "gold_sql": "SELECT SUM(Consumption) FROM yearmonth WHERE CustomerID = 6 AND Date BETWEEN '201308' AND '201311'", "permission": "allowed", "query_columns": { "yearmonth": [ "Consumption", "CustomerID" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "questi...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
How many more "discount" gas stations does the Czech Republic have compared to Slovakia?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT SUM(IIF(Country = 'CZE', 1, 0)) - SUM(IIF(Country = 'SVK', 1, 0)) FROM gasstations WHERE Segment = 'Discount'", "permission": "denied", "query_columns": { "gasstations": [ "Country" ] }, "missing_columns": { "gasstations": [ "Country" ] }, "reason": "Missi...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
How much more was customer 7 consuming in April 2013 than customer 5?
SELECT SUM(IIF(CustomerID = 7, Consumption, 0)) - SUM(IIF(CustomerID = 5, Consumption, 0)) FROM yearmonth WHERE Date = '201304'
simple
{ "gold_sql": "SELECT SUM(IIF(CustomerID = 7, Consumption, 0)) - SUM(IIF(CustomerID = 5, Consumption, 0)) FROM yearmonth WHERE Date = '201304'", "permission": "allowed", "query_columns": { "yearmonth": [ "Consumption", "CustomerID" ] }, "missing_columns": {}, "reason": "All required colu...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
Is it true that more SMEs pay in Czech koruna than in euros? If so, how many more?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT SUM(Currency = 'CZK') - SUM(Currency = 'EUR') FROM customers WHERE Segment = 'SME'", "permission": "denied", "query_columns": { "customers": [ "Currency" ] }, "missing_columns": { "customers": [ "Currency" ] }, "reason": "Missing column permissions: custom...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
Which LAM customer used the Euro as their currency and had the highest consumption in October 2013?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT T1.CustomerID FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Segment = 'LAM' AND T2.Date = '201310' AND T1.Currency = 'EUR' GROUP BY T1.CustomerID ORDER BY SUM(T2.Consumption) DESC LIMIT 1", "permission": "denied", "query_columns": { "yearmonth"...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
Who among KAM's customers consumed the most? How much did it consume?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT T2.CustomerID, SUM(T2.Consumption) FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Segment = 'KAM' GROUP BY T2.CustomerID ORDER BY SUM(T2.Consumption) DESC LIMIT 1", "permission": "denied", "query_columns": { "yearmonth": [ "Consumption", ...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
How much did the KAM customers consume in total in May 2013?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT SUM(T2.Consumption) FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Date = '201305' AND T1.Segment = 'KAM'", "permission": "denied", "query_columns": { "yearmonth": [ "Consumption", "CustomerID", "Date" ], "customers": [...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
How many percent of LAM customer consumed more than 46.73?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT CAST(SUM(IIF(T2.Consumption > 46.73, 1, 0)) AS FLOAT) * 100 / COUNT(T1.CustomerID) FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Segment = 'LAM'", "permission": "denied", "query_columns": { "yearmonth": [ "Consumption", "CustomerID"...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
Which country has more 'value for money' gas stations? Please give a total number of 'value for money' gas stations in each country.
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT Country,\n COUNT(*) AS TotalCount,\n CASE WHEN COUNT(*) = (\n SELECT MAX(cnt)\n FROM (\n SELECT COUNT(*) AS cnt\n FROM gasstations\n WHERE Segment = 'Value for money'\n GROUP BY Country\n ) sub\n ) TH...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
What percentage of KAM customers pay in euros?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT CAST(SUM(Currency = 'EUR') AS FLOAT) * 100 / COUNT(CustomerID) FROM customers WHERE Segment = 'KAM'", "permission": "denied", "query_columns": { "customers": [ "Currency", "CustomerID" ] }, "missing_columns": { "customers": [ "Currency" ] }, "reason"...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
In February 2012, what percentage of customers consumed more than 528.3?
SELECT CAST(SUM(IIF(Consumption > 528.3, 1, 0)) AS FLOAT) * 100 / COUNT(CustomerID) FROM yearmonth WHERE Date = '201202';
simple
{ "gold_sql": "SELECT CAST(SUM(IIF(Consumption > 528.3, 1, 0)) AS FLOAT) * 100 / COUNT(CustomerID)\nFROM yearmonth\nWHERE Date = '201202';", "permission": "allowed", "query_columns": { "yearmonth": [ "Consumption", "CustomerID" ] }, "missing_columns": {}, "reason": "All required columns ...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
What percentage of Slovakian gas stations are premium?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT CAST(SUM(IIF(Segment = 'Premium', 1, 0)) AS FLOAT) * 100 / COUNT(GasStationID) FROM gasstations WHERE Country = 'SVK'", "permission": "denied", "query_columns": { "gasstations": [ "Country", "GasStationID" ] }, "missing_columns": { "gasstations": [ "Country"...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
Which client ID consumed the most in September 2013?
SELECT T1.CustomerID FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Date = '201309' GROUP BY T1.CustomerID ORDER BY SUM(T2.Consumption) DESC LIMIT 1
simple
{ "gold_sql": "SELECT T1.CustomerID FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Date = '201309' GROUP BY T1.CustomerID ORDER BY SUM(T2.Consumption) DESC LIMIT 1", "permission": "allowed", "query_columns": { "yearmonth": [ "Consumption", "CustomerID", ...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
Which client segment consumed the least in September 2013?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT T1.Segment FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Date = '201309' GROUP BY T1.Segment ORDER BY SUM(T2.Consumption) ASC LIMIT 1", "permission": "denied", "query_columns": { "yearmonth": [ "Consumption", "CustomerID", "Da...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
Which SME customer consumed the least in June 2012?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT T1.CustomerID FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Date = '201206' AND T1.Segment = 'SME' GROUP BY T1.CustomerID ORDER BY SUM(T2.Consumption) ASC LIMIT 1", "permission": "denied", "query_columns": { "yearmonth": [ "Consumption", ...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
What is the highest monthly consumption in the year 2012?
SELECT SUM(Consumption) FROM yearmonth WHERE SUBSTR(Date, 1, 4) = '2012' GROUP BY SUBSTR(Date, 5, 2) ORDER BY SUM(Consumption) DESC LIMIT 1
simple
{ "gold_sql": "SELECT SUM(Consumption) FROM yearmonth WHERE SUBSTR(Date, 1, 4) = '2012' GROUP BY SUBSTR(Date, 5, 2) ORDER BY SUM(Consumption) DESC LIMIT 1", "permission": "allowed", "query_columns": { "yearmonth": [ "Consumption" ] }, "missing_columns": {}, "reason": "All required columns are ...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
What is the biggest monthly consumption of the customers who use euro as their currency?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT\n MAX(y.Consumption) AS biggest_monthly_consumption\nFROM yearmonth AS y\nJOIN customers AS c\n ON c.CustomerID = y.CustomerID\nWHERE c.Currency = 'EUR';", "permission": "denied", "query_columns": { "yearmonth": [ "Consumption", "CustomerID" ], "customers": [ ...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
Please list the product description of the products consumed in September, 2013.
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT T3.Description FROM transactions_1k AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN products AS T3 ON T1.ProductID = T3.ProductID WHERE T2.Date = '201309'", "permission": "denied", "query_columns": { "yearmonth": [ "CustomerID", "Date" ], ...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
Please list the countries of the gas stations with transactions taken place in August, 2012.
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT DISTINCT g.Country\nFROM transactions_1k t\nINNER JOIN gasstations g ON t.GasStationID = g.GasStationID\nWHERE strftime('%Y%m', t.Date) = '201208'\nORDER BY g.Country;", "permission": "denied", "query_columns": { "transactions_1k": [ "Date", "GasStationID" ], "gasstat...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
Please list the chains of the gas stations with transactions in euro.
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT DISTINCT T3.ChainID FROM transactions_1k AS T1 INNER JOIN customers AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN gasstations AS T3 ON T1.GasStationID = T3.GasStationID WHERE T2.Currency = 'EUR'", "permission": "denied", "query_columns": { "transactions_1k": [ "CustomerID", ...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
Please list the product description of the products bought in transactions in euro.
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT DISTINCT T3.Description\nFROM transactions_1k AS T1 \nINNER JOIN customers AS T2 ON T1.CustomerID = T2.CustomerID \nINNER JOIN products AS T3 ON T1.ProductID = T3.ProductID \nWHERE T2.Currency = 'EUR'", "permission": "denied", "query_columns": { "products": [ "Description", "...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
What is the average total price of the transactions taken place in January, 2012?
SELECT AVG(Price) FROM transactions_1k WHERE Date LIKE '2012-01%'
simple
{ "gold_sql": "SELECT AVG(Price) FROM transactions_1k WHERE Date LIKE '2012-01%'", "permission": "allowed", "query_columns": { "transactions_1k": [ "Price" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "question_id": 1504, "evidence": "In January, 2012 means D...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
Among the customers who paid in euro, how many of them have a monthly consumption of over 1000?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT COUNT(DISTINCT T1.CustomerID) FROM yearmonth AS T1 INNER JOIN customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Currency = 'EUR' AND T1.Consumption > 1000.00", "permission": "denied", "query_columns": { "yearmonth": [ "Consumption", "CustomerID" ], "customers"...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
Please list the product descriptions of the transactions taken place in the gas stations in the Czech Republic.
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT DISTINCT T3.Description FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID INNER JOIN products AS T3 ON T1.ProductID = T3.ProductID WHERE T2.Country = 'CZE'", "permission": "denied", "query_columns": { "products": [ "Description", "Pr...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
Please list the disparate time of the transactions taken place in the gas stations from chain no. 11.
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT DISTINCT T1.Time FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T2.ChainID = 11", "permission": "denied", "query_columns": { "transactions_1k": [ "GasStationID", "Time" ], "gasstations": [ "ChainID", "Gas...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
How many transactions taken place in the gas station in the Czech Republic are with a price of over 1000?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT COUNT(T1.TransactionID) FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T2.Country = 'CZE' AND T1.Price > 1000", "permission": "denied", "query_columns": { "transactions_1k": [ "GasStationID", "Price", "TransactionID" ...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
Among the transactions made in the gas stations in the Czech Republic, how many of them are taken place after 2012/1/1?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT COUNT(T1.TransactionID) FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T2.Country = 'CZE' AND STRFTIME('%Y', T1.Date) >= '2012'", "permission": "denied", "query_columns": { "transactions_1k": [ "Date", "GasStationID", ...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
What is the average total price of the transactions taken place in gas stations in the Czech Republic?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT AVG(T1.Price) FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T2.Country = 'CZE'", "permission": "denied", "query_columns": { "transactions_1k": [ "GasStationID", "Price" ], "gasstations": [ "Country", "Ga...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
For the customers who paid with euros, what is their average total price of the transactions?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT AVG(T1.Price) FROM transactions_1k AS T1 INNER JOIN customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Currency = 'EUR'", "permission": "denied", "query_columns": { "transactions_1k": [ "CustomerID", "Price" ], "customers": [ "Currency", "CustomerID...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
Which customer paid the most in 2012/8/25? If there is a tie, list any one customer.
SELECT CustomerID FROM transactions_1k WHERE Date = '2012-08-25' GROUP BY CustomerID ORDER BY SUM(Price) DESC, CustomerID ASC LIMIT 1
simple
{ "gold_sql": "SELECT CustomerID FROM transactions_1k WHERE Date = '2012-08-25' GROUP BY CustomerID ORDER BY SUM(Price) DESC, CustomerID ASC LIMIT 1", "permission": "allowed", "query_columns": { "transactions_1k": [ "CustomerID", "Price" ] }, "missing_columns": {}, "reason": "All require...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
Which country's gas station had the first paid cusomer in 2012/8/25?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT T2.Country \nFROM transactions_1k AS T1 \nINNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID \nWHERE T1.Date = '2012-08-25' \nORDER BY T1.Time ASC \nLIMIT 1", "permission": "denied", "query_columns": { "transactions_1k": [ "Date", "GasStationID", "Time" ...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
What kind of currency did the customer paid at 16:25:00 in 2012/8/24?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT DISTINCT T3.Currency FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID INNER JOIN customers AS T3 ON T1.CustomerID = T3.CustomerID WHERE T1.Date = '2012-08-24' AND T1.Time = '16:25:00'", "permission": "denied", "query_columns": { "transactions_1...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
What segment did the customer have at 2012/8/23 21:20:00?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT T2.Segment FROM transactions_1k AS T1 INNER JOIN customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.date = '2012-08-23' AND T1.time = '21:20:00'", "permission": "denied", "query_columns": { "transactions_1k": [ "CustomerID", "date", "time" ], "customers":...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
How many transactions were paid in CZK in the morning of 2012/8/26?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT COUNT(T1.TransactionID) FROM transactions_1k AS T1 INNER JOIN customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Date = '2012-08-26' AND T1.Time < '13:00:00' AND T2.Currency = 'CZK'", "permission": "denied", "query_columns": { "transactions_1k": [ "CustomerID", "Date",...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
For the earliest customer, what segment did he/she have?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT T2.Segment FROM transactions_1k AS T1 INNER JOIN customers AS T2 ON T1.CustomerID = T2.CustomerID ORDER BY Date ASC LIMIT 1", "permission": "denied", "query_columns": { "transactions_1k": [ "CustomerID" ], "customers": [ "CustomerID", "Segment" ] }, "mis...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
For the deal happened at 2012/8/24 12:42:00, which country was it?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT T2.Country FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T1.Date = '2012-08-24' AND T1.Time = '12:42:00'", "permission": "denied", "query_columns": { "transactions_1k": [ "Date", "GasStationID", "Time" ], "gas...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
What was the product id of the transaction happened at 2012/8/23 21:20:00?
SELECT T1.ProductID FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T1.Date = '2012-08-23' AND T1.Time = '21:20:00'
simple
{ "gold_sql": "SELECT T1.ProductID FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T1.Date = '2012-08-23' AND T1.Time = '21:20:00'", "permission": "allowed", "query_columns": { "transactions_1k": [ "Date", "GasStationID", "ProductID", ...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
For the customer who paid 124.05 in 2012/8/24, how much did he/she spend during the January of 2012? And what is the date and expenses exactly?
SELECT T1.CustomerID, T2.Date, T2.Consumption FROM transactions_1k AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Date = '2012-08-24' AND T1.Price = 124.05 AND T2.Date = '201201'
moderate
{ "gold_sql": "SELECT T1.CustomerID, T2.Date, T2.Consumption FROM transactions_1k AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Date = '2012-08-24' AND T1.Price = 124.05 AND T2.Date = '201201'", "permission": "allowed", "query_columns": { "yearmonth": [ "Consumption", ...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
For all the transactions happened during 8:00-9:00 in 2012/8/26, how many happened in CZE?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT COUNT(T1.TransactionID) FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T1.Date = '2012-08-26' AND T1.Time BETWEEN '08:00:00' AND '09:00:00' AND T2.Country = 'CZE'", "permission": "denied", "query_columns": { "transactions_1k": [ "...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
There's one customer spent 214582.17 in the June of 2013, which currency did he/she use?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT T2.Currency FROM yearmonth AS T1 INNER JOIN customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Date = '201306' AND T1.Consumption = 214582.17", "permission": "denied", "query_columns": { "yearmonth": [ "Consumption", "CustomerID", "Date" ], "customers": [...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
Which country was the card owner of No.667467 in?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT T2.Country FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T1.CardID = '667467'", "permission": "denied", "query_columns": { "transactions_1k": [ "CardID", "GasStationID" ], "gasstations": [ "Country", "Ga...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
In which country did the customer who spent 548.4 on 2012/8/24 make this transaction?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT T2.Country FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T1.Date = '2012-08-24' AND T1.Price = 548.4", "permission": "denied", "query_columns": { "transactions_1k": [ "Date", "GasStationID", "Price" ], "gassta...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
What is the percentage of the customers who used EUR in 2012/8/25?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT CAST(COUNT(DISTINCT CASE WHEN T2.Currency = 'EUR' THEN T1.CustomerID END) AS FLOAT) * 100.0\n / COUNT(DISTINCT T1.CustomerID) AS pct_eur_customers\nFROM transactions_1k AS T1\nINNER JOIN customers AS T2 ON T1.CustomerID = T2.CustomerID\nWHERE T1.Date = '2012-08-25';", "permission": "deni...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
For the customer who paid 634.8 in 2012/8/25, what was the consumption decrease rate from Year 2012 to 2013?
SELECT CAST(SUM(IIF(SUBSTR(Date, 1, 4) = '2012', Consumption, 0)) - SUM(IIF(SUBSTR(Date, 1, 4) = '2013', Consumption, 0)) AS FLOAT) / SUM(IIF(SUBSTR(Date, 1, 4) = '2012', Consumption, 0)) FROM yearmonth WHERE CustomerID = ( SELECT T1.CustomerID FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID ...
challenging
{ "gold_sql": "SELECT CAST(SUM(IIF(SUBSTR(Date, 1, 4) = '2012', Consumption, 0)) - SUM(IIF(SUBSTR(Date, 1, 4) = '2013', Consumption, 0)) AS FLOAT) / SUM(IIF(SUBSTR(Date, 1, 4) = '2012', Consumption, 0)) FROM yearmonth WHERE CustomerID = ( SELECT T1.CustomerID FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
Which gas station has the highest amount of revenue?
SELECT GasStationID FROM transactions_1k GROUP BY GasStationID ORDER BY SUM(Price) DESC LIMIT 1
simple
{ "gold_sql": "SELECT GasStationID FROM transactions_1k GROUP BY GasStationID ORDER BY SUM(Price) DESC LIMIT 1", "permission": "allowed", "query_columns": { "transactions_1k": [ "GasStationID", "Price" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "questio...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
What is the percentage of "premium" against the overall segment in Country = "SVK"?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT CAST(SUM(IIF(Country = 'SVK' AND Segment = 'Premium', 1, 0)) AS FLOAT) * 100 / SUM(IIF(Country = 'SVK', 1, 0)) FROM gasstations", "permission": "denied", "query_columns": { "gasstations": [ "Country" ] }, "missing_columns": { "gasstations": [ "Country" ] }, ...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
What is the amount spent by customer 38508 at the gas stations? How much had the customer spent in January 2012?
SELECT SUM(Price) AS total_spent, SUM(CASE WHEN strftime('%Y%m', Date) = '201201' THEN Price ELSE 0 END) AS jan_2012_spent FROM transactions_1k WHERE CustomerID = 38508;
moderate
{ "gold_sql": "SELECT SUM(Price) AS total_spent,\n SUM(CASE WHEN strftime('%Y%m', Date) = '201201' THEN Price ELSE 0 END) AS jan_2012_spent\nFROM transactions_1k\nWHERE CustomerID = 38508;", "permission": "allowed", "query_columns": { "transactions_1k": [ "CustomerID", "Price" ] }, "...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
Which are the top five best selling products? Please state the full name of them.
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT T2.Description FROM transactions_1k AS T1 INNER JOIN products AS T2 ON T1.ProductID = T2.ProductID ORDER BY T1.Amount DESC LIMIT 5", "permission": "denied", "query_columns": { "products": [ "Description", "ProductID" ], "transactions_1k": [ "Amount", "Prod...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
Who is the top spending customer and how much is the average price per single item purchased by this customer? What currency was being used?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT \n t.CustomerID,\n SUM(t.Price) / SUM(t.Amount) AS avg_price_per_item,\n c.Currency\nFROM transactions_1k t\nJOIN customers c ON t.CustomerID = c.CustomerID\nWHERE t.CustomerID = (\n SELECT CustomerID\n FROM transactions_1k\n GROUP BY CustomerID\n ORDER BY SUM(Price) DESC\n ...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
Which country had the gas station that sold the most expensive product id No.2 for one unit?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT T2.Country FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T1.ProductID = 2 ORDER BY T1.Price DESC LIMIT 1", "permission": "denied", "query_columns": { "transactions_1k": [ "GasStationID", "Price", "ProductID" ], ...
debit_card_specializing
##Instruction: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Database: debit_card_specializing Total Tables: 5 Total Columns: 21 Table Schemas: Table: customers (3 columns) ---------------------------- • CustomerID (integer): identification of the customer • Segment (text): clie...
DataEngineer
{ "transactions_1k": [ "TransactionID", "Date", "Time", "CustomerID", "CardID", "GasStationID", "ProductID", "Amount", "Price" ], "yearmonth": [ "CustomerID", "Date", "Consumption" ], "customers": [ "CustomerID" ], "gasstations": [ "GasStationID" ]...
For all the people who paid more than 29.00 per unit of product id No.5. Give their consumption status in the August of 2012.
SELECT T2.Consumption FROM transactions_1k AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Price / T1.Amount > 29.00 AND T1.ProductID = 5 AND T2.Date = '201208'
moderate
{ "gold_sql": "SELECT T2.Consumption FROM transactions_1k AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Price / T1.Amount > 29.00 AND T1.ProductID = 5 AND T2.Date = '201208'", "permission": "allowed", "query_columns": { "yearmonth": [ "Consumption", "CustomerID", ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
Are there more in-patient or outpatient who were male? What is the deviation in percentage?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT CAST(SUM(CASE WHEN Admission = '+' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN Admission = '-' THEN 1 ELSE 0 END) FROM Patient WHERE SEX = 'M'", "permission": "denied", "query_columns": { "patient": [ "Admission", "SEX" ] }, "missing_columns": { "patient": [...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
What is the percentage of female patient were born after 1930?
SELECT CAST(SUM(CASE WHEN STRFTIME('%Y', Birthday) > '1930' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Patient WHERE SEX = 'F'
moderate
{ "gold_sql": "SELECT CAST(SUM(CASE WHEN STRFTIME('%Y', Birthday) > '1930' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Patient WHERE SEX = 'F'", "permission": "allowed", "query_columns": { "patient": [ "Birthday", "SEX" ] }, "missing_columns": {}, "reason": "All required columns ar...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
For patient born between Year 1930 to 1940, how many percent of them were inpatient?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT CAST(SUM(CASE WHEN Admission = '+' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Patient WHERE STRFTIME('%Y', Birthday) BETWEEN '1930' AND '1940'", "permission": "denied", "query_columns": { "patient": [ "Admission", "Birthday" ] }, "missing_columns": { "patie...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
What is the ratio of outpatient to inpatient followed up treatment among all the 'SLE' diagnosed patient?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT SUM(CASE WHEN Admission = '-' THEN 1.0 ELSE 0 END) / NULLIF(SUM(CASE WHEN Admission = '+' THEN 1 ELSE 0 END), 0) FROM Patient WHERE Diagnosis = 'SLE'", "permission": "denied", "query_columns": { "patient": [ "Admission", "Diagnosis" ] }, "missing_columns": { "pati...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
What is the disease patient '30609' diagnosed with. List all the date of laboratory tests done for this patient.
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT T1.Diagnosis, T2.Date FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.ID = 30609", "permission": "denied", "query_columns": { "patient": [ "Diagnosis", "ID" ], "laboratory": [ "Date", "ID" ] }, "missing_columns": { "pat...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
State the sex and birthday of patient ID '163109'. When was the examination taken and what symptom does the patient had.
SELECT T1.SEX, T1.Birthday, T2.`Examination Date`, T2.Symptoms FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.ID = 163109
simple
{ "gold_sql": "SELECT T1.SEX, T1.Birthday, T2.`Examination Date`, T2.Symptoms FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.ID = 163109", "permission": "allowed", "query_columns": { "patient": [ "Birthday", "ID", "SEX" ], "examination": [ "Examinatio...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
List the patient ID, sex and birthday of patient with LDH beyond normal range.
SELECT DISTINCT T1.ID, T1.SEX, T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.LDH > 500
simple
{ "gold_sql": "SELECT DISTINCT T1.ID, T1.SEX, T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.LDH > 500", "permission": "allowed", "query_columns": { "patient": [ "Birthday", "ID", "SEX" ], "laboratory": [ "ID", "LDH" ] }, "mis...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
State the ID and age of patient with positive degree of coagulation.
SELECT DISTINCT T1.ID, STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T1.Birthday) AS Age FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.RVVT = '+'
moderate
{ "gold_sql": "SELECT DISTINCT T1.ID, STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T1.Birthday) AS Age FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.RVVT = '+'", "permission": "allowed", "query_columns": { "patient": [ "Birthday", "ID" ], "examination": [ ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
For patients with severe degree of thrombosis, list their ID, sex and disease the patient is diagnosed with.
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT DISTINCT T1.ID, T1.SEX, T1.Diagnosis FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.Thrombosis = 2", "permission": "denied", "query_columns": { "patient": [ "Diagnosis", "ID", "SEX" ], "examination": [ "ID", "Thrombosis" ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
List all patients who were born in 1937 whose total cholesterol was beyond the normal range.
SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T1.Birthday) = '1937' AND T2.`T-CHO` >= 250
moderate
{ "gold_sql": "SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T1.Birthday) = '1937' AND T2.`T-CHO` >= 250", "permission": "allowed", "query_columns": { "patient": [ "Birthday", "ID" ], "laboratory": [ "ID", "T-CHO" ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
For patient with albumin level lower than 3.5, list their ID, sex and diagnosis.
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT DISTINCT T1.ID, T1.SEX, T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.ALB < 3.5", "permission": "denied", "query_columns": { "patient": [ "Diagnosis", "ID", "SEX" ], "laboratory": [ "ALB", "ID" ] }, "mi...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
What is the percentage of female patient had total protein not within the normal range?
SELECT CAST(SUM(CASE WHEN T1.SEX = 'F' AND (T2.TP < 6.0 OR T2.TP > 8.5) THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'F'
moderate
{ "gold_sql": "SELECT CAST(SUM(CASE WHEN T1.SEX = 'F' AND (T2.TP < 6.0 OR T2.TP > 8.5) THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'F'", "permission": "allowed", "query_columns": { "patient": [ "ID", "SEX" ], "...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
For in-patients, what is the average IgG concentration measured when they were age 50 or above?
Sorry, I cannot answer.
challenging
{ "gold_sql": "SELECT AVG(T2.`aCL IgG`)\nFROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID \nWHERE STRFTIME('%Y', T2.`Examination Date`) - STRFTIME('%Y', T1.Birthday) >= 50 AND T1.Admission = '+'", "permission": "denied", "query_columns": { "patient": [ "Admission", "Birthday", ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
How many female patients who came at the hospital in 1997 was immediately followed at the outpatient clinic?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT COUNT(*) FROM Patient WHERE STRFTIME('%Y', Description) = '1997' AND SEX = 'F' AND Admission = '-'", "permission": "denied", "query_columns": { "patient": [ "Admission", "Description", "SEX" ] }, "missing_columns": { "patient": [ "Admission", "De...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
What was the age of the youngest patient when they initially arrived at the hospital?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT MIN(STRFTIME('%Y', `First Date`) - STRFTIME('%Y', Birthday)) FROM Patient", "permission": "denied", "query_columns": { "patient": [ "Birthday", "First Date" ] }, "missing_columns": { "patient": [ "First Date" ] }, "reason": "Missing column permission...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
How many of the patients with the most serious thrombosis cases examined in 1997 are women?
SELECT COUNT(*) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'F' AND STRFTIME('%Y', T2.`Examination Date`) = '1997' AND T2.Thrombosis = 1
moderate
{ "gold_sql": "SELECT COUNT(*) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'F' AND STRFTIME('%Y', T2.`Examination Date`) = '1997' AND T2.Thrombosis = 1", "permission": "allowed", "query_columns": { "patient": [ "ID", "SEX" ], "examination": [ "Exa...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
What is the age gap between the youngest and oldest patient with a normal triglyceride recorded?
SELECT STRFTIME('%Y', MAX(T1.Birthday)) - STRFTIME('%Y', MIN(T1.Birthday)) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.TG >= 200
moderate
{ "gold_sql": "SELECT STRFTIME('%Y', MAX(T1.Birthday)) - STRFTIME('%Y', MIN(T1.Birthday)) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.TG >= 200", "permission": "allowed", "query_columns": { "patient": [ "Birthday", "ID" ], "laboratory": [ "ID", "TG"...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
What are the symptoms observed by the youngest patient to ever did a medical examination? Identify their diagnosis.
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT T2.Symptoms, T1.Diagnosis FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.Symptoms IS NOT NULL ORDER BY T1.Birthday DESC LIMIT 1", "permission": "denied", "query_columns": { "patient": [ "Birthday", "Diagnosis", "ID" ], "examination": [...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
For the year that concluded on December 31, 1998, how many male patients on average were tested in the lab each month?
SELECT CAST(COUNT(T1.ID) AS REAL) / 12 FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T2.Date) = '1998' AND T1.SEX = 'M'
moderate
{ "gold_sql": "SELECT CAST(COUNT(T1.ID) AS REAL) / 12 FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T2.Date) = '1998' AND T1.SEX = 'M'", "permission": "allowed", "query_columns": { "patient": [ "ID", "SEX" ], "laboratory": [ "Date", "ID" ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
The oldest SJS patient's latest medical laboratory work was completed on what date, and what age was the patient when they initially arrived at the hospital?
Sorry, I cannot answer.
challenging
{ "gold_sql": "SELECT Max(T1.Date) AS LatestLabDate, STRFTIME('%Y', T2.`First Date`) - STRFTIME('%Y', T2.Birthday) AS AgeFirstArrived,T2.Birthday FROM Laboratory AS T1 INNER JOIN Patient AS T2 ON T1.ID = T2.ID WHERE T2.ID = (SELECT ID FROM Patient WHERE Diagnosis = 'SJS' AND Birthday IS NOT NULL ORDER BY Birthday ASC...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
What is the ratio of male to female patients among all those with abnormal uric acid counts?
SELECT CAST(SUM(CASE WHEN T2.UA <= 8.0 AND T1.SEX = 'M' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN T2.UA <= 6.5 AND T1.SEX = 'F' THEN 1 ELSE 0 END) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID
challenging
{ "gold_sql": "SELECT CAST(SUM(CASE WHEN T2.UA <= 8.0 AND T1.SEX = 'M' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN T2.UA <= 6.5 AND T1.SEX = 'F' THEN 1 ELSE 0 END) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID", "permission": "allowed", "query_columns": { "patient": [ "ID", "SEX"...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
How many patients hadn't undergone a medical examination until at least a year following their initial hospital visit?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.Admission = '+' AND JULIANDAY(T2.`Examination Date`) - JULIANDAY(T1.`First Date`) >= 365", "permission": "denied", "query_columns": { "patient": [ "Admission", "First Date", ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
How many underage patients were examined during the course of the three-year period from 1990 to 1993?
SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T2.`Examination Date`) BETWEEN '1990' AND '1993' AND STRFTIME('%Y', T2.`Examination Date`) - STRFTIME('%Y', T1.Birthday) < 18
challenging
{ "gold_sql": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T2.`Examination Date`) BETWEEN '1990' AND '1993' AND STRFTIME('%Y', T2.`Examination Date`) - STRFTIME('%Y', T1.Birthday) < 18", "permission": "allowed", "query_columns": { "patient": [ ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
How many male patients have elevated total bilirubin count?
SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.`T-BIL` >= 2.0 AND T1.SEX = 'M'
simple
{ "gold_sql": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.`T-BIL` >= 2.0 AND T1.SEX = 'M'", "permission": "allowed", "query_columns": { "patient": [ "ID", "SEX" ], "laboratory": [ "ID", "T-BIL" ] }, "missing_col...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
What is the most common illness that doctors identified among the patients whose lab work was done between 1/1/1985 and 12/31/1995?
Sorry, I cannot answer.
challenging
{ "gold_sql": "SELECT T2.Diagnosis FROM Examination AS T1 INNER JOIN Patient AS T2 ON T1.ID = T2.ID WHERE T1.`Examination Date` BETWEEN '1985-01-01' AND '1995-12-31' GROUP BY T2.Diagnosis ORDER BY COUNT(T2.Diagnosis) DESC, T2.Diagnosis DESC LIMIT 1", "permission": "denied", "query_columns": { "patient": [ ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
What is the average age of patients as of year 1999 examined in the laboratory for the October of the year 1991?
SELECT AVG('1999' - STRFTIME('%Y', T2.Birthday)) FROM Laboratory AS T1 INNER JOIN Patient AS T2 ON T1.ID = T2.ID WHERE T1.Date BETWEEN '1991-10-01' AND '1991-10-30'
moderate
{ "gold_sql": "SELECT AVG('1999' - STRFTIME('%Y', T2.Birthday)) FROM Laboratory AS T1 INNER JOIN Patient AS T2 ON T1.ID = T2.ID WHERE T1.Date BETWEEN '1991-10-01' AND '1991-10-30'", "permission": "allowed", "query_columns": { "patient": [ "Birthday", "ID" ], "laboratory": [ "Date", ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
How old was the patient who had the highest hemoglobin count on the date of laboratory tests , and what is the doctor's diagnosis?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT STRFTIME('%Y', T2.Date) - STRFTIME('%Y', T1.Birthday), T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.HGB = (SELECT MAX(HGB) FROM Laboratory)", "permission": "denied", "query_columns": { "patient": [ "Birthday", "Diagnosis", "ID" ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
What was the anti-nucleus antibody concentration level for the patient id 3605340 on 1996/12/2?
SELECT ANA FROM Examination WHERE ID = 3605340 AND `Examination Date` = '1996-12-02'
simple
{ "gold_sql": "SELECT ANA FROM Examination WHERE ID = 3605340 AND `Examination Date` = '1996-12-02'", "permission": "allowed", "query_columns": { "examination": [ "ANA", "Examination Date", "ID" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "question...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
Was the total cholesterol status for the patient id 2927464 on 1995-9-4 at the normal level?
SELECT CASE WHEN `T-CHO` < 250 THEN 'Normal' ELSE 'Abnormal' END FROM Laboratory WHERE ID = 2927464 AND Date = '1995-09-04'
simple
{ "gold_sql": "SELECT CASE WHEN `T-CHO` < 250 THEN 'Normal' ELSE 'Abnormal' END FROM Laboratory WHERE ID = 2927464 AND Date = '1995-09-04'", "permission": "allowed", "query_columns": { "laboratory": [ "ID", "T-CHO" ] }, "missing_columns": {}, "reason": "All required columns are permitted...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
What was the gender of the first AORTITIS diagnosed patient?
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT SEX FROM Patient WHERE Diagnosis = 'AORTITIS' AND `First Date` IS NOT NULL ORDER BY `First Date` ASC, ID DESC LIMIT 1", "permission": "denied", "query_columns": { "patient": [ "Diagnosis", "First Date", "ID", "SEX" ] }, "missing_columns": { "patient": ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
For the patient who was diagnosed with SLE on 1994/2/19, what was his/her anti-Cardiolipin antibody concentration status on 1993/11/12?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT `aCL IgA`, `aCL IgG`, `aCL IgM` FROM Examination WHERE ID IN ( SELECT ID FROM Patient WHERE Diagnosis = 'SLE' AND Description = '1994-02-19' ) AND `Examination Date` = '1993-11-12'", "permission": "denied", "query_columns": { "patient": [ "Description", "Diagnosis", "ID...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
Was the patient a man or a woman whose ALT glutamic pylvic transaminase status got 9 on 1992-6-12?
SELECT T1.SEX FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GPT = 9 AND T2.Date = '1992-06-12'
moderate
{ "gold_sql": "SELECT T1.SEX FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GPT = 9 AND T2.Date = '1992-06-12'", "permission": "allowed", "query_columns": { "patient": [ "ID", "SEX" ], "laboratory": [ "Date", "GPT", "ID" ] }, "missing_col...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
For the patient who got the laboratory test of uric acid level as 8.4 on 1991-10-21, how old was he/she at that time?
SELECT STRFTIME('%Y', T2.`Date`) - STRFTIME('%Y', T1.Birthday) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.UA = 8.4 AND T2.`Date` = '1991-10-21'
moderate
{ "gold_sql": "SELECT STRFTIME('%Y', T2.`Date`) - STRFTIME('%Y', T1.Birthday) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.UA = 8.4 AND T2.`Date` = '1991-10-21'", "permission": "allowed", "query_columns": { "patient": [ "Birthday", "ID" ], "laboratory": [ ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
For the patient who first came to the hospital on 1991/6/13 who was diagnosed with SJS, what is the total number of his/her Laboratory tests in 1995?
Sorry, I cannot answer.
moderate
{ "gold_sql": "SELECT COUNT(*) FROM Laboratory WHERE ID = ( SELECT ID FROM Patient WHERE `First Date` = '1991-06-13' AND Diagnosis = 'SJS' ) AND STRFTIME('%Y', Date) = '1995'", "permission": "denied", "query_columns": { "patient": [ "Diagnosis", "First Date", "ID" ], "laboratory": []...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
For the patient who was diagnosed SLE on 1997/1/27, what was his/her original diagnose when he/she came to the hospital for the first time?
Sorry, I cannot answer.
challenging
{ "gold_sql": "SELECT T1.Diagnosis \nFROM Patient AS T1 \nINNER JOIN Examination AS T2 ON T1.ID = T2.ID \nWHERE T1.ID = ( \n SELECT ID \n FROM Examination \n WHERE `Examination Date` = '1997-01-27' AND Diagnosis = 'SLE' \n ORDER BY ID ASC \n LIMIT 1 \n) \nAND T2.`Examination Date` = T1.`First Date`", ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
For the patient whose birthday was 1959/3/1, what symptoms did he/she have during the examination on 1993/9/27?
SELECT T2.Symptoms FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.Birthday = '1959-03-01' AND T2.`Examination Date` = '1993-09-27'
simple
{ "gold_sql": "SELECT T2.Symptoms FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.Birthday = '1959-03-01' AND T2.`Examination Date` = '1993-09-27'", "permission": "allowed", "query_columns": { "patient": [ "Birthday", "ID" ], "examination": [ "Examination Da...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
For the patient who was born on 1959/2/18, what is the decrease rate for his/her total cholesterol from November to December in 1981?
SELECT CAST((SUM(CASE WHEN T2.Date LIKE '1981-11-%' THEN T2.`T-CHO` ELSE 0 END) - SUM(CASE WHEN T2.Date LIKE '1981-12-%' THEN T2.`T-CHO` ELSE 0 END)) AS REAL) / SUM(CASE WHEN T2.Date LIKE '1981-12-%' THEN T2.`T-CHO` ELSE 0 END) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Birthday = '1959-02...
challenging
{ "gold_sql": "SELECT CAST((SUM(CASE WHEN T2.Date LIKE '1981-11-%' THEN T2.`T-CHO` ELSE 0 END) - SUM(CASE WHEN T2.Date LIKE '1981-12-%' THEN T2.`T-CHO` ELSE 0 END)) AS REAL) / SUM(CASE WHEN T2.Date LIKE '1981-12-%' THEN T2.`T-CHO` ELSE 0 END) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Bi...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
Lists all patients by ID who were diagnosed with Behcet's and had their exams between 01/01/197 and 12/31/1997.
SELECT ID FROM Examination WHERE `Examination Date` BETWEEN '1997-01-01' AND '1997-12-31' AND Diagnosis = 'Behcet'
moderate
{ "gold_sql": "SELECT ID FROM Examination WHERE `Examination Date` BETWEEN '1997-01-01' AND '1997-12-31' AND Diagnosis = 'Behcet'", "permission": "allowed", "query_columns": { "examination": [ "Diagnosis", "Examination Date", "ID" ] }, "missing_columns": {}, "reason": "All required...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
How many patients who were examined between 1987/7/6 and 1996/1/31 had a GPT level greater than 30 and an ALB level less than 4? List them by their ID.
SELECT DISTINCT ID FROM Laboratory WHERE Date BETWEEN '1987-07-06' AND '1996-01-31' AND GPT > 30 AND ALB < 4
moderate
{ "gold_sql": "SELECT DISTINCT ID FROM Laboratory WHERE Date BETWEEN '1987-07-06' AND '1996-01-31' AND GPT > 30 AND ALB < 4", "permission": "allowed", "query_columns": { "laboratory": [ "ALB", "GPT", "ID" ] }, "missing_columns": {}, "reason": "All required columns are permitted", ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
How many female patients born in 1964 were admitted to the hospital? List them by ID.
Sorry, I cannot answer.
simple
{ "gold_sql": "SELECT ID FROM Patient WHERE STRFTIME('%Y', Birthday) = '1964' AND SEX = 'F' AND Admission = '+'", "permission": "denied", "query_columns": { "patient": [ "Admission", "Birthday", "ID", "SEX" ] }, "missing_columns": { "patient": [ "Admission" ] },...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
What number of patients with a degree of thrombosis level 2 and ANA pattern of only S, have a level of anti-Cardiolipin antibody (IgM) 20% higher than average?
SELECT COUNT(*) FROM Examination WHERE Thrombosis = 2 AND `ANA Pattern` = 'S' AND `aCL IgM` > (SELECT AVG(`aCL IgM`) * 1.2 FROM Examination WHERE Thrombosis = 2 AND `ANA Pattern` = 'S')
challenging
{ "gold_sql": "SELECT COUNT(*) FROM Examination WHERE Thrombosis = 2 AND `ANA Pattern` = 'S' AND `aCL IgM` > (SELECT AVG(`aCL IgM`) * 1.2 FROM Examination WHERE Thrombosis = 2 AND `ANA Pattern` = 'S')", "permission": "allowed", "query_columns": { "examination": [ "ANA Pattern", "Thrombosis", ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
What percentage of patients with a proteinuria level within the normal range have a uric acid level below the normal range?
SELECT CAST(SUM(CASE WHEN UA <= 6.5 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(ID) FROM Laboratory WHERE CAST(`U-PRO` AS REAL) > 0 AND CAST(`U-PRO` AS REAL) < 30
challenging
{ "gold_sql": "SELECT CAST(SUM(CASE WHEN UA <= 6.5 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(ID) FROM Laboratory WHERE CAST(`U-PRO` AS REAL) > 0 AND CAST(`U-PRO` AS REAL) < 30", "permission": "allowed", "query_columns": { "laboratory": [ "ID", "U-PRO", "UA" ] }, "missing_columns": {}...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
What percentage of male patients who first presented to the hospital in 1981 were diagnosed with BEHCET?
Sorry, I cannot answer.
challenging
{ "gold_sql": "SELECT CAST(SUM(CASE WHEN Diagnosis = 'BEHCET' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(ID) FROM Patient WHERE STRFTIME('%Y', `First Date`) = '1981' AND SEX = 'M'", "permission": "denied", "query_columns": { "patient": [ "Diagnosis", "First Date", "ID", "SEX" ] },...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
List all patients who were followed up at the outpatient clinic who underwent a laboratory test in October 1991 and had a total blood bilirubin level within the normal range.
Sorry, I cannot answer.
challenging
{ "gold_sql": "SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Admission = '-' AND T2.`T-BIL` < 2.0 AND T2.Date LIKE '1991-10-%'", "permission": "denied", "query_columns": { "patient": [ "Admission", "ID" ], "laboratory": [ "Date", ...
thrombosis_prediction
##Instruction: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Database: thrombosis_prediction Total Tables: 3 Total Columns: 64 Table Schemas: Table: Examination (13 columns) ------------------------------- • ID (integer): identification of the patient • Examination Date (date): Ex...
ClinicalResearcher
{ "Examination": [ "ID", "Examination Date", "aCL IgG", "aCL IgM", "ANA", "ANA Pattern", "aCL IgA", "Diagnosis", "KCT", "RVVT", "LAC", "Symptoms", "Thrombosis" ], "Patient": [ "ID", "SEX", "Birthday" ], "Laboratory": [ "ID", "Date", "...
Excluding all P only ANA Pattern patients, how many of the remainder are women born between 1980 and 1989?
SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.`ANA Pattern` != 'P' AND STRFTIME('%Y', T1.Birthday) BETWEEN '1980' AND '1989' AND T1.SEX = 'F'
moderate
{ "gold_sql": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.`ANA Pattern` != 'P' AND STRFTIME('%Y', T1.Birthday) BETWEEN '1980' AND '1989' AND T1.SEX = 'F'", "permission": "allowed", "query_columns": { "patient": [ "Birthday", "ID", "...