dataset_name
stringclasses
1 value
split
stringclasses
1 value
prompt_raw
stringlengths
2.07k
8.21k
messages
listlengths
2
2
question
stringlengths
23
286
sample_id
int64
0
1.53k
db_id
stringclasses
11 values
groundtruth_sqls
listlengths
1
1
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "EUR" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "3" customers.Segment: TEXT - client segme...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
Please list the product description of the products consumed in September, 2013.
1,500
debit_card_specializing
[ "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'" ]
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "EUR" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "3" customers.Segment: TEXT - client segme...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
Please list the countries of the gas stations with transactions taken place in June, 2013.
1,501
debit_card_specializing
[ "SELECT DISTINCT T2.Country FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID INNER JOIN yearmonth AS T3 ON T1.CustomerID = T3.CustomerID WHERE T3.Date = '201306'" ]
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "EUR" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "3" customers.Segment: TEXT - client segme...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
Please list the chains of the gas stations with transactions in euro.
1,502
debit_card_specializing
[ "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'" ]
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "EUR" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "3" customers.Segment: TEXT - client segme...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
Please list the product description of the products bought in transactions in euro.
1,503
debit_card_specializing
[ "SELECT DISTINCT T1.ProductID, T3.Description FROM transactions_1k AS T1 INNER JOIN customers AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN products AS T3 ON T1.ProductID = T3.ProductID WHERE T2.Currency = 'EUR'" ]
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "EUR" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "3" customers.Segment: TEXT - client segme...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
What is the average total price of the transactions taken place in January, 2012?
1,504
debit_card_specializing
[ "SELECT AVG(Amount) FROM transactions_1k WHERE Date LIKE '2012-01%'" ]
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "EUR" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "1000" customers.Segment: TEXT - client se...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
Among the customers who paid in euro, how many of them have a monthly consumption of over 1000?
1,505
debit_card_specializing
[ "SELECT COUNT(*) FROM yearmonth AS T1 INNER JOIN customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Currency = 'EUR' AND T1.Consumption > 1000.00" ]
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "EUR" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "3" customers.Segment: TEXT - client segme...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
Please list the product descriptions of the transactions taken place in the gas stations in the Czech Republic.
1,506
debit_card_specializing
[ "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'" ]
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "EUR" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "3" customers.Segment: TEXT - client segme...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
Please list the disparate time of the transactions taken place in the gas stations from chain no. 11.
1,507
debit_card_specializing
[ "SELECT DISTINCT T1.Time FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T2.ChainID = 11" ]
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "EUR" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "1000" customers.Segment: TEXT - client se...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
How many transactions taken place in the gas station in the Czech Republic are with a price of over 1000?
1,508
debit_card_specializing
[ "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" ]
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "EUR" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "3" customers.Segment: TEXT - client segme...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
Among the transactions made in the gas stations in the Czech Republic, how many of them are taken place after 2012/1/1?
1,509
debit_card_specializing
[ "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'" ]
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "EUR" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "3" customers.Segment: TEXT - client segme...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
What is the average total price of the transactions taken place in gas stations in the Czech Republic?
1,510
debit_card_specializing
[ "SELECT AVG(T1.Price) FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T2.Country = 'CZE'" ]
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "EUR" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "3" customers.Segment: TEXT - client segme...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
For the customers who paid in the euro, what is their average total price of the transactions?
1,511
debit_card_specializing
[ "SELECT AVG(T1.Price) 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 T3.Currency = 'EUR'" ]
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "EUR" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "3" customers.Segment: TEXT - client segme...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
Which customer paid the most in 2012/8/25?
1,512
debit_card_specializing
[ "SELECT CustomerID FROM transactions_1k WHERE Date = '2012-08-25' GROUP BY CustomerID ORDER BY SUM(Price) DESC LIMIT 1" ]
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "EUR" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "3" customers.Segment: TEXT - client segme...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
Which country's gas station had the first paid cusomer in 2012/8/25?
1,513
debit_card_specializing
[ "SELECT T2.Country FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T1.Date = '2012-08-25' ORDER BY T1.Time DESC LIMIT 1" ]
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "EUR" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "3" customers.Segment: TEXT - client segme...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
What kind of currency did the customer paid at 16:25:00 in 2012/8/24?
1,514
debit_card_specializing
[ "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'" ]
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "EUR" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "20" customers.Segment: TEXT - client segm...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
What segment did the customer have at 2012/8/23 21:20:00?
1,515
debit_card_specializing
[ "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'" ]
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "CZK" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "3" customers.Segment: TEXT - client segme...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
How many transactions were paid in CZK in the morning of 2012/8/26?
1,516
debit_card_specializing
[ "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'" ]
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "EUR" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "3" customers.Segment: TEXT - client segme...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
For the earliest customer, what segment did he/she have?
1,517
debit_card_specializing
[ "SELECT T2.Segment FROM transactions_1k AS T1 INNER JOIN customers AS T2 ON T1.CustomerID = T2.CustomerID ORDER BY Date ASC LIMIT 1" ]
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "EUR" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "3" customers.Segment: TEXT - client segme...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
For the deal happened at 2012/8/24 12:42:00, which country was it?
1,518
debit_card_specializing
[ "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'" ]
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "EUR" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "20" customers.Segment: TEXT - client segm...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
What was the product id of the transaction happened at 2012/8/23 21:20:00?
1,519
debit_card_specializing
[ "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'" ]
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "EUR" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "3" customers.Segment: TEXT - client segme...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
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?
1,520
debit_card_specializing
[ "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'" ]
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "EUR" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "9" customers.Segment: TEXT - client segme...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
For all the transactions happened during 8:00-9:00 in 2012/8/26, how many happened in CZE?
1,521
debit_card_specializing
[ "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'" ]
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "EUR" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "3" customers.Segment: TEXT - client segme...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
There's one customer spent 214582.17 in the June of 2013, which currency did he/she use?
1,522
debit_card_specializing
[ "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" ]
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "EUR" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "3" customers.Segment: TEXT - client segme...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
Which country was the card owner of No.667467 in?
1,523
debit_card_specializing
[ "SELECT T2.Country FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T1.CardID = '667467'" ]
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "EUR" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "3" customers.Segment: TEXT - client segme...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
What's the nationality of the customer who spent 548.4 in 2012/8/24?
1,524
debit_card_specializing
[ "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" ]
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "EUR" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "3" customers.Segment: TEXT - client segme...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
What is the percentage of the customers who used EUR in 2012/8/25?
1,525
debit_card_specializing
[ "SELECT CAST(SUM(IIF(T2.Currency = 'EUR', 1, 0)) AS FLOAT) * 100 / COUNT(T1.CustomerID) FROM transactions_1k AS T1 INNER JOIN customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Date = '2012-08-25'" ]
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "EUR" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "3" customers.Segment: TEXT - client segme...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
For the customer who paid 634.8 in 2012/8/25, what was the consumption decrease rate from Year 2012 to 2013?
1,526
debit_card_specializing
[ "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.GasStati...
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "EUR" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "3" customers.Segment: TEXT - client segme...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
Which gas station has the highest amount of revenue?
1,527
debit_card_specializing
[ "SELECT GasStationID FROM transactions_1k GROUP BY GasStationID ORDER BY SUM(Price) DESC LIMIT 1" ]
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "EUR" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "3" customers.Segment: TEXT - client segme...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
What is the percentage of "premium" against the overall segment in Country = "SVK"?
1,528
debit_card_specializing
[ "SELECT CAST(SUM(IIF(Country = 'SVK' AND Segment = 'Premium', 1, 0)) AS FLOAT) * 100 / SUM(IIF(Country = 'SVK', 1, 0)) FROM gasstations" ]
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "EUR" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "38508" customers.Segment: TEXT - client s...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
What is the amount spent by customer "38508" at the gas stations? How much had the customer spent in January 2012?
1,529
debit_card_specializing
[ "SELECT SUM(T1.Price) , SUM(IIF(T3.Date = '201201', T1.Price, 0)) FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID INNER JOIN yearmonth AS T3 ON T1.CustomerID = T3.CustomerID WHERE T1.CustomerID = '38508'" ]
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "EUR" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "3" customers.Segment: TEXT - client segme...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
Which are the top five best selling products? Please state the full name of them.
1,530
debit_card_specializing
[ "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" ]
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "EUR" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "3" customers.Segment: TEXT - client segme...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
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?
1,531
debit_card_specializing
[ "SELECT T2.CustomerID, SUM(T2.Price / T2.Amount), T1.Currency FROM customers AS T1 INNER JOIN transactions_1k AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.CustomerID = ( SELECT CustomerID FROM yearmonth ORDER BY Consumption DESC LIMIT 1 ) GROUP BY T2.CustomerID, T1.Currency" ]
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "EUR" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "3" customers.Segment: TEXT - client segme...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
Which country had the gas station that sold the most expensive product id No.2 for one unit?
1,532
debit_card_specializing
[ "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" ]
bird
dev
Database Schema: Table customers: This table contains information about clients, including their unique ID, currency used, and business segment classification. customers.Currency: TEXT Sample values: "EUR" customers.CustomerID: INTEGER PRIMARY KEY Sample values: "5" customers.Segment: TEXT - client segme...
[ { "content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text outside...
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.
1,533
debit_card_specializing
[ "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'" ]