mzozulia's picture
Upload 339 files
2ea1065
{
"CoSQL--train--1": {
"original dialog id": "",
"dialog index": 1,
"original dialog info": {
"db_id": "college_2",
"db_path": "./data\\downloads\\extracted\\d08c1c3e474f6ae0aab2e94f855c6c7832fdb3dc3c0514ad6d3f049a1cf87c3d/cosql_dataset/database",
"db_table_names": [
"classroom",
"department",
"course",
"instructor",
"section",
"teaches",
"student",
"takes",
"advisor",
"time_slot",
"prereq"
],
"db_column_names": {
"table_id": [
-1,
0,
0,
0,
1,
1,
1,
2,
2,
2,
2,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
8,
8,
9,
9,
9,
9,
9,
9,
10,
10
],
"column_name": [
"*",
"building",
"room_number",
"capacity",
"dept_name",
"building",
"budget",
"course_id",
"title",
"dept_name",
"credits",
"ID",
"name",
"dept_name",
"salary",
"course_id",
"sec_id",
"semester",
"year",
"building",
"room_number",
"time_slot_id",
"ID",
"course_id",
"sec_id",
"semester",
"year",
"ID",
"name",
"dept_name",
"tot_cred",
"ID",
"course_id",
"sec_id",
"semester",
"year",
"grade",
"s_ID",
"i_ID",
"time_slot_id",
"day",
"start_hr",
"start_min",
"end_hr",
"end_min",
"course_id",
"prereq_id"
]
},
"db_column_types": [
"text",
"text",
"text",
"number",
"text",
"text",
"number",
"text",
"text",
"text",
"number",
"text",
"text",
"text",
"number",
"text",
"text",
"text",
"number",
"text",
"text",
"text",
"text",
"text",
"text",
"text",
"number",
"text",
"text",
"text",
"number",
"text",
"text",
"text",
"text",
"number",
"text",
"text",
"text",
"text",
"text",
"number",
"number",
"number",
"number",
"text",
"text"
],
"db_primary_keys": {
"column_id": [
1,
4,
7,
11,
15,
22,
27,
31,
37,
39,
45
]
},
"db_foreign_keys": {
"column_id": [
9,
13,
19,
20,
15,
22,
23,
24,
25,
26,
29,
31,
32,
33,
34,
35,
37,
38,
46,
45
],
"other_column_id": [
4,
4,
1,
2,
7,
11,
15,
16,
17,
18,
4,
27,
15,
16,
17,
18,
27,
11,
7,
7
]
}
},
"log": [
{
"turn id": 1,
"user utterance": "Find the name of the department which has the highest average salary of professors.",
"system response": "select dept_name from instructor group by dept_name order by avg(salary) desc limit 1",
"dialog history": "",
"original user side information": {
"query": "SELECT dept_name FROM instructor GROUP BY dept_name ORDER BY avg(salary) DESC LIMIT 1",
"utterances": [
"Find the name of the department which has the highest average salary of professors."
],
"turn_idx": -1,
"serialized_schema": " | college_2 | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id"
},
"original system side information": {},
"external knowledge": "| college_2 | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id"
}
],
"prompt": [
"Using the provided dialogue history and database schema information, construct the next SQL query that will serve as the system's response to the user's latest query, adhering to the user's intent and the database structure.",
"Given a sequence of user-system interactions and the context of the relevant database, generate an SQL query that accurately responds to the user's most recent request and aligns with the provided database schema.",
"Take into account the dialogue history and the specific database schema. Your job is to formulate the correct SQL query that would act as the system's response to the latest user query.",
"Based on the context from a sequence of user-system exchanges and the provided database information, your task is to derive an appropriate SQL query. This query should effectively answer the user's most recent question and be consistent with the database's structure.",
"Considering the dialogue history and database schema, generate the SQL query that the system should provide as a response to the latest user request. Ensure your query aligns with the user's intent and the structure of the database."
]
},
"CoSQL--train--2": {
"original dialog id": "",
"dialog index": 2,
"original dialog info": {
"db_id": "train_station",
"db_path": "./data\\downloads\\extracted\\d08c1c3e474f6ae0aab2e94f855c6c7832fdb3dc3c0514ad6d3f049a1cf87c3d/cosql_dataset/database",
"db_table_names": [
"station",
"train",
"train_station"
],
"db_column_names": {
"table_id": [
-1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
2,
2
],
"column_name": [
"*",
"Station_ID",
"Name",
"Annual_entry_exit",
"Annual_interchanges",
"Total_Passengers",
"Location",
"Main_Services",
"Number_of_Platforms",
"Train_ID",
"Name",
"Time",
"Service",
"Train_ID",
"Station_ID"
]
},
"db_column_types": [
"text",
"number",
"text",
"number",
"number",
"number",
"text",
"text",
"number",
"number",
"text",
"text",
"text",
"number",
"number"
],
"db_primary_keys": {
"column_id": [
1,
9,
13
]
},
"db_foreign_keys": {
"column_id": [
14,
13
],
"other_column_id": [
1,
9
]
}
},
"log": [
{
"turn id": 1,
"user utterance": "show the train name and station name for each train.",
"system response": "select t2.name, t3.name from train_station as t1 join station as t2 on t1.station_id = t2.station_id join train as t3 on t3.train_id = t1.train_id",
"dialog history": "",
"original user side information": {
"query": "SELECT T2.name , T3.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train_id",
"utterances": [
"show the train name and station name for each train."
],
"turn_idx": -1,
"serialized_schema": " | train_station | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id"
},
"original system side information": {},
"external knowledge": "| train_station | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id"
}
],
"prompt": [
"Using the provided dialogue history and database schema information, construct the next SQL query that will serve as the system's response to the user's latest query, adhering to the user's intent and the database structure.",
"Given a sequence of user-system interactions and the context of the relevant database, generate an SQL query that accurately responds to the user's most recent request and aligns with the provided database schema.",
"Take into account the dialogue history and the specific database schema. Your job is to formulate the correct SQL query that would act as the system's response to the latest user query.",
"Based on the context from a sequence of user-system exchanges and the provided database information, your task is to derive an appropriate SQL query. This query should effectively answer the user's most recent question and be consistent with the database's structure.",
"Considering the dialogue history and database schema, generate the SQL query that the system should provide as a response to the latest user request. Ensure your query aligns with the user's intent and the structure of the database."
]
},
"CoSQL--train--3": {
"original dialog id": "",
"dialog index": 3,
"original dialog info": {
"db_id": "college_2",
"db_path": "./data\\downloads\\extracted\\d08c1c3e474f6ae0aab2e94f855c6c7832fdb3dc3c0514ad6d3f049a1cf87c3d/cosql_dataset/database",
"db_table_names": [
"classroom",
"department",
"course",
"instructor",
"section",
"teaches",
"student",
"takes",
"advisor",
"time_slot",
"prereq"
],
"db_column_names": {
"table_id": [
-1,
0,
0,
0,
1,
1,
1,
2,
2,
2,
2,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
8,
8,
9,
9,
9,
9,
9,
9,
10,
10
],
"column_name": [
"*",
"building",
"room_number",
"capacity",
"dept_name",
"building",
"budget",
"course_id",
"title",
"dept_name",
"credits",
"ID",
"name",
"dept_name",
"salary",
"course_id",
"sec_id",
"semester",
"year",
"building",
"room_number",
"time_slot_id",
"ID",
"course_id",
"sec_id",
"semester",
"year",
"ID",
"name",
"dept_name",
"tot_cred",
"ID",
"course_id",
"sec_id",
"semester",
"year",
"grade",
"s_ID",
"i_ID",
"time_slot_id",
"day",
"start_hr",
"start_min",
"end_hr",
"end_min",
"course_id",
"prereq_id"
]
},
"db_column_types": [
"text",
"text",
"text",
"number",
"text",
"text",
"number",
"text",
"text",
"text",
"number",
"text",
"text",
"text",
"number",
"text",
"text",
"text",
"number",
"text",
"text",
"text",
"text",
"text",
"text",
"text",
"number",
"text",
"text",
"text",
"number",
"text",
"text",
"text",
"text",
"number",
"text",
"text",
"text",
"text",
"text",
"number",
"number",
"number",
"number",
"text",
"text"
],
"db_primary_keys": {
"column_id": [
1,
4,
7,
11,
15,
22,
27,
31,
37,
39,
45
]
},
"db_foreign_keys": {
"column_id": [
9,
13,
19,
20,
15,
22,
23,
24,
25,
26,
29,
31,
32,
33,
34,
35,
37,
38,
46,
45
],
"other_column_id": [
4,
4,
1,
2,
7,
11,
15,
16,
17,
18,
4,
27,
15,
16,
17,
18,
27,
11,
7,
7
]
}
},
"log": [
{
"turn id": 1,
"user utterance": "Find out the average salary of professors?",
"system response": "select avg ( salary ) from instructor",
"dialog history": "",
"original user side information": {
"query": "SELECT avg ( salary ) FROM instructor",
"utterances": [
"Find out the average salary of professors?"
],
"turn_idx": 0,
"serialized_schema": " | college_2 | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id"
},
"original system side information": {},
"external knowledge": "| college_2 | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id"
},
{
"turn id": 2,
"user utterance": "Find the average salary of the professors of each department?",
"system response": "select avg ( salary ), dept_name from instructor group by dept_name",
"dialog history": "<USER> Find out the average salary of professors? <SYSTEM> select avg ( salary ) from instructor",
"original user side information": {
"query": "SELECT avg ( salary ) , dept_name FROM instructor GROUP BY dept_name",
"utterances": [
"Find out the average salary of professors?",
"Find the average salary of the professors of each department?"
],
"turn_idx": 1,
"serialized_schema": " | college_2 | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id"
},
"original system side information": {},
"external knowledge": "| college_2 | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id"
},
{
"turn id": 3,
"user utterance": "Which department has the highest average salary of professors?",
"system response": "select dept_name from instructor group by dept_name order by avg ( salary ) desc limit 1",
"dialog history": "<USER> Find out the average salary of professors? <SYSTEM> select avg ( salary ) from instructor <USER> Find the average salary of the professors of each department? <SYSTEM> select avg ( salary ), dept_name from instructor group by dept_name",
"original user side information": {
"query": "SELECT dept_name FROM instructor GROUP BY dept_name ORDER BY avg ( salary ) DESC LIMIT 1",
"utterances": [
"Find out the average salary of professors?",
"Find the average salary of the professors of each department?",
"Which department has the highest average salary of professors?"
],
"turn_idx": 2,
"serialized_schema": " | college_2 | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id"
},
"original system side information": {},
"external knowledge": "| college_2 | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id"
},
{
"turn id": 4,
"user utterance": "Which department has the lowest average salary of professors?",
"system response": "select dept_name from instructor group by dept_name order by avg ( salary ) limit 1",
"dialog history": "<USER> Find out the average salary of professors? <SYSTEM> select avg ( salary ) from instructor <USER> Find the average salary of the professors of each department? <SYSTEM> select avg ( salary ), dept_name from instructor group by dept_name <USER> Which department has the highest average salary of professors? <SYSTEM> select dept_name from instructor group by dept_name order by avg ( salary ) desc limit 1",
"original user side information": {
"query": "SELECT dept_name FROM instructor GROUP BY dept_name ORDER BY avg ( salary ) LIMIT 1",
"utterances": [
"Find out the average salary of professors?",
"Find the average salary of the professors of each department?",
"Which department has the highest average salary of professors?",
"Which department has the lowest average salary of professors?"
],
"turn_idx": 3,
"serialized_schema": " | college_2 | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id"
},
"original system side information": {},
"external knowledge": "| college_2 | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id"
},
{
"turn id": 5,
"user utterance": "In which department Mr. Mird work for?",
"system response": "select dept_name from instructor where name = 'Mird'",
"dialog history": "<USER> Find out the average salary of professors? <SYSTEM> select avg ( salary ) from instructor <USER> Find the average salary of the professors of each department? <SYSTEM> select avg ( salary ), dept_name from instructor group by dept_name <USER> Which department has the highest average salary of professors? <SYSTEM> select dept_name from instructor group by dept_name order by avg ( salary ) desc limit 1 <USER> Which department has the lowest average salary of professors? <SYSTEM> select dept_name from instructor group by dept_name order by avg ( salary ) limit 1",
"original user side information": {
"query": "SELECT dept_name FROM instructor where name = 'Mird'",
"utterances": [
"Find out the average salary of professors?",
"Find the average salary of the professors of each department?",
"Which department has the highest average salary of professors?",
"Which department has the lowest average salary of professors?",
"In which department Mr. Mird work for?"
],
"turn_idx": 4,
"serialized_schema": " | college_2 | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name ( Mird ) , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id"
},
"original system side information": {},
"external knowledge": "| college_2 | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name ( Mird ) , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id"
},
{
"turn id": 6,
"user utterance": "How much is the salary Mr. Mird earns currently?",
"system response": "select salary from instructor where name = 'Mird'",
"dialog history": "<USER> Find out the average salary of professors? <SYSTEM> select avg ( salary ) from instructor <USER> Find the average salary of the professors of each department? <SYSTEM> select avg ( salary ), dept_name from instructor group by dept_name <USER> Which department has the highest average salary of professors? <SYSTEM> select dept_name from instructor group by dept_name order by avg ( salary ) desc limit 1 <USER> Which department has the lowest average salary of professors? <SYSTEM> select dept_name from instructor group by dept_name order by avg ( salary ) limit 1 <USER> In which department Mr. Mird work for? <SYSTEM> select dept_name from instructor where name = 'Mird'",
"original user side information": {
"query": "SELECT salary FROM instructor where name = 'Mird'",
"utterances": [
"Find out the average salary of professors?",
"Find the average salary of the professors of each department?",
"Which department has the highest average salary of professors?",
"Which department has the lowest average salary of professors?",
"In which department Mr. Mird work for?",
"How much is the salary Mr. Mird earns currently?"
],
"turn_idx": 5,
"serialized_schema": " | college_2 | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name ( Mird ) , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id"
},
"original system side information": {},
"external knowledge": "| college_2 | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name ( Mird ) , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id"
}
],
"prompt": [
"Using the provided dialogue history and database schema information, construct the next SQL query that will serve as the system's response to the user's latest query, adhering to the user's intent and the database structure.",
"Given a sequence of user-system interactions and the context of the relevant database, generate an SQL query that accurately responds to the user's most recent request and aligns with the provided database schema.",
"Take into account the dialogue history and the specific database schema. Your job is to formulate the correct SQL query that would act as the system's response to the latest user query.",
"Based on the context from a sequence of user-system exchanges and the provided database information, your task is to derive an appropriate SQL query. This query should effectively answer the user's most recent question and be consistent with the database's structure.",
"Considering the dialogue history and database schema, generate the SQL query that the system should provide as a response to the latest user request. Ensure your query aligns with the user's intent and the structure of the database."
]
},
"CoSQL--train--4": {
"original dialog id": "",
"dialog index": 4,
"original dialog info": {
"db_id": "performance_attendance",
"db_path": "./data\\downloads\\extracted\\d08c1c3e474f6ae0aab2e94f855c6c7832fdb3dc3c0514ad6d3f049a1cf87c3d/cosql_dataset/database",
"db_table_names": [
"member",
"performance",
"member_attendance"
],
"db_column_names": {
"table_id": [
-1,
0,
0,
0,
0,
1,
1,
1,
1,
1,
2,
2,
2
],
"column_name": [
"*",
"Member_ID",
"Name",
"Nationality",
"Role",
"Performance_ID",
"Date",
"Host",
"Location",
"Attendance",
"Member_ID",
"Performance_ID",
"Num_of_Pieces"
]
},
"db_column_types": [
"text",
"text",
"text",
"text",
"text",
"number",
"text",
"text",
"text",
"number",
"number",
"number",
"number"
],
"db_primary_keys": {
"column_id": [
1,
5,
10
]
},
"db_foreign_keys": {
"column_id": [
11,
10
],
"other_column_id": [
5,
1
]
}
},
"log": [
{
"turn id": 1,
"user utterance": "Show the dates of performances with attending members whose roles are \"Violin\".",
"system response": "select t3.date from member_attendance as t1 join member as t2 on t1.member_id = t2.member_id join performance as t3 on t1.performance_id = t3.performance_id where t2.role = \"Violin\"",
"dialog history": "",
"original user side information": {
"query": "SELECT T3.Date FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID WHERE T2.Role = \"Violin\"",
"utterances": [
"Show the dates of performances with attending members whose roles are \"Violin\"."
],
"turn_idx": -1,
"serialized_schema": " | performance_attendance | member : member_id , name , nationality , role ( Violin ) | performance : performance_id , date , host , location , attendance | member_attendance : member_id , performance_id , num_of_pieces"
},
"original system side information": {},
"external knowledge": "| performance_attendance | member : member_id , name , nationality , role ( Violin ) | performance : performance_id , date , host , location , attendance | member_attendance : member_id , performance_id , num_of_pieces"
}
],
"prompt": [
"Using the provided dialogue history and database schema information, construct the next SQL query that will serve as the system's response to the user's latest query, adhering to the user's intent and the database structure.",
"Given a sequence of user-system interactions and the context of the relevant database, generate an SQL query that accurately responds to the user's most recent request and aligns with the provided database schema.",
"Take into account the dialogue history and the specific database schema. Your job is to formulate the correct SQL query that would act as the system's response to the latest user query.",
"Based on the context from a sequence of user-system exchanges and the provided database information, your task is to derive an appropriate SQL query. This query should effectively answer the user's most recent question and be consistent with the database's structure.",
"Considering the dialogue history and database schema, generate the SQL query that the system should provide as a response to the latest user request. Ensure your query aligns with the user's intent and the structure of the database."
]
},
"CoSQL--train--5": {
"original dialog id": "",
"dialog index": 5,
"original dialog info": {
"db_id": "train_station",
"db_path": "./data\\downloads\\extracted\\d08c1c3e474f6ae0aab2e94f855c6c7832fdb3dc3c0514ad6d3f049a1cf87c3d/cosql_dataset/database",
"db_table_names": [
"station",
"train",
"train_station"
],
"db_column_names": {
"table_id": [
-1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
2,
2
],
"column_name": [
"*",
"Station_ID",
"Name",
"Annual_entry_exit",
"Annual_interchanges",
"Total_Passengers",
"Location",
"Main_Services",
"Number_of_Platforms",
"Train_ID",
"Name",
"Time",
"Service",
"Train_ID",
"Station_ID"
]
},
"db_column_types": [
"text",
"number",
"text",
"number",
"number",
"number",
"text",
"text",
"number",
"number",
"text",
"text",
"text",
"number",
"number"
],
"db_primary_keys": {
"column_id": [
1,
9,
13
]
},
"db_foreign_keys": {
"column_id": [
14,
13
],
"other_column_id": [
1,
9
]
}
},
"log": [
{
"turn id": 1,
"user utterance": "What is the station ID for London Waterloo",
"system response": "select station_id from station where name = \"London Waterloo\"",
"dialog history": "",
"original user side information": {
"query": "SELECT station_id from station where name = \"London Waterloo\"",
"utterances": [
"What is the station ID for London Waterloo"
],
"turn_idx": 0,
"serialized_schema": " | train_station | station : station_id , name ( London Waterloo ) , annual_entry_exit , annual_interchanges , total_passengers , location ( London ) , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id"
},
"original system side information": {},
"external knowledge": "| train_station | station : station_id , name ( London Waterloo ) , annual_entry_exit , annual_interchanges , total_passengers , location ( London ) , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id"
},
{
"turn id": 2,
"user utterance": "What trains go to station ID 1?",
"system response": "select * from train_station as t1 join station as t2 on t1.station_id = t2.station_id join train as t3 on t3.train_id = t1.train_id where t1.station_id = 1",
"dialog history": "<USER> What is the station ID for London Waterloo <SYSTEM> select station_id from station where name = \"London Waterloo\"",
"original user side information": {
"query": "SELECT * FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train_id where T1.station_id = 1",
"utterances": [
"What is the station ID for London Waterloo",
"What trains go to station ID 1?"
],
"turn_idx": 1,
"serialized_schema": " | train_station | station : station_id , name ( London Waterloo ) , annual_entry_exit , annual_interchanges , total_passengers , location ( London ) , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id"
},
"original system side information": {},
"external knowledge": "| train_station | station : station_id , name ( London Waterloo ) , annual_entry_exit , annual_interchanges , total_passengers , location ( London ) , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id"
},
{
"turn id": 3,
"user utterance": "Can you give me the names of those trains and tell me when they have service",
"system response": "select t3.name, t3.time from train_station as t1 join station as t2 on t1.station_id = t2.station_id join train as t3 on t3.train_id = t1.train_id where t1.station_id = 1",
"dialog history": "<USER> What is the station ID for London Waterloo <SYSTEM> select station_id from station where name = \"London Waterloo\" <USER> What trains go to station ID 1? <SYSTEM> select * from train_station as t1 join station as t2 on t1.station_id = t2.station_id join train as t3 on t3.train_id = t1.train_id where t1.station_id = 1",
"original user side information": {
"query": "SELECT T3.name, T3.time FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train_id where T1.station_id = 1",
"utterances": [
"What is the station ID for London Waterloo",
"What trains go to station ID 1?",
"Can you give me the names of those trains and tell me when they have service"
],
"turn_idx": 2,
"serialized_schema": " | train_station | station : station_id , name ( London Waterloo ) , annual_entry_exit , annual_interchanges , total_passengers , location ( London ) , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id"
},
"original system side information": {},
"external knowledge": "| train_station | station : station_id , name ( London Waterloo ) , annual_entry_exit , annual_interchanges , total_passengers , location ( London ) , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id"
}
],
"prompt": [
"Using the provided dialogue history and database schema information, construct the next SQL query that will serve as the system's response to the user's latest query, adhering to the user's intent and the database structure.",
"Given a sequence of user-system interactions and the context of the relevant database, generate an SQL query that accurately responds to the user's most recent request and aligns with the provided database schema.",
"Take into account the dialogue history and the specific database schema. Your job is to formulate the correct SQL query that would act as the system's response to the latest user query.",
"Based on the context from a sequence of user-system exchanges and the provided database information, your task is to derive an appropriate SQL query. This query should effectively answer the user's most recent question and be consistent with the database's structure.",
"Considering the dialogue history and database schema, generate the SQL query that the system should provide as a response to the latest user request. Ensure your query aligns with the user's intent and the structure of the database."
]
}
}