chat_prompt
stringlengths 438
1.53k
|
|---|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest total amount of medals from countries with 0 gold medals, more than 2 bronze medals, and more than 1 silver medal?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total\") FROM \"medal_table\" WHERE \"gold\"=0 AND \"bronze\">2 AND \"silver\">1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total number of silver medals for countries of rank 14, with less than 1 total medals?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"silver\") FROM \"medal_table\" WHERE \"rank\"='14' AND \"total\"<1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tackles\" (\n \"player\" text,\n \"solo\" real,\n \"total\" real,\n \"sacks\" text,\n \"fumble_force\" real,\n \"fumble_rec\" real\n);\n\nQuestion: How many tackles for the player with over 0 fumble recovries and 0 forced fumbles?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total\") FROM \"tackles\" WHERE \"fumble_rec\">0 AND \"fumble_force\"=0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tackles\" (\n \"player\" text,\n \"solo\" real,\n \"total\" real,\n \"sacks\" text,\n \"fumble_force\" real,\n \"fumble_rec\" real\n);\n\nQuestion: How many forced fumbles for jim laney with under 2 solo tackles?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"fumble_force\") FROM \"tackles\" WHERE \"solo\"<2 AND \"player\"='jim laney';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tackles\" (\n \"player\" text,\n \"solo\" real,\n \"total\" real,\n \"sacks\" text,\n \"fumble_force\" real,\n \"fumble_rec\" real\n);\n\nQuestion: What is the high total for players with over 15 solo tackles?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total\") FROM \"tackles\" WHERE \"solo\">15;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tackles\" (\n \"player\" text,\n \"solo\" real,\n \"total\" real,\n \"sacks\" text,\n \"fumble_force\" real,\n \"fumble_rec\" real\n);\n\nQuestion: How many fumble recoveries for scott gajos with 0 forced fubmles, 0 sacks, and under 2 solo tackles?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"fumble_rec\") FROM \"tackles\" WHERE \"sacks\"='0' AND \"fumble_force\"=0 AND \"player\"='scott gajos' AND \"solo\"<2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"friendly\" (\n \"date\" text,\n \"time\" text,\n \"competition\" text,\n \"opponent\" text,\n \"ground\" text,\n \"score\" text\n);\n\nQuestion: Who is the Opponent playing at 20:00 GMT at Camp Nou?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"friendly\" WHERE \"time\"='20:00 gmt' AND \"ground\"='camp nou';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"friendly\" (\n \"date\" text,\n \"time\" text,\n \"competition\" text,\n \"opponent\" text,\n \"ground\" text,\n \"score\" text\n);\n\nQuestion: What time was the match played with a score of 3-2?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"friendly\" WHERE \"score\"='3-2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"friendly\" (\n \"date\" text,\n \"time\" text,\n \"competition\" text,\n \"opponent\" text,\n \"ground\" text,\n \"score\" text\n);\n\nQuestion: On which ground did the team play Aston Villa?"
},
{
"role": "assistant",
"content": "SELECT \"ground\" FROM \"friendly\" WHERE \"opponent\"='aston villa';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"friendly\" (\n \"date\" text,\n \"time\" text,\n \"competition\" text,\n \"opponent\" text,\n \"ground\" text,\n \"score\" text\n);\n\nQuestion: What kind of competition was it at San Siro at 18:30 GMT?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"friendly\" WHERE \"ground\"='san siro' AND \"time\"='18:30 gmt';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wellington_city\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"locality\" text,\n \"authority\" text,\n \"decile\" real\n);\n\nQuestion: What is the total number of decile for the redwood school locality?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"decile\") FROM \"wellington_city\" WHERE \"name\"='redwood school';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_grands_prix\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Which report includes a Circuit of Tripoli?"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"other_grands_prix\" WHERE \"circuit\"='tripoli';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.