q_id
int64 0
9.43k
| input_ids
listlengths 450
49.1k
| attention_mask
listlengths 450
49.1k
| labels
listlengths 450
49.1k
| input_text
stringlengths 1.82k
193k
| output_text
stringlengths 51
837
| input_prompt
stringclasses 215
values |
---|---|---|---|---|---|---|
1,371 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
3170,
1,
2456,
1,
3864,
1,
528,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
1,
590,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3229,
10592,
220,
16,
26,
4815,
12576,
1393,
53119,
1393,
609,
1393,
590,
33006,
6343,
23421,
14700,
330,
79590,
1,
2456,
1,
21200,
1,
528,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
6682,
1401,
3573,
21200,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10017,
10592,
220,
16,
26,
4815,
33241,
1393,
53119,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
1,
2456,
1,
23770,
1,
528,
345,
32586,
1,
1495,
345,
6682,
1401,
3573,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
10592,
220,
16,
26,
4815,
1550,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
23790,
1,
2456,
1,
3864,
1,
528,
11,
720,
1,
23770,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
3864,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
3170,
63,
446,
3864,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
12482,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
23790,
10592,
220,
16,
26,
4815,
12576,
1393,
23770,
33006,
6343,
23421,
14700,
330,
12482,
3464,
2251,
1,
2456,
1,
21200,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
21200,
4561,
29543,
1401,
446,
21200,
909,
15407,
1595,
79590,
63,
446,
21200,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
12482,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
3464,
2251,
10592,
220,
16,
26,
4815,
33241,
1393,
23770,
33006,
6343,
23421,
14700,
330,
43618,
1,
2456,
1,
53119,
1,
1495,
345,
1,
73976,
1,
528,
345,
32586,
1,
1495,
345,
6682,
1401,
446,
73976,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8486,
10592,
220,
16,
26,
4815,
35689,
1393,
73976,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
86175,
1,
2456,
1,
23770,
1,
528,
345,
1,
73976,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
73976,
4561,
29543,
1401,
446,
73976,
909,
15407,
330,
43618,
1,
446,
73976,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
86175,
10592,
220,
16,
26,
4815,
1550,
1393,
73976,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
1,
20454,
1,
1495,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
16570,
1393,
64381,
33006,
6343,
23421,
14700,
330,
12482,
46924,
1,
2456,
1,
23770,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
64381,
4561,
29543,
1401,
446,
64381,
909,
15407,
330,
20454,
1,
446,
64381,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
46924,
10592,
220,
16,
26,
4815,
1550,
1393,
64381,
33006,
6343,
23421,
14700,
330,
72260,
1,
2456,
1,
16647,
1,
1495,
345,
1,
21200,
1,
1495,
345,
1,
84247,
4369,
1,
528,
345,
1,
73976,
1,
528,
345,
1,
10629,
1,
528,
345,
1,
16690,
4369,
1,
528,
345,
83827,
1,
1495,
345,
1,
3236,
1,
528,
345,
6682,
1401,
446,
10629,
4561,
29543,
1401,
446,
73976,
909,
15407,
330,
43618,
1,
446,
73976,
4561,
29543,
1401,
446,
21200,
909,
15407,
330,
79590,
1,
446,
21200,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17009,
10592,
220,
16,
26,
4815,
8278,
1393,
21200,
1393,
84247,
4369,
1393,
73976,
1393,
10629,
1393,
16690,
4369,
1393,
2150,
1393,
3236,
33006,
6343,
23421,
14700,
330,
12482,
28173,
367,
1,
2456,
1,
23770,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
28173,
367,
10592,
220,
16,
26,
4815,
1550,
1393,
10629,
33006,
6343,
23421,
14700,
330,
24844,
1,
2456,
1,
75695,
1,
1495,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
1,
590,
1,
528,
345,
6682,
1401,
446,
590,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7471,
10592,
220,
16,
26,
4815,
32843,
1393,
53119,
1393,
609,
1393,
590,
33006,
6343,
23421,
14700,
330,
72260,
46924,
1,
2456,
1,
10629,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
3573,
64381,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
64381,
909,
15407,
330,
20454,
1,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17009,
46924,
10592,
220,
16,
26,
4815,
15158,
1393,
64381,
33006,
6343,
23421,
14700,
330,
60179,
1,
2456,
1,
3864,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
3573,
3864,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
3864,
909,
15407,
330,
3170,
1,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
14238,
10592,
220,
16,
26,
4815,
12576,
1393,
10629,
33006,
6343,
23421,
14700,
330,
68175,
1,
2456,
98046,
1639,
1,
528,
345,
98046,
5977,
1,
220,
528,
345,
29543,
1401,
446,
66,
1639,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
66,
5977,
909,
15407,
330,
72260,
1,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
39396,
10592,
220,
16,
26,
4815,
22628,
1393,
66,
5977,
33006,
6343,
14711,
16225,
198,
693,
757,
279,
2860,
52946,
315,
16064,
304,
279,
61322,
3590,
10017,
1603,
220,
1049,
20,
662,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
31835,
320,
259,
17,
522,
7709,
4369,
883,
4393,
17009,
5871,
259,
17,
13369,
10017,
5871,
259,
16,
6328,
259,
17,
83986,
220,
284,
220,
259,
16,
83986,
5401,
259,
16,
2710,
220,
284,
220,
330,
31798,
3590,
1,
3651,
259,
17,
25418,
220,
366,
220,
220,
1049,
20,
37094,
5525,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
31835,
320,
259,
17,
522,
7709,
4369,
883,
4393,
17009,
5871,
259,
17,
13369,
10017,
5871,
259,
16,
6328,
259,
17,
83986,
220,
284,
220,
259,
16,
83986,
5401,
259,
16,
2710,
220,
284,
220,
330,
31798,
3590,
1,
3651,
259,
17,
25418,
220,
366,
220,
220,
1049,
20,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "author" (
"aid" int,
"homepage" text,
"name" text,
"oid" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM author LIMIT 1;
aid ||homepage ||name ||oid
*/
CREATE TABLE "conference" (
"cid" int,
"homepage" text,
"name" text,
primary key ("cid")
)
/*
1 example row:
SELECT * FROM conference LIMIT 1;
cid ||homepage ||name
*/
CREATE TABLE "domain" (
"did" int,
"name" text,
primary key ("did")
)
/*
1 example row:
SELECT * FROM domain LIMIT 1;
did ||name
*/
CREATE TABLE "domain_author" (
"aid" int,
"did" int,
primary key ("did", "aid"),
foreign key("aid") references `author`("aid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_author LIMIT 1;
aid ||did
*/
CREATE TABLE "domain_conference" (
"cid" int,
"did" int,
primary key ("did", "cid"),
foreign key("cid") references `conference`("cid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_conference LIMIT 1;
cid ||did
*/
CREATE TABLE "journal" (
"homepage" text,
"jid" int,
"name" text,
primary key("jid")
)
/*
1 example row:
SELECT * FROM journal LIMIT 1;
homepage ||jid ||name
*/
CREATE TABLE "domain_journal" (
"did" int,
"jid" int,
primary key ("did", "jid"),
foreign key("jid") references "journal"("jid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_journal LIMIT 1;
did ||jid
*/
CREATE TABLE "keyword" (
"keyword" text,
"kid" int,
primary key("kid")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
keyword ||kid
*/
CREATE TABLE "domain_keyword" (
"did" int,
"kid" int,
primary key ("did", "kid"),
foreign key("kid") references "keyword"("kid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_keyword LIMIT 1;
did ||kid
*/
CREATE TABLE "publication" (
"abstract" text,
"cid" text,
"citation_num" int,
"jid" int,
"pid" int,
"reference_num" int,
"title" text,
"year" int,
primary key("pid"),
foreign key("jid") references "journal"("jid"),
foreign key("cid") references "conference"("cid")
)
/*
1 example row:
SELECT * FROM publication LIMIT 1;
abstract ||cid ||citation_num ||jid ||pid ||reference_num ||title ||year
*/
CREATE TABLE "domain_publication" (
"did" int,
"pid" int,
primary key ("did", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_publication LIMIT 1;
did ||pid
*/
CREATE TABLE "organization" (
"continent" text,
"homepage" text,
"name" text,
"oid" int,
primary key("oid")
)
/*
1 example row:
SELECT * FROM organization LIMIT 1;
continent ||homepage ||name ||oid
*/
CREATE TABLE "publication_keyword" (
"pid" int,
"kid" int,
primary key ("kid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("kid") references "keyword"("kid")
)
/*
1 example row:
SELECT * FROM publication_keyword LIMIT 1;
pid ||kid
*/
CREATE TABLE "writes" (
"aid" int,
"pid" int,
primary key ("aid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("aid") references "author"("aid")
)
/*
1 example row:
SELECT * FROM writes LIMIT 1;
aid ||pid
*/
CREATE TABLE "cite" (
"cited" int,
"citing" int,
foreign key("cited") references "publication"("pid"),
foreign key("citing") references "publication"("pid")
)
/*
1 example row:
SELECT * FROM cite LIMIT 1;
cited ||citing
*/
### Question
return me the total citations of papers in the VLDB conference before 2005 .
|
[query_database(**{'query': 'SELECT SUM ( t2.citation_num ) FROM publication AS t2 JOIN conference AS t1 ON t2.cid = t1.cid WHERE t1.name = "VLDB" AND t2.year < 2005;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "author" (
"aid" int,
"homepage" text,
"name" text,
"oid" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM author LIMIT 1;
aid ||homepage ||name ||oid
*/
CREATE TABLE "conference" (
"cid" int,
"homepage" text,
"name" text,
primary key ("cid")
)
/*
1 example row:
SELECT * FROM conference LIMIT 1;
cid ||homepage ||name
*/
CREATE TABLE "domain" (
"did" int,
"name" text,
primary key ("did")
)
/*
1 example row:
SELECT * FROM domain LIMIT 1;
did ||name
*/
CREATE TABLE "domain_author" (
"aid" int,
"did" int,
primary key ("did", "aid"),
foreign key("aid") references `author`("aid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_author LIMIT 1;
aid ||did
*/
CREATE TABLE "domain_conference" (
"cid" int,
"did" int,
primary key ("did", "cid"),
foreign key("cid") references `conference`("cid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_conference LIMIT 1;
cid ||did
*/
CREATE TABLE "journal" (
"homepage" text,
"jid" int,
"name" text,
primary key("jid")
)
/*
1 example row:
SELECT * FROM journal LIMIT 1;
homepage ||jid ||name
*/
CREATE TABLE "domain_journal" (
"did" int,
"jid" int,
primary key ("did", "jid"),
foreign key("jid") references "journal"("jid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_journal LIMIT 1;
did ||jid
*/
CREATE TABLE "keyword" (
"keyword" text,
"kid" int,
primary key("kid")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
keyword ||kid
*/
CREATE TABLE "domain_keyword" (
"did" int,
"kid" int,
primary key ("did", "kid"),
foreign key("kid") references "keyword"("kid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_keyword LIMIT 1;
did ||kid
*/
CREATE TABLE "publication" (
"abstract" text,
"cid" text,
"citation_num" int,
"jid" int,
"pid" int,
"reference_num" int,
"title" text,
"year" int,
primary key("pid"),
foreign key("jid") references "journal"("jid"),
foreign key("cid") references "conference"("cid")
)
/*
1 example row:
SELECT * FROM publication LIMIT 1;
abstract ||cid ||citation_num ||jid ||pid ||reference_num ||title ||year
*/
CREATE TABLE "domain_publication" (
"did" int,
"pid" int,
primary key ("did", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_publication LIMIT 1;
did ||pid
*/
CREATE TABLE "organization" (
"continent" text,
"homepage" text,
"name" text,
"oid" int,
primary key("oid")
)
/*
1 example row:
SELECT * FROM organization LIMIT 1;
continent ||homepage ||name ||oid
*/
CREATE TABLE "publication_keyword" (
"pid" int,
"kid" int,
primary key ("kid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("kid") references "keyword"("kid")
)
/*
1 example row:
SELECT * FROM publication_keyword LIMIT 1;
pid ||kid
*/
CREATE TABLE "writes" (
"aid" int,
"pid" int,
primary key ("aid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("aid") references "author"("aid")
)
/*
1 example row:
SELECT * FROM writes LIMIT 1;
aid ||pid
*/
CREATE TABLE "cite" (
"cited" int,
"citing" int,
foreign key("cited") references "publication"("pid"),
foreign key("citing") references "publication"("pid")
)
/*
1 example row:
SELECT * FROM cite LIMIT 1;
cited ||citing
*/
|
1,375 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
3170,
1,
2456,
1,
3864,
1,
528,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
1,
590,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3229,
10592,
220,
16,
26,
4815,
12576,
1393,
53119,
1393,
609,
1393,
590,
33006,
6343,
23421,
14700,
330,
79590,
1,
2456,
1,
21200,
1,
528,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
6682,
1401,
3573,
21200,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10017,
10592,
220,
16,
26,
4815,
33241,
1393,
53119,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
1,
2456,
1,
23770,
1,
528,
345,
32586,
1,
1495,
345,
6682,
1401,
3573,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
10592,
220,
16,
26,
4815,
1550,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
23790,
1,
2456,
1,
3864,
1,
528,
11,
720,
1,
23770,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
3864,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
3170,
63,
446,
3864,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
12482,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
23790,
10592,
220,
16,
26,
4815,
12576,
1393,
23770,
33006,
6343,
23421,
14700,
330,
12482,
3464,
2251,
1,
2456,
1,
21200,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
21200,
4561,
29543,
1401,
446,
21200,
909,
15407,
1595,
79590,
63,
446,
21200,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
12482,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
3464,
2251,
10592,
220,
16,
26,
4815,
33241,
1393,
23770,
33006,
6343,
23421,
14700,
330,
43618,
1,
2456,
1,
53119,
1,
1495,
345,
1,
73976,
1,
528,
345,
32586,
1,
1495,
345,
6682,
1401,
446,
73976,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8486,
10592,
220,
16,
26,
4815,
35689,
1393,
73976,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
86175,
1,
2456,
1,
23770,
1,
528,
345,
1,
73976,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
73976,
4561,
29543,
1401,
446,
73976,
909,
15407,
330,
43618,
1,
446,
73976,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
86175,
10592,
220,
16,
26,
4815,
1550,
1393,
73976,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
1,
20454,
1,
1495,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
16570,
1393,
64381,
33006,
6343,
23421,
14700,
330,
12482,
46924,
1,
2456,
1,
23770,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
64381,
4561,
29543,
1401,
446,
64381,
909,
15407,
330,
20454,
1,
446,
64381,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
46924,
10592,
220,
16,
26,
4815,
1550,
1393,
64381,
33006,
6343,
23421,
14700,
330,
72260,
1,
2456,
1,
16647,
1,
1495,
345,
1,
21200,
1,
1495,
345,
1,
84247,
4369,
1,
528,
345,
1,
73976,
1,
528,
345,
1,
10629,
1,
528,
345,
1,
16690,
4369,
1,
528,
345,
83827,
1,
1495,
345,
1,
3236,
1,
528,
345,
6682,
1401,
446,
10629,
4561,
29543,
1401,
446,
73976,
909,
15407,
330,
43618,
1,
446,
73976,
4561,
29543,
1401,
446,
21200,
909,
15407,
330,
79590,
1,
446,
21200,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17009,
10592,
220,
16,
26,
4815,
8278,
1393,
21200,
1393,
84247,
4369,
1393,
73976,
1393,
10629,
1393,
16690,
4369,
1393,
2150,
1393,
3236,
33006,
6343,
23421,
14700,
330,
12482,
28173,
367,
1,
2456,
1,
23770,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
28173,
367,
10592,
220,
16,
26,
4815,
1550,
1393,
10629,
33006,
6343,
23421,
14700,
330,
24844,
1,
2456,
1,
75695,
1,
1495,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
1,
590,
1,
528,
345,
6682,
1401,
446,
590,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7471,
10592,
220,
16,
26,
4815,
32843,
1393,
53119,
1393,
609,
1393,
590,
33006,
6343,
23421,
14700,
330,
72260,
46924,
1,
2456,
1,
10629,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
3573,
64381,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
64381,
909,
15407,
330,
20454,
1,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17009,
46924,
10592,
220,
16,
26,
4815,
15158,
1393,
64381,
33006,
6343,
23421,
14700,
330,
60179,
1,
2456,
1,
3864,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
3573,
3864,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
3864,
909,
15407,
330,
3170,
1,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
14238,
10592,
220,
16,
26,
4815,
12576,
1393,
10629,
33006,
6343,
23421,
14700,
330,
68175,
1,
2456,
98046,
1639,
1,
528,
345,
98046,
5977,
1,
220,
528,
345,
29543,
1401,
446,
66,
1639,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
66,
5977,
909,
15407,
330,
72260,
1,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
39396,
10592,
220,
16,
26,
4815,
22628,
1393,
66,
5977,
33006,
6343,
14711,
16225,
198,
693,
757,
279,
12283,
889,
617,
22415,
660,
449,
330,
473,
13,
650,
13,
30511,
329,
819,
330,
1306,
220,
1049,
15,
662,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
2710,
4393,
14238,
5871,
259,
18,
13369,
3229,
5871,
259,
17,
6328,
259,
18,
13,
3864,
220,
284,
220,
259,
17,
13,
3864,
13369,
17009,
5871,
259,
20,
6328,
259,
18,
42039,
220,
284,
220,
259,
20,
42039,
13369,
14238,
5871,
259,
19,
6328,
259,
19,
42039,
220,
284,
220,
259,
20,
42039,
13369,
3229,
5871,
259,
16,
6328,
259,
19,
13,
3864,
220,
284,
220,
259,
16,
13,
3864,
5401,
259,
16,
2710,
220,
284,
220,
330,
39,
13,
650,
13,
30511,
329,
819,
1,
3651,
259,
20,
25418,
220,
871,
220,
220,
1049,
15,
37094,
5525,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
2710,
4393,
14238,
5871,
259,
18,
13369,
3229,
5871,
259,
17,
6328,
259,
18,
13,
3864,
220,
284,
220,
259,
17,
13,
3864,
13369,
17009,
5871,
259,
20,
6328,
259,
18,
42039,
220,
284,
220,
259,
20,
42039,
13369,
14238,
5871,
259,
19,
6328,
259,
19,
42039,
220,
284,
220,
259,
20,
42039,
13369,
3229,
5871,
259,
16,
6328,
259,
19,
13,
3864,
220,
284,
220,
259,
16,
13,
3864,
5401,
259,
16,
2710,
220,
284,
220,
330,
39,
13,
650,
13,
30511,
329,
819,
1,
3651,
259,
20,
25418,
220,
871,
220,
220,
1049,
15,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "author" (
"aid" int,
"homepage" text,
"name" text,
"oid" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM author LIMIT 1;
aid ||homepage ||name ||oid
*/
CREATE TABLE "conference" (
"cid" int,
"homepage" text,
"name" text,
primary key ("cid")
)
/*
1 example row:
SELECT * FROM conference LIMIT 1;
cid ||homepage ||name
*/
CREATE TABLE "domain" (
"did" int,
"name" text,
primary key ("did")
)
/*
1 example row:
SELECT * FROM domain LIMIT 1;
did ||name
*/
CREATE TABLE "domain_author" (
"aid" int,
"did" int,
primary key ("did", "aid"),
foreign key("aid") references `author`("aid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_author LIMIT 1;
aid ||did
*/
CREATE TABLE "domain_conference" (
"cid" int,
"did" int,
primary key ("did", "cid"),
foreign key("cid") references `conference`("cid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_conference LIMIT 1;
cid ||did
*/
CREATE TABLE "journal" (
"homepage" text,
"jid" int,
"name" text,
primary key("jid")
)
/*
1 example row:
SELECT * FROM journal LIMIT 1;
homepage ||jid ||name
*/
CREATE TABLE "domain_journal" (
"did" int,
"jid" int,
primary key ("did", "jid"),
foreign key("jid") references "journal"("jid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_journal LIMIT 1;
did ||jid
*/
CREATE TABLE "keyword" (
"keyword" text,
"kid" int,
primary key("kid")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
keyword ||kid
*/
CREATE TABLE "domain_keyword" (
"did" int,
"kid" int,
primary key ("did", "kid"),
foreign key("kid") references "keyword"("kid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_keyword LIMIT 1;
did ||kid
*/
CREATE TABLE "publication" (
"abstract" text,
"cid" text,
"citation_num" int,
"jid" int,
"pid" int,
"reference_num" int,
"title" text,
"year" int,
primary key("pid"),
foreign key("jid") references "journal"("jid"),
foreign key("cid") references "conference"("cid")
)
/*
1 example row:
SELECT * FROM publication LIMIT 1;
abstract ||cid ||citation_num ||jid ||pid ||reference_num ||title ||year
*/
CREATE TABLE "domain_publication" (
"did" int,
"pid" int,
primary key ("did", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_publication LIMIT 1;
did ||pid
*/
CREATE TABLE "organization" (
"continent" text,
"homepage" text,
"name" text,
"oid" int,
primary key("oid")
)
/*
1 example row:
SELECT * FROM organization LIMIT 1;
continent ||homepage ||name ||oid
*/
CREATE TABLE "publication_keyword" (
"pid" int,
"kid" int,
primary key ("kid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("kid") references "keyword"("kid")
)
/*
1 example row:
SELECT * FROM publication_keyword LIMIT 1;
pid ||kid
*/
CREATE TABLE "writes" (
"aid" int,
"pid" int,
primary key ("aid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("aid") references "author"("aid")
)
/*
1 example row:
SELECT * FROM writes LIMIT 1;
aid ||pid
*/
CREATE TABLE "cite" (
"cited" int,
"citing" int,
foreign key("cited") references "publication"("pid"),
foreign key("citing") references "publication"("pid")
)
/*
1 example row:
SELECT * FROM cite LIMIT 1;
cited ||citing
*/
### Question
return me the authors who have cooperated with " H. V. Jagadish " after 2000 .
|
[query_database(**{'query': 'SELECT t2.name FROM writes AS t3 JOIN author AS t2 ON t3.aid = t2.aid JOIN publication AS t5 ON t3.pid = t5.pid JOIN writes AS t4 ON t4.pid = t5.pid JOIN author AS t1 ON t4.aid = t1.aid WHERE t1.name = "H. V. Jagadish" AND t5.year > 2000;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "author" (
"aid" int,
"homepage" text,
"name" text,
"oid" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM author LIMIT 1;
aid ||homepage ||name ||oid
*/
CREATE TABLE "conference" (
"cid" int,
"homepage" text,
"name" text,
primary key ("cid")
)
/*
1 example row:
SELECT * FROM conference LIMIT 1;
cid ||homepage ||name
*/
CREATE TABLE "domain" (
"did" int,
"name" text,
primary key ("did")
)
/*
1 example row:
SELECT * FROM domain LIMIT 1;
did ||name
*/
CREATE TABLE "domain_author" (
"aid" int,
"did" int,
primary key ("did", "aid"),
foreign key("aid") references `author`("aid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_author LIMIT 1;
aid ||did
*/
CREATE TABLE "domain_conference" (
"cid" int,
"did" int,
primary key ("did", "cid"),
foreign key("cid") references `conference`("cid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_conference LIMIT 1;
cid ||did
*/
CREATE TABLE "journal" (
"homepage" text,
"jid" int,
"name" text,
primary key("jid")
)
/*
1 example row:
SELECT * FROM journal LIMIT 1;
homepage ||jid ||name
*/
CREATE TABLE "domain_journal" (
"did" int,
"jid" int,
primary key ("did", "jid"),
foreign key("jid") references "journal"("jid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_journal LIMIT 1;
did ||jid
*/
CREATE TABLE "keyword" (
"keyword" text,
"kid" int,
primary key("kid")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
keyword ||kid
*/
CREATE TABLE "domain_keyword" (
"did" int,
"kid" int,
primary key ("did", "kid"),
foreign key("kid") references "keyword"("kid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_keyword LIMIT 1;
did ||kid
*/
CREATE TABLE "publication" (
"abstract" text,
"cid" text,
"citation_num" int,
"jid" int,
"pid" int,
"reference_num" int,
"title" text,
"year" int,
primary key("pid"),
foreign key("jid") references "journal"("jid"),
foreign key("cid") references "conference"("cid")
)
/*
1 example row:
SELECT * FROM publication LIMIT 1;
abstract ||cid ||citation_num ||jid ||pid ||reference_num ||title ||year
*/
CREATE TABLE "domain_publication" (
"did" int,
"pid" int,
primary key ("did", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_publication LIMIT 1;
did ||pid
*/
CREATE TABLE "organization" (
"continent" text,
"homepage" text,
"name" text,
"oid" int,
primary key("oid")
)
/*
1 example row:
SELECT * FROM organization LIMIT 1;
continent ||homepage ||name ||oid
*/
CREATE TABLE "publication_keyword" (
"pid" int,
"kid" int,
primary key ("kid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("kid") references "keyword"("kid")
)
/*
1 example row:
SELECT * FROM publication_keyword LIMIT 1;
pid ||kid
*/
CREATE TABLE "writes" (
"aid" int,
"pid" int,
primary key ("aid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("aid") references "author"("aid")
)
/*
1 example row:
SELECT * FROM writes LIMIT 1;
aid ||pid
*/
CREATE TABLE "cite" (
"cited" int,
"citing" int,
foreign key("cited") references "publication"("pid"),
foreign key("citing") references "publication"("pid")
)
/*
1 example row:
SELECT * FROM cite LIMIT 1;
cited ||citing
*/
|
1,379 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
3170,
1,
2456,
1,
3864,
1,
528,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
1,
590,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3229,
10592,
220,
16,
26,
4815,
12576,
1393,
53119,
1393,
609,
1393,
590,
33006,
6343,
23421,
14700,
330,
79590,
1,
2456,
1,
21200,
1,
528,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
6682,
1401,
3573,
21200,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10017,
10592,
220,
16,
26,
4815,
33241,
1393,
53119,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
1,
2456,
1,
23770,
1,
528,
345,
32586,
1,
1495,
345,
6682,
1401,
3573,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
10592,
220,
16,
26,
4815,
1550,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
23790,
1,
2456,
1,
3864,
1,
528,
11,
720,
1,
23770,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
3864,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
3170,
63,
446,
3864,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
12482,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
23790,
10592,
220,
16,
26,
4815,
12576,
1393,
23770,
33006,
6343,
23421,
14700,
330,
12482,
3464,
2251,
1,
2456,
1,
21200,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
21200,
4561,
29543,
1401,
446,
21200,
909,
15407,
1595,
79590,
63,
446,
21200,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
12482,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
3464,
2251,
10592,
220,
16,
26,
4815,
33241,
1393,
23770,
33006,
6343,
23421,
14700,
330,
43618,
1,
2456,
1,
53119,
1,
1495,
345,
1,
73976,
1,
528,
345,
32586,
1,
1495,
345,
6682,
1401,
446,
73976,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8486,
10592,
220,
16,
26,
4815,
35689,
1393,
73976,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
86175,
1,
2456,
1,
23770,
1,
528,
345,
1,
73976,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
73976,
4561,
29543,
1401,
446,
73976,
909,
15407,
330,
43618,
1,
446,
73976,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
86175,
10592,
220,
16,
26,
4815,
1550,
1393,
73976,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
1,
20454,
1,
1495,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
16570,
1393,
64381,
33006,
6343,
23421,
14700,
330,
12482,
46924,
1,
2456,
1,
23770,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
64381,
4561,
29543,
1401,
446,
64381,
909,
15407,
330,
20454,
1,
446,
64381,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
46924,
10592,
220,
16,
26,
4815,
1550,
1393,
64381,
33006,
6343,
23421,
14700,
330,
72260,
1,
2456,
1,
16647,
1,
1495,
345,
1,
21200,
1,
1495,
345,
1,
84247,
4369,
1,
528,
345,
1,
73976,
1,
528,
345,
1,
10629,
1,
528,
345,
1,
16690,
4369,
1,
528,
345,
83827,
1,
1495,
345,
1,
3236,
1,
528,
345,
6682,
1401,
446,
10629,
4561,
29543,
1401,
446,
73976,
909,
15407,
330,
43618,
1,
446,
73976,
4561,
29543,
1401,
446,
21200,
909,
15407,
330,
79590,
1,
446,
21200,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17009,
10592,
220,
16,
26,
4815,
8278,
1393,
21200,
1393,
84247,
4369,
1393,
73976,
1393,
10629,
1393,
16690,
4369,
1393,
2150,
1393,
3236,
33006,
6343,
23421,
14700,
330,
12482,
28173,
367,
1,
2456,
1,
23770,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
28173,
367,
10592,
220,
16,
26,
4815,
1550,
1393,
10629,
33006,
6343,
23421,
14700,
330,
24844,
1,
2456,
1,
75695,
1,
1495,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
1,
590,
1,
528,
345,
6682,
1401,
446,
590,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7471,
10592,
220,
16,
26,
4815,
32843,
1393,
53119,
1393,
609,
1393,
590,
33006,
6343,
23421,
14700,
330,
72260,
46924,
1,
2456,
1,
10629,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
3573,
64381,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
64381,
909,
15407,
330,
20454,
1,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17009,
46924,
10592,
220,
16,
26,
4815,
15158,
1393,
64381,
33006,
6343,
23421,
14700,
330,
60179,
1,
2456,
1,
3864,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
3573,
3864,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
3864,
909,
15407,
330,
3170,
1,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
14238,
10592,
220,
16,
26,
4815,
12576,
1393,
10629,
33006,
6343,
23421,
14700,
330,
68175,
1,
2456,
98046,
1639,
1,
528,
345,
98046,
5977,
1,
220,
528,
345,
29543,
1401,
446,
66,
1639,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
66,
5977,
909,
15407,
330,
72260,
1,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
39396,
10592,
220,
16,
26,
4815,
22628,
1393,
66,
5977,
33006,
6343,
14711,
16225,
198,
693,
757,
279,
16064,
5439,
555,
330,
473,
13,
650,
13,
30511,
329,
819,
330,
323,
330,
55092,
88,
3524,
14851,
330,
389,
393,
31798,
3590,
1306,
220,
1049,
20,
662,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
21,
6195,
4393,
17009,
5871,
259,
21,
13369,
8486,
5871,
259,
19,
6328,
259,
21,
1190,
307,
220,
284,
220,
259,
19,
1190,
307,
13369,
14238,
5871,
259,
18,
6328,
259,
18,
42039,
220,
284,
220,
259,
21,
42039,
13369,
14238,
5871,
259,
20,
6328,
259,
20,
42039,
220,
284,
220,
259,
21,
42039,
13369,
3229,
5871,
259,
16,
6328,
259,
20,
13,
3864,
220,
284,
220,
259,
16,
13,
3864,
13369,
3229,
5871,
259,
17,
6328,
259,
18,
13,
3864,
220,
284,
220,
259,
17,
13,
3864,
5401,
259,
17,
2710,
220,
284,
220,
330,
39,
13,
650,
13,
30511,
329,
819,
1,
3651,
259,
16,
2710,
220,
284,
220,
330,
56,
359,
88,
3524,
14851,
1,
3651,
259,
19,
2710,
220,
284,
220,
330,
47,
31798,
3590,
1,
3651,
259,
21,
25418,
220,
871,
220,
220,
1049,
20,
37094,
5525,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
21,
6195,
4393,
17009,
5871,
259,
21,
13369,
8486,
5871,
259,
19,
6328,
259,
21,
1190,
307,
220,
284,
220,
259,
19,
1190,
307,
13369,
14238,
5871,
259,
18,
6328,
259,
18,
42039,
220,
284,
220,
259,
21,
42039,
13369,
14238,
5871,
259,
20,
6328,
259,
20,
42039,
220,
284,
220,
259,
21,
42039,
13369,
3229,
5871,
259,
16,
6328,
259,
20,
13,
3864,
220,
284,
220,
259,
16,
13,
3864,
13369,
3229,
5871,
259,
17,
6328,
259,
18,
13,
3864,
220,
284,
220,
259,
17,
13,
3864,
5401,
259,
17,
2710,
220,
284,
220,
330,
39,
13,
650,
13,
30511,
329,
819,
1,
3651,
259,
16,
2710,
220,
284,
220,
330,
56,
359,
88,
3524,
14851,
1,
3651,
259,
19,
2710,
220,
284,
220,
330,
47,
31798,
3590,
1,
3651,
259,
21,
25418,
220,
871,
220,
220,
1049,
20,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "author" (
"aid" int,
"homepage" text,
"name" text,
"oid" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM author LIMIT 1;
aid ||homepage ||name ||oid
*/
CREATE TABLE "conference" (
"cid" int,
"homepage" text,
"name" text,
primary key ("cid")
)
/*
1 example row:
SELECT * FROM conference LIMIT 1;
cid ||homepage ||name
*/
CREATE TABLE "domain" (
"did" int,
"name" text,
primary key ("did")
)
/*
1 example row:
SELECT * FROM domain LIMIT 1;
did ||name
*/
CREATE TABLE "domain_author" (
"aid" int,
"did" int,
primary key ("did", "aid"),
foreign key("aid") references `author`("aid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_author LIMIT 1;
aid ||did
*/
CREATE TABLE "domain_conference" (
"cid" int,
"did" int,
primary key ("did", "cid"),
foreign key("cid") references `conference`("cid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_conference LIMIT 1;
cid ||did
*/
CREATE TABLE "journal" (
"homepage" text,
"jid" int,
"name" text,
primary key("jid")
)
/*
1 example row:
SELECT * FROM journal LIMIT 1;
homepage ||jid ||name
*/
CREATE TABLE "domain_journal" (
"did" int,
"jid" int,
primary key ("did", "jid"),
foreign key("jid") references "journal"("jid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_journal LIMIT 1;
did ||jid
*/
CREATE TABLE "keyword" (
"keyword" text,
"kid" int,
primary key("kid")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
keyword ||kid
*/
CREATE TABLE "domain_keyword" (
"did" int,
"kid" int,
primary key ("did", "kid"),
foreign key("kid") references "keyword"("kid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_keyword LIMIT 1;
did ||kid
*/
CREATE TABLE "publication" (
"abstract" text,
"cid" text,
"citation_num" int,
"jid" int,
"pid" int,
"reference_num" int,
"title" text,
"year" int,
primary key("pid"),
foreign key("jid") references "journal"("jid"),
foreign key("cid") references "conference"("cid")
)
/*
1 example row:
SELECT * FROM publication LIMIT 1;
abstract ||cid ||citation_num ||jid ||pid ||reference_num ||title ||year
*/
CREATE TABLE "domain_publication" (
"did" int,
"pid" int,
primary key ("did", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_publication LIMIT 1;
did ||pid
*/
CREATE TABLE "organization" (
"continent" text,
"homepage" text,
"name" text,
"oid" int,
primary key("oid")
)
/*
1 example row:
SELECT * FROM organization LIMIT 1;
continent ||homepage ||name ||oid
*/
CREATE TABLE "publication_keyword" (
"pid" int,
"kid" int,
primary key ("kid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("kid") references "keyword"("kid")
)
/*
1 example row:
SELECT * FROM publication_keyword LIMIT 1;
pid ||kid
*/
CREATE TABLE "writes" (
"aid" int,
"pid" int,
primary key ("aid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("aid") references "author"("aid")
)
/*
1 example row:
SELECT * FROM writes LIMIT 1;
aid ||pid
*/
CREATE TABLE "cite" (
"cited" int,
"citing" int,
foreign key("cited") references "publication"("pid"),
foreign key("citing") references "publication"("pid")
)
/*
1 example row:
SELECT * FROM cite LIMIT 1;
cited ||citing
*/
### Question
return me the papers written by " H. V. Jagadish " and " Yunyao Li " on PVLDB after 2005 .
|
[query_database(**{'query': 'SELECT t6.title FROM publication AS t6 JOIN journal AS t4 ON t6.jid = t4.jid JOIN writes AS t3 ON t3.pid = t6.pid JOIN writes AS t5 ON t5.pid = t6.pid JOIN author AS t1 ON t5.aid = t1.aid JOIN author AS t2 ON t3.aid = t2.aid WHERE t2.name = "H. V. Jagadish" AND t1.name = "Yunyao Li" AND t4.name = "PVLDB" AND t6.year > 2005;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "author" (
"aid" int,
"homepage" text,
"name" text,
"oid" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM author LIMIT 1;
aid ||homepage ||name ||oid
*/
CREATE TABLE "conference" (
"cid" int,
"homepage" text,
"name" text,
primary key ("cid")
)
/*
1 example row:
SELECT * FROM conference LIMIT 1;
cid ||homepage ||name
*/
CREATE TABLE "domain" (
"did" int,
"name" text,
primary key ("did")
)
/*
1 example row:
SELECT * FROM domain LIMIT 1;
did ||name
*/
CREATE TABLE "domain_author" (
"aid" int,
"did" int,
primary key ("did", "aid"),
foreign key("aid") references `author`("aid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_author LIMIT 1;
aid ||did
*/
CREATE TABLE "domain_conference" (
"cid" int,
"did" int,
primary key ("did", "cid"),
foreign key("cid") references `conference`("cid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_conference LIMIT 1;
cid ||did
*/
CREATE TABLE "journal" (
"homepage" text,
"jid" int,
"name" text,
primary key("jid")
)
/*
1 example row:
SELECT * FROM journal LIMIT 1;
homepage ||jid ||name
*/
CREATE TABLE "domain_journal" (
"did" int,
"jid" int,
primary key ("did", "jid"),
foreign key("jid") references "journal"("jid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_journal LIMIT 1;
did ||jid
*/
CREATE TABLE "keyword" (
"keyword" text,
"kid" int,
primary key("kid")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
keyword ||kid
*/
CREATE TABLE "domain_keyword" (
"did" int,
"kid" int,
primary key ("did", "kid"),
foreign key("kid") references "keyword"("kid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_keyword LIMIT 1;
did ||kid
*/
CREATE TABLE "publication" (
"abstract" text,
"cid" text,
"citation_num" int,
"jid" int,
"pid" int,
"reference_num" int,
"title" text,
"year" int,
primary key("pid"),
foreign key("jid") references "journal"("jid"),
foreign key("cid") references "conference"("cid")
)
/*
1 example row:
SELECT * FROM publication LIMIT 1;
abstract ||cid ||citation_num ||jid ||pid ||reference_num ||title ||year
*/
CREATE TABLE "domain_publication" (
"did" int,
"pid" int,
primary key ("did", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_publication LIMIT 1;
did ||pid
*/
CREATE TABLE "organization" (
"continent" text,
"homepage" text,
"name" text,
"oid" int,
primary key("oid")
)
/*
1 example row:
SELECT * FROM organization LIMIT 1;
continent ||homepage ||name ||oid
*/
CREATE TABLE "publication_keyword" (
"pid" int,
"kid" int,
primary key ("kid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("kid") references "keyword"("kid")
)
/*
1 example row:
SELECT * FROM publication_keyword LIMIT 1;
pid ||kid
*/
CREATE TABLE "writes" (
"aid" int,
"pid" int,
primary key ("aid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("aid") references "author"("aid")
)
/*
1 example row:
SELECT * FROM writes LIMIT 1;
aid ||pid
*/
CREATE TABLE "cite" (
"cited" int,
"citing" int,
foreign key("cited") references "publication"("pid"),
foreign key("citing") references "publication"("pid")
)
/*
1 example row:
SELECT * FROM cite LIMIT 1;
cited ||citing
*/
|
1,383 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
3170,
1,
2456,
1,
3864,
1,
528,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
1,
590,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3229,
10592,
220,
16,
26,
4815,
12576,
1393,
53119,
1393,
609,
1393,
590,
33006,
6343,
23421,
14700,
330,
79590,
1,
2456,
1,
21200,
1,
528,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
6682,
1401,
3573,
21200,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10017,
10592,
220,
16,
26,
4815,
33241,
1393,
53119,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
1,
2456,
1,
23770,
1,
528,
345,
32586,
1,
1495,
345,
6682,
1401,
3573,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
10592,
220,
16,
26,
4815,
1550,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
23790,
1,
2456,
1,
3864,
1,
528,
11,
720,
1,
23770,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
3864,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
3170,
63,
446,
3864,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
12482,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
23790,
10592,
220,
16,
26,
4815,
12576,
1393,
23770,
33006,
6343,
23421,
14700,
330,
12482,
3464,
2251,
1,
2456,
1,
21200,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
21200,
4561,
29543,
1401,
446,
21200,
909,
15407,
1595,
79590,
63,
446,
21200,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
12482,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
3464,
2251,
10592,
220,
16,
26,
4815,
33241,
1393,
23770,
33006,
6343,
23421,
14700,
330,
43618,
1,
2456,
1,
53119,
1,
1495,
345,
1,
73976,
1,
528,
345,
32586,
1,
1495,
345,
6682,
1401,
446,
73976,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8486,
10592,
220,
16,
26,
4815,
35689,
1393,
73976,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
86175,
1,
2456,
1,
23770,
1,
528,
345,
1,
73976,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
73976,
4561,
29543,
1401,
446,
73976,
909,
15407,
330,
43618,
1,
446,
73976,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
86175,
10592,
220,
16,
26,
4815,
1550,
1393,
73976,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
1,
20454,
1,
1495,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
16570,
1393,
64381,
33006,
6343,
23421,
14700,
330,
12482,
46924,
1,
2456,
1,
23770,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
64381,
4561,
29543,
1401,
446,
64381,
909,
15407,
330,
20454,
1,
446,
64381,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
46924,
10592,
220,
16,
26,
4815,
1550,
1393,
64381,
33006,
6343,
23421,
14700,
330,
72260,
1,
2456,
1,
16647,
1,
1495,
345,
1,
21200,
1,
1495,
345,
1,
84247,
4369,
1,
528,
345,
1,
73976,
1,
528,
345,
1,
10629,
1,
528,
345,
1,
16690,
4369,
1,
528,
345,
83827,
1,
1495,
345,
1,
3236,
1,
528,
345,
6682,
1401,
446,
10629,
4561,
29543,
1401,
446,
73976,
909,
15407,
330,
43618,
1,
446,
73976,
4561,
29543,
1401,
446,
21200,
909,
15407,
330,
79590,
1,
446,
21200,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17009,
10592,
220,
16,
26,
4815,
8278,
1393,
21200,
1393,
84247,
4369,
1393,
73976,
1393,
10629,
1393,
16690,
4369,
1393,
2150,
1393,
3236,
33006,
6343,
23421,
14700,
330,
12482,
28173,
367,
1,
2456,
1,
23770,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
28173,
367,
10592,
220,
16,
26,
4815,
1550,
1393,
10629,
33006,
6343,
23421,
14700,
330,
24844,
1,
2456,
1,
75695,
1,
1495,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
1,
590,
1,
528,
345,
6682,
1401,
446,
590,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7471,
10592,
220,
16,
26,
4815,
32843,
1393,
53119,
1393,
609,
1393,
590,
33006,
6343,
23421,
14700,
330,
72260,
46924,
1,
2456,
1,
10629,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
3573,
64381,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
64381,
909,
15407,
330,
20454,
1,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17009,
46924,
10592,
220,
16,
26,
4815,
15158,
1393,
64381,
33006,
6343,
23421,
14700,
330,
60179,
1,
2456,
1,
3864,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
3573,
3864,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
3864,
909,
15407,
330,
3170,
1,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
14238,
10592,
220,
16,
26,
4815,
12576,
1393,
10629,
33006,
6343,
23421,
14700,
330,
68175,
1,
2456,
98046,
1639,
1,
528,
345,
98046,
5977,
1,
220,
528,
345,
29543,
1401,
446,
66,
1639,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
66,
5977,
909,
15407,
330,
72260,
1,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
39396,
10592,
220,
16,
26,
4815,
22628,
1393,
66,
5977,
33006,
6343,
14711,
16225,
198,
693,
757,
279,
1396,
315,
16064,
5439,
555,
330,
473,
13,
650,
13,
30511,
329,
819,
330,
323,
330,
423,
1924,
71,
34688,
344,
561,
2979,
330,
662,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
24945,
320,
60186,
259,
20,
6195,
883,
4393,
14238,
5871,
259,
18,
13369,
3229,
5871,
259,
17,
6328,
259,
18,
13,
3864,
220,
284,
220,
259,
17,
13,
3864,
13369,
17009,
5871,
259,
20,
6328,
259,
18,
42039,
220,
284,
220,
259,
20,
42039,
13369,
14238,
5871,
259,
19,
6328,
259,
19,
42039,
220,
284,
220,
259,
20,
42039,
13369,
3229,
5871,
259,
16,
6328,
259,
19,
13,
3864,
220,
284,
220,
259,
16,
13,
3864,
5401,
259,
17,
2710,
220,
284,
220,
330,
39,
13,
650,
13,
30511,
329,
819,
1,
3651,
259,
16,
2710,
220,
284,
220,
330,
35,
1924,
71,
34688,
344,
561,
2979,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
24945,
320,
60186,
259,
20,
6195,
883,
4393,
14238,
5871,
259,
18,
13369,
3229,
5871,
259,
17,
6328,
259,
18,
13,
3864,
220,
284,
220,
259,
17,
13,
3864,
13369,
17009,
5871,
259,
20,
6328,
259,
18,
42039,
220,
284,
220,
259,
20,
42039,
13369,
14238,
5871,
259,
19,
6328,
259,
19,
42039,
220,
284,
220,
259,
20,
42039,
13369,
3229,
5871,
259,
16,
6328,
259,
19,
13,
3864,
220,
284,
220,
259,
16,
13,
3864,
5401,
259,
17,
2710,
220,
284,
220,
330,
39,
13,
650,
13,
30511,
329,
819,
1,
3651,
259,
16,
2710,
220,
284,
220,
330,
35,
1924,
71,
34688,
344,
561,
2979,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "author" (
"aid" int,
"homepage" text,
"name" text,
"oid" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM author LIMIT 1;
aid ||homepage ||name ||oid
*/
CREATE TABLE "conference" (
"cid" int,
"homepage" text,
"name" text,
primary key ("cid")
)
/*
1 example row:
SELECT * FROM conference LIMIT 1;
cid ||homepage ||name
*/
CREATE TABLE "domain" (
"did" int,
"name" text,
primary key ("did")
)
/*
1 example row:
SELECT * FROM domain LIMIT 1;
did ||name
*/
CREATE TABLE "domain_author" (
"aid" int,
"did" int,
primary key ("did", "aid"),
foreign key("aid") references `author`("aid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_author LIMIT 1;
aid ||did
*/
CREATE TABLE "domain_conference" (
"cid" int,
"did" int,
primary key ("did", "cid"),
foreign key("cid") references `conference`("cid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_conference LIMIT 1;
cid ||did
*/
CREATE TABLE "journal" (
"homepage" text,
"jid" int,
"name" text,
primary key("jid")
)
/*
1 example row:
SELECT * FROM journal LIMIT 1;
homepage ||jid ||name
*/
CREATE TABLE "domain_journal" (
"did" int,
"jid" int,
primary key ("did", "jid"),
foreign key("jid") references "journal"("jid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_journal LIMIT 1;
did ||jid
*/
CREATE TABLE "keyword" (
"keyword" text,
"kid" int,
primary key("kid")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
keyword ||kid
*/
CREATE TABLE "domain_keyword" (
"did" int,
"kid" int,
primary key ("did", "kid"),
foreign key("kid") references "keyword"("kid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_keyword LIMIT 1;
did ||kid
*/
CREATE TABLE "publication" (
"abstract" text,
"cid" text,
"citation_num" int,
"jid" int,
"pid" int,
"reference_num" int,
"title" text,
"year" int,
primary key("pid"),
foreign key("jid") references "journal"("jid"),
foreign key("cid") references "conference"("cid")
)
/*
1 example row:
SELECT * FROM publication LIMIT 1;
abstract ||cid ||citation_num ||jid ||pid ||reference_num ||title ||year
*/
CREATE TABLE "domain_publication" (
"did" int,
"pid" int,
primary key ("did", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_publication LIMIT 1;
did ||pid
*/
CREATE TABLE "organization" (
"continent" text,
"homepage" text,
"name" text,
"oid" int,
primary key("oid")
)
/*
1 example row:
SELECT * FROM organization LIMIT 1;
continent ||homepage ||name ||oid
*/
CREATE TABLE "publication_keyword" (
"pid" int,
"kid" int,
primary key ("kid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("kid") references "keyword"("kid")
)
/*
1 example row:
SELECT * FROM publication_keyword LIMIT 1;
pid ||kid
*/
CREATE TABLE "writes" (
"aid" int,
"pid" int,
primary key ("aid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("aid") references "author"("aid")
)
/*
1 example row:
SELECT * FROM writes LIMIT 1;
aid ||pid
*/
CREATE TABLE "cite" (
"cited" int,
"citing" int,
foreign key("cited") references "publication"("pid"),
foreign key("citing") references "publication"("pid")
)
/*
1 example row:
SELECT * FROM cite LIMIT 1;
cited ||citing
*/
### Question
return me the number of papers written by " H. V. Jagadish " and " Divesh Srivastava " .
|
[query_database(**{'query': 'SELECT COUNT ( DISTINCT t5.title ) FROM writes AS t3 JOIN author AS t2 ON t3.aid = t2.aid JOIN publication AS t5 ON t3.pid = t5.pid JOIN writes AS t4 ON t4.pid = t5.pid JOIN author AS t1 ON t4.aid = t1.aid WHERE t2.name = "H. V. Jagadish" AND t1.name = "Divesh Srivastava";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "author" (
"aid" int,
"homepage" text,
"name" text,
"oid" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM author LIMIT 1;
aid ||homepage ||name ||oid
*/
CREATE TABLE "conference" (
"cid" int,
"homepage" text,
"name" text,
primary key ("cid")
)
/*
1 example row:
SELECT * FROM conference LIMIT 1;
cid ||homepage ||name
*/
CREATE TABLE "domain" (
"did" int,
"name" text,
primary key ("did")
)
/*
1 example row:
SELECT * FROM domain LIMIT 1;
did ||name
*/
CREATE TABLE "domain_author" (
"aid" int,
"did" int,
primary key ("did", "aid"),
foreign key("aid") references `author`("aid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_author LIMIT 1;
aid ||did
*/
CREATE TABLE "domain_conference" (
"cid" int,
"did" int,
primary key ("did", "cid"),
foreign key("cid") references `conference`("cid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_conference LIMIT 1;
cid ||did
*/
CREATE TABLE "journal" (
"homepage" text,
"jid" int,
"name" text,
primary key("jid")
)
/*
1 example row:
SELECT * FROM journal LIMIT 1;
homepage ||jid ||name
*/
CREATE TABLE "domain_journal" (
"did" int,
"jid" int,
primary key ("did", "jid"),
foreign key("jid") references "journal"("jid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_journal LIMIT 1;
did ||jid
*/
CREATE TABLE "keyword" (
"keyword" text,
"kid" int,
primary key("kid")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
keyword ||kid
*/
CREATE TABLE "domain_keyword" (
"did" int,
"kid" int,
primary key ("did", "kid"),
foreign key("kid") references "keyword"("kid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_keyword LIMIT 1;
did ||kid
*/
CREATE TABLE "publication" (
"abstract" text,
"cid" text,
"citation_num" int,
"jid" int,
"pid" int,
"reference_num" int,
"title" text,
"year" int,
primary key("pid"),
foreign key("jid") references "journal"("jid"),
foreign key("cid") references "conference"("cid")
)
/*
1 example row:
SELECT * FROM publication LIMIT 1;
abstract ||cid ||citation_num ||jid ||pid ||reference_num ||title ||year
*/
CREATE TABLE "domain_publication" (
"did" int,
"pid" int,
primary key ("did", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_publication LIMIT 1;
did ||pid
*/
CREATE TABLE "organization" (
"continent" text,
"homepage" text,
"name" text,
"oid" int,
primary key("oid")
)
/*
1 example row:
SELECT * FROM organization LIMIT 1;
continent ||homepage ||name ||oid
*/
CREATE TABLE "publication_keyword" (
"pid" int,
"kid" int,
primary key ("kid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("kid") references "keyword"("kid")
)
/*
1 example row:
SELECT * FROM publication_keyword LIMIT 1;
pid ||kid
*/
CREATE TABLE "writes" (
"aid" int,
"pid" int,
primary key ("aid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("aid") references "author"("aid")
)
/*
1 example row:
SELECT * FROM writes LIMIT 1;
aid ||pid
*/
CREATE TABLE "cite" (
"cited" int,
"citing" int,
foreign key("cited") references "publication"("pid"),
foreign key("citing") references "publication"("pid")
)
/*
1 example row:
SELECT * FROM cite LIMIT 1;
cited ||citing
*/
|
1,387 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
3170,
1,
2456,
1,
3864,
1,
528,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
1,
590,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3229,
10592,
220,
16,
26,
4815,
12576,
1393,
53119,
1393,
609,
1393,
590,
33006,
6343,
23421,
14700,
330,
79590,
1,
2456,
1,
21200,
1,
528,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
6682,
1401,
3573,
21200,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10017,
10592,
220,
16,
26,
4815,
33241,
1393,
53119,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
1,
2456,
1,
23770,
1,
528,
345,
32586,
1,
1495,
345,
6682,
1401,
3573,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
10592,
220,
16,
26,
4815,
1550,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
23790,
1,
2456,
1,
3864,
1,
528,
11,
720,
1,
23770,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
3864,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
3170,
63,
446,
3864,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
12482,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
23790,
10592,
220,
16,
26,
4815,
12576,
1393,
23770,
33006,
6343,
23421,
14700,
330,
12482,
3464,
2251,
1,
2456,
1,
21200,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
21200,
4561,
29543,
1401,
446,
21200,
909,
15407,
1595,
79590,
63,
446,
21200,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
12482,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
3464,
2251,
10592,
220,
16,
26,
4815,
33241,
1393,
23770,
33006,
6343,
23421,
14700,
330,
43618,
1,
2456,
1,
53119,
1,
1495,
345,
1,
73976,
1,
528,
345,
32586,
1,
1495,
345,
6682,
1401,
446,
73976,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8486,
10592,
220,
16,
26,
4815,
35689,
1393,
73976,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
86175,
1,
2456,
1,
23770,
1,
528,
345,
1,
73976,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
73976,
4561,
29543,
1401,
446,
73976,
909,
15407,
330,
43618,
1,
446,
73976,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
86175,
10592,
220,
16,
26,
4815,
1550,
1393,
73976,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
1,
20454,
1,
1495,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
16570,
1393,
64381,
33006,
6343,
23421,
14700,
330,
12482,
46924,
1,
2456,
1,
23770,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
64381,
4561,
29543,
1401,
446,
64381,
909,
15407,
330,
20454,
1,
446,
64381,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
46924,
10592,
220,
16,
26,
4815,
1550,
1393,
64381,
33006,
6343,
23421,
14700,
330,
72260,
1,
2456,
1,
16647,
1,
1495,
345,
1,
21200,
1,
1495,
345,
1,
84247,
4369,
1,
528,
345,
1,
73976,
1,
528,
345,
1,
10629,
1,
528,
345,
1,
16690,
4369,
1,
528,
345,
83827,
1,
1495,
345,
1,
3236,
1,
528,
345,
6682,
1401,
446,
10629,
4561,
29543,
1401,
446,
73976,
909,
15407,
330,
43618,
1,
446,
73976,
4561,
29543,
1401,
446,
21200,
909,
15407,
330,
79590,
1,
446,
21200,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17009,
10592,
220,
16,
26,
4815,
8278,
1393,
21200,
1393,
84247,
4369,
1393,
73976,
1393,
10629,
1393,
16690,
4369,
1393,
2150,
1393,
3236,
33006,
6343,
23421,
14700,
330,
12482,
28173,
367,
1,
2456,
1,
23770,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
28173,
367,
10592,
220,
16,
26,
4815,
1550,
1393,
10629,
33006,
6343,
23421,
14700,
330,
24844,
1,
2456,
1,
75695,
1,
1495,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
1,
590,
1,
528,
345,
6682,
1401,
446,
590,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7471,
10592,
220,
16,
26,
4815,
32843,
1393,
53119,
1393,
609,
1393,
590,
33006,
6343,
23421,
14700,
330,
72260,
46924,
1,
2456,
1,
10629,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
3573,
64381,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
64381,
909,
15407,
330,
20454,
1,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17009,
46924,
10592,
220,
16,
26,
4815,
15158,
1393,
64381,
33006,
6343,
23421,
14700,
330,
60179,
1,
2456,
1,
3864,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
3573,
3864,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
3864,
909,
15407,
330,
3170,
1,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
14238,
10592,
220,
16,
26,
4815,
12576,
1393,
10629,
33006,
6343,
23421,
14700,
330,
68175,
1,
2456,
98046,
1639,
1,
528,
345,
98046,
5977,
1,
220,
528,
345,
29543,
1401,
446,
66,
1639,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
66,
5977,
909,
15407,
330,
72260,
1,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
39396,
10592,
220,
16,
26,
4815,
22628,
1393,
66,
5977,
33006,
6343,
14711,
16225,
198,
693,
757,
279,
1396,
315,
12283,
889,
617,
22628,
279,
16064,
555,
330,
473,
13,
650,
13,
30511,
329,
819,
330,
662,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
24945,
320,
60186,
259,
17,
2710,
883,
4393,
17009,
5871,
259,
22,
13369,
39396,
5871,
259,
20,
6328,
259,
22,
42039,
220,
284,
220,
259,
20,
522,
5977,
13369,
17009,
5871,
259,
21,
6328,
259,
21,
42039,
220,
284,
220,
259,
20,
522,
1639,
13369,
14238,
5871,
259,
18,
6328,
259,
18,
42039,
220,
284,
220,
259,
22,
42039,
13369,
14238,
5871,
259,
19,
6328,
259,
19,
42039,
220,
284,
220,
259,
21,
42039,
13369,
3229,
5871,
259,
17,
6328,
259,
18,
13,
3864,
220,
284,
220,
259,
17,
13,
3864,
13369,
3229,
5871,
259,
16,
6328,
259,
19,
13,
3864,
220,
284,
220,
259,
16,
13,
3864,
5401,
259,
16,
2710,
220,
284,
220,
330,
39,
13,
650,
13,
30511,
329,
819,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
24945,
320,
60186,
259,
17,
2710,
883,
4393,
17009,
5871,
259,
22,
13369,
39396,
5871,
259,
20,
6328,
259,
22,
42039,
220,
284,
220,
259,
20,
522,
5977,
13369,
17009,
5871,
259,
21,
6328,
259,
21,
42039,
220,
284,
220,
259,
20,
522,
1639,
13369,
14238,
5871,
259,
18,
6328,
259,
18,
42039,
220,
284,
220,
259,
22,
42039,
13369,
14238,
5871,
259,
19,
6328,
259,
19,
42039,
220,
284,
220,
259,
21,
42039,
13369,
3229,
5871,
259,
17,
6328,
259,
18,
13,
3864,
220,
284,
220,
259,
17,
13,
3864,
13369,
3229,
5871,
259,
16,
6328,
259,
19,
13,
3864,
220,
284,
220,
259,
16,
13,
3864,
5401,
259,
16,
2710,
220,
284,
220,
330,
39,
13,
650,
13,
30511,
329,
819,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "author" (
"aid" int,
"homepage" text,
"name" text,
"oid" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM author LIMIT 1;
aid ||homepage ||name ||oid
*/
CREATE TABLE "conference" (
"cid" int,
"homepage" text,
"name" text,
primary key ("cid")
)
/*
1 example row:
SELECT * FROM conference LIMIT 1;
cid ||homepage ||name
*/
CREATE TABLE "domain" (
"did" int,
"name" text,
primary key ("did")
)
/*
1 example row:
SELECT * FROM domain LIMIT 1;
did ||name
*/
CREATE TABLE "domain_author" (
"aid" int,
"did" int,
primary key ("did", "aid"),
foreign key("aid") references `author`("aid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_author LIMIT 1;
aid ||did
*/
CREATE TABLE "domain_conference" (
"cid" int,
"did" int,
primary key ("did", "cid"),
foreign key("cid") references `conference`("cid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_conference LIMIT 1;
cid ||did
*/
CREATE TABLE "journal" (
"homepage" text,
"jid" int,
"name" text,
primary key("jid")
)
/*
1 example row:
SELECT * FROM journal LIMIT 1;
homepage ||jid ||name
*/
CREATE TABLE "domain_journal" (
"did" int,
"jid" int,
primary key ("did", "jid"),
foreign key("jid") references "journal"("jid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_journal LIMIT 1;
did ||jid
*/
CREATE TABLE "keyword" (
"keyword" text,
"kid" int,
primary key("kid")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
keyword ||kid
*/
CREATE TABLE "domain_keyword" (
"did" int,
"kid" int,
primary key ("did", "kid"),
foreign key("kid") references "keyword"("kid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_keyword LIMIT 1;
did ||kid
*/
CREATE TABLE "publication" (
"abstract" text,
"cid" text,
"citation_num" int,
"jid" int,
"pid" int,
"reference_num" int,
"title" text,
"year" int,
primary key("pid"),
foreign key("jid") references "journal"("jid"),
foreign key("cid") references "conference"("cid")
)
/*
1 example row:
SELECT * FROM publication LIMIT 1;
abstract ||cid ||citation_num ||jid ||pid ||reference_num ||title ||year
*/
CREATE TABLE "domain_publication" (
"did" int,
"pid" int,
primary key ("did", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_publication LIMIT 1;
did ||pid
*/
CREATE TABLE "organization" (
"continent" text,
"homepage" text,
"name" text,
"oid" int,
primary key("oid")
)
/*
1 example row:
SELECT * FROM organization LIMIT 1;
continent ||homepage ||name ||oid
*/
CREATE TABLE "publication_keyword" (
"pid" int,
"kid" int,
primary key ("kid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("kid") references "keyword"("kid")
)
/*
1 example row:
SELECT * FROM publication_keyword LIMIT 1;
pid ||kid
*/
CREATE TABLE "writes" (
"aid" int,
"pid" int,
primary key ("aid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("aid") references "author"("aid")
)
/*
1 example row:
SELECT * FROM writes LIMIT 1;
aid ||pid
*/
CREATE TABLE "cite" (
"cited" int,
"citing" int,
foreign key("cited") references "publication"("pid"),
foreign key("citing") references "publication"("pid")
)
/*
1 example row:
SELECT * FROM cite LIMIT 1;
cited ||citing
*/
### Question
return me the number of authors who have cited the papers by " H. V. Jagadish " .
|
[query_database(**{'query': 'SELECT COUNT ( DISTINCT t2.name ) FROM publication AS t7 JOIN cite AS t5 ON t7.pid = t5.citing JOIN publication AS t6 ON t6.pid = t5.cited JOIN writes AS t3 ON t3.pid = t7.pid JOIN writes AS t4 ON t4.pid = t6.pid JOIN author AS t2 ON t3.aid = t2.aid JOIN author AS t1 ON t4.aid = t1.aid WHERE t1.name = "H. V. Jagadish";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "author" (
"aid" int,
"homepage" text,
"name" text,
"oid" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM author LIMIT 1;
aid ||homepage ||name ||oid
*/
CREATE TABLE "conference" (
"cid" int,
"homepage" text,
"name" text,
primary key ("cid")
)
/*
1 example row:
SELECT * FROM conference LIMIT 1;
cid ||homepage ||name
*/
CREATE TABLE "domain" (
"did" int,
"name" text,
primary key ("did")
)
/*
1 example row:
SELECT * FROM domain LIMIT 1;
did ||name
*/
CREATE TABLE "domain_author" (
"aid" int,
"did" int,
primary key ("did", "aid"),
foreign key("aid") references `author`("aid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_author LIMIT 1;
aid ||did
*/
CREATE TABLE "domain_conference" (
"cid" int,
"did" int,
primary key ("did", "cid"),
foreign key("cid") references `conference`("cid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_conference LIMIT 1;
cid ||did
*/
CREATE TABLE "journal" (
"homepage" text,
"jid" int,
"name" text,
primary key("jid")
)
/*
1 example row:
SELECT * FROM journal LIMIT 1;
homepage ||jid ||name
*/
CREATE TABLE "domain_journal" (
"did" int,
"jid" int,
primary key ("did", "jid"),
foreign key("jid") references "journal"("jid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_journal LIMIT 1;
did ||jid
*/
CREATE TABLE "keyword" (
"keyword" text,
"kid" int,
primary key("kid")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
keyword ||kid
*/
CREATE TABLE "domain_keyword" (
"did" int,
"kid" int,
primary key ("did", "kid"),
foreign key("kid") references "keyword"("kid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_keyword LIMIT 1;
did ||kid
*/
CREATE TABLE "publication" (
"abstract" text,
"cid" text,
"citation_num" int,
"jid" int,
"pid" int,
"reference_num" int,
"title" text,
"year" int,
primary key("pid"),
foreign key("jid") references "journal"("jid"),
foreign key("cid") references "conference"("cid")
)
/*
1 example row:
SELECT * FROM publication LIMIT 1;
abstract ||cid ||citation_num ||jid ||pid ||reference_num ||title ||year
*/
CREATE TABLE "domain_publication" (
"did" int,
"pid" int,
primary key ("did", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_publication LIMIT 1;
did ||pid
*/
CREATE TABLE "organization" (
"continent" text,
"homepage" text,
"name" text,
"oid" int,
primary key("oid")
)
/*
1 example row:
SELECT * FROM organization LIMIT 1;
continent ||homepage ||name ||oid
*/
CREATE TABLE "publication_keyword" (
"pid" int,
"kid" int,
primary key ("kid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("kid") references "keyword"("kid")
)
/*
1 example row:
SELECT * FROM publication_keyword LIMIT 1;
pid ||kid
*/
CREATE TABLE "writes" (
"aid" int,
"pid" int,
primary key ("aid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("aid") references "author"("aid")
)
/*
1 example row:
SELECT * FROM writes LIMIT 1;
aid ||pid
*/
CREATE TABLE "cite" (
"cited" int,
"citing" int,
foreign key("cited") references "publication"("pid"),
foreign key("citing") references "publication"("pid")
)
/*
1 example row:
SELECT * FROM cite LIMIT 1;
cited ||citing
*/
|
1,391 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
3170,
1,
2456,
1,
3864,
1,
528,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
1,
590,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3229,
10592,
220,
16,
26,
4815,
12576,
1393,
53119,
1393,
609,
1393,
590,
33006,
6343,
23421,
14700,
330,
79590,
1,
2456,
1,
21200,
1,
528,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
6682,
1401,
3573,
21200,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10017,
10592,
220,
16,
26,
4815,
33241,
1393,
53119,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
1,
2456,
1,
23770,
1,
528,
345,
32586,
1,
1495,
345,
6682,
1401,
3573,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
10592,
220,
16,
26,
4815,
1550,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
23790,
1,
2456,
1,
3864,
1,
528,
11,
720,
1,
23770,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
3864,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
3170,
63,
446,
3864,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
12482,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
23790,
10592,
220,
16,
26,
4815,
12576,
1393,
23770,
33006,
6343,
23421,
14700,
330,
12482,
3464,
2251,
1,
2456,
1,
21200,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
21200,
4561,
29543,
1401,
446,
21200,
909,
15407,
1595,
79590,
63,
446,
21200,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
12482,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
3464,
2251,
10592,
220,
16,
26,
4815,
33241,
1393,
23770,
33006,
6343,
23421,
14700,
330,
43618,
1,
2456,
1,
53119,
1,
1495,
345,
1,
73976,
1,
528,
345,
32586,
1,
1495,
345,
6682,
1401,
446,
73976,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8486,
10592,
220,
16,
26,
4815,
35689,
1393,
73976,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
86175,
1,
2456,
1,
23770,
1,
528,
345,
1,
73976,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
73976,
4561,
29543,
1401,
446,
73976,
909,
15407,
330,
43618,
1,
446,
73976,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
86175,
10592,
220,
16,
26,
4815,
1550,
1393,
73976,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
1,
20454,
1,
1495,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
16570,
1393,
64381,
33006,
6343,
23421,
14700,
330,
12482,
46924,
1,
2456,
1,
23770,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
64381,
4561,
29543,
1401,
446,
64381,
909,
15407,
330,
20454,
1,
446,
64381,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
46924,
10592,
220,
16,
26,
4815,
1550,
1393,
64381,
33006,
6343,
23421,
14700,
330,
72260,
1,
2456,
1,
16647,
1,
1495,
345,
1,
21200,
1,
1495,
345,
1,
84247,
4369,
1,
528,
345,
1,
73976,
1,
528,
345,
1,
10629,
1,
528,
345,
1,
16690,
4369,
1,
528,
345,
83827,
1,
1495,
345,
1,
3236,
1,
528,
345,
6682,
1401,
446,
10629,
4561,
29543,
1401,
446,
73976,
909,
15407,
330,
43618,
1,
446,
73976,
4561,
29543,
1401,
446,
21200,
909,
15407,
330,
79590,
1,
446,
21200,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17009,
10592,
220,
16,
26,
4815,
8278,
1393,
21200,
1393,
84247,
4369,
1393,
73976,
1393,
10629,
1393,
16690,
4369,
1393,
2150,
1393,
3236,
33006,
6343,
23421,
14700,
330,
12482,
28173,
367,
1,
2456,
1,
23770,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
28173,
367,
10592,
220,
16,
26,
4815,
1550,
1393,
10629,
33006,
6343,
23421,
14700,
330,
24844,
1,
2456,
1,
75695,
1,
1495,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
1,
590,
1,
528,
345,
6682,
1401,
446,
590,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7471,
10592,
220,
16,
26,
4815,
32843,
1393,
53119,
1393,
609,
1393,
590,
33006,
6343,
23421,
14700,
330,
72260,
46924,
1,
2456,
1,
10629,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
3573,
64381,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
64381,
909,
15407,
330,
20454,
1,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17009,
46924,
10592,
220,
16,
26,
4815,
15158,
1393,
64381,
33006,
6343,
23421,
14700,
330,
60179,
1,
2456,
1,
3864,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
3573,
3864,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
3864,
909,
15407,
330,
3170,
1,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
14238,
10592,
220,
16,
26,
4815,
12576,
1393,
10629,
33006,
6343,
23421,
14700,
330,
68175,
1,
2456,
98046,
1639,
1,
528,
345,
98046,
5977,
1,
220,
528,
345,
29543,
1401,
446,
66,
1639,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
66,
5977,
909,
15407,
330,
72260,
1,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
39396,
10592,
220,
16,
26,
4815,
22628,
1393,
66,
5977,
33006,
6343,
14711,
16225,
198,
693,
757,
279,
10017,
11,
902,
706,
279,
1455,
1396,
315,
16064,
8649,
16570,
330,
6649,
1697,
10199,
330,
662,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
2710,
4393,
17009,
46924,
5871,
259,
19,
13369,
16570,
5871,
259,
16,
6328,
259,
19,
5314,
307,
220,
284,
220,
259,
16,
5314,
307,
13369,
17009,
5871,
259,
18,
6328,
259,
18,
42039,
220,
284,
220,
259,
19,
42039,
13369,
10017,
5871,
259,
17,
6328,
259,
18,
83986,
220,
284,
220,
259,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
2710,
4393,
17009,
46924,
5871,
259,
19,
13369,
16570,
5871,
259,
16,
6328,
259,
19,
5314,
307,
220,
284,
220,
259,
16,
5314,
307,
13369,
17009,
5871,
259,
18,
6328,
259,
18,
42039,
220,
284,
220,
259,
19,
42039,
13369,
10017,
5871,
259,
17,
6328,
259,
18,
83986,
220,
284,
220,
259,
17,
83986,
5401,
259,
16,
75011,
220,
284,
220,
330,
6882,
1697,
10199,
1,
27968,
7866,
259,
17,
2710,
15888,
7866,
24945,
320,
60186,
259,
18,
6195,
883,
16477,
10592,
220,
16,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "author" (
"aid" int,
"homepage" text,
"name" text,
"oid" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM author LIMIT 1;
aid ||homepage ||name ||oid
*/
CREATE TABLE "conference" (
"cid" int,
"homepage" text,
"name" text,
primary key ("cid")
)
/*
1 example row:
SELECT * FROM conference LIMIT 1;
cid ||homepage ||name
*/
CREATE TABLE "domain" (
"did" int,
"name" text,
primary key ("did")
)
/*
1 example row:
SELECT * FROM domain LIMIT 1;
did ||name
*/
CREATE TABLE "domain_author" (
"aid" int,
"did" int,
primary key ("did", "aid"),
foreign key("aid") references `author`("aid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_author LIMIT 1;
aid ||did
*/
CREATE TABLE "domain_conference" (
"cid" int,
"did" int,
primary key ("did", "cid"),
foreign key("cid") references `conference`("cid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_conference LIMIT 1;
cid ||did
*/
CREATE TABLE "journal" (
"homepage" text,
"jid" int,
"name" text,
primary key("jid")
)
/*
1 example row:
SELECT * FROM journal LIMIT 1;
homepage ||jid ||name
*/
CREATE TABLE "domain_journal" (
"did" int,
"jid" int,
primary key ("did", "jid"),
foreign key("jid") references "journal"("jid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_journal LIMIT 1;
did ||jid
*/
CREATE TABLE "keyword" (
"keyword" text,
"kid" int,
primary key("kid")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
keyword ||kid
*/
CREATE TABLE "domain_keyword" (
"did" int,
"kid" int,
primary key ("did", "kid"),
foreign key("kid") references "keyword"("kid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_keyword LIMIT 1;
did ||kid
*/
CREATE TABLE "publication" (
"abstract" text,
"cid" text,
"citation_num" int,
"jid" int,
"pid" int,
"reference_num" int,
"title" text,
"year" int,
primary key("pid"),
foreign key("jid") references "journal"("jid"),
foreign key("cid") references "conference"("cid")
)
/*
1 example row:
SELECT * FROM publication LIMIT 1;
abstract ||cid ||citation_num ||jid ||pid ||reference_num ||title ||year
*/
CREATE TABLE "domain_publication" (
"did" int,
"pid" int,
primary key ("did", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_publication LIMIT 1;
did ||pid
*/
CREATE TABLE "organization" (
"continent" text,
"homepage" text,
"name" text,
"oid" int,
primary key("oid")
)
/*
1 example row:
SELECT * FROM organization LIMIT 1;
continent ||homepage ||name ||oid
*/
CREATE TABLE "publication_keyword" (
"pid" int,
"kid" int,
primary key ("kid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("kid") references "keyword"("kid")
)
/*
1 example row:
SELECT * FROM publication_keyword LIMIT 1;
pid ||kid
*/
CREATE TABLE "writes" (
"aid" int,
"pid" int,
primary key ("aid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("aid") references "author"("aid")
)
/*
1 example row:
SELECT * FROM writes LIMIT 1;
aid ||pid
*/
CREATE TABLE "cite" (
"cited" int,
"citing" int,
foreign key("cited") references "publication"("pid"),
foreign key("citing") references "publication"("pid")
)
/*
1 example row:
SELECT * FROM cite LIMIT 1;
cited ||citing
*/
### Question
return me the conference, which has the most number of papers containing keyword " Relational Database " .
|
[query_database(**{'query': 'SELECT t2.name FROM publication_keyword AS t4 JOIN keyword AS t1 ON t4.kid = t1.kid JOIN publication AS t3 ON t3.pid = t4.pid JOIN conference AS t2 ON t3.cid = t2.cid WHERE t1.keyword = "Relational Database" GROUP BY t2.name ORDER BY COUNT ( DISTINCT t3.title ) DESC LIMIT 1;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "author" (
"aid" int,
"homepage" text,
"name" text,
"oid" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM author LIMIT 1;
aid ||homepage ||name ||oid
*/
CREATE TABLE "conference" (
"cid" int,
"homepage" text,
"name" text,
primary key ("cid")
)
/*
1 example row:
SELECT * FROM conference LIMIT 1;
cid ||homepage ||name
*/
CREATE TABLE "domain" (
"did" int,
"name" text,
primary key ("did")
)
/*
1 example row:
SELECT * FROM domain LIMIT 1;
did ||name
*/
CREATE TABLE "domain_author" (
"aid" int,
"did" int,
primary key ("did", "aid"),
foreign key("aid") references `author`("aid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_author LIMIT 1;
aid ||did
*/
CREATE TABLE "domain_conference" (
"cid" int,
"did" int,
primary key ("did", "cid"),
foreign key("cid") references `conference`("cid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_conference LIMIT 1;
cid ||did
*/
CREATE TABLE "journal" (
"homepage" text,
"jid" int,
"name" text,
primary key("jid")
)
/*
1 example row:
SELECT * FROM journal LIMIT 1;
homepage ||jid ||name
*/
CREATE TABLE "domain_journal" (
"did" int,
"jid" int,
primary key ("did", "jid"),
foreign key("jid") references "journal"("jid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_journal LIMIT 1;
did ||jid
*/
CREATE TABLE "keyword" (
"keyword" text,
"kid" int,
primary key("kid")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
keyword ||kid
*/
CREATE TABLE "domain_keyword" (
"did" int,
"kid" int,
primary key ("did", "kid"),
foreign key("kid") references "keyword"("kid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_keyword LIMIT 1;
did ||kid
*/
CREATE TABLE "publication" (
"abstract" text,
"cid" text,
"citation_num" int,
"jid" int,
"pid" int,
"reference_num" int,
"title" text,
"year" int,
primary key("pid"),
foreign key("jid") references "journal"("jid"),
foreign key("cid") references "conference"("cid")
)
/*
1 example row:
SELECT * FROM publication LIMIT 1;
abstract ||cid ||citation_num ||jid ||pid ||reference_num ||title ||year
*/
CREATE TABLE "domain_publication" (
"did" int,
"pid" int,
primary key ("did", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_publication LIMIT 1;
did ||pid
*/
CREATE TABLE "organization" (
"continent" text,
"homepage" text,
"name" text,
"oid" int,
primary key("oid")
)
/*
1 example row:
SELECT * FROM organization LIMIT 1;
continent ||homepage ||name ||oid
*/
CREATE TABLE "publication_keyword" (
"pid" int,
"kid" int,
primary key ("kid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("kid") references "keyword"("kid")
)
/*
1 example row:
SELECT * FROM publication_keyword LIMIT 1;
pid ||kid
*/
CREATE TABLE "writes" (
"aid" int,
"pid" int,
primary key ("aid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("aid") references "author"("aid")
)
/*
1 example row:
SELECT * FROM writes LIMIT 1;
aid ||pid
*/
CREATE TABLE "cite" (
"cited" int,
"citing" int,
foreign key("cited") references "publication"("pid"),
foreign key("citing") references "publication"("pid")
)
/*
1 example row:
SELECT * FROM cite LIMIT 1;
cited ||citing
*/
|
1,395 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
3170,
1,
2456,
1,
3864,
1,
528,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
1,
590,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3229,
10592,
220,
16,
26,
4815,
12576,
1393,
53119,
1393,
609,
1393,
590,
33006,
6343,
23421,
14700,
330,
79590,
1,
2456,
1,
21200,
1,
528,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
6682,
1401,
3573,
21200,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10017,
10592,
220,
16,
26,
4815,
33241,
1393,
53119,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
1,
2456,
1,
23770,
1,
528,
345,
32586,
1,
1495,
345,
6682,
1401,
3573,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
10592,
220,
16,
26,
4815,
1550,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
23790,
1,
2456,
1,
3864,
1,
528,
11,
720,
1,
23770,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
3864,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
3170,
63,
446,
3864,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
12482,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
23790,
10592,
220,
16,
26,
4815,
12576,
1393,
23770,
33006,
6343,
23421,
14700,
330,
12482,
3464,
2251,
1,
2456,
1,
21200,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
21200,
4561,
29543,
1401,
446,
21200,
909,
15407,
1595,
79590,
63,
446,
21200,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
12482,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
3464,
2251,
10592,
220,
16,
26,
4815,
33241,
1393,
23770,
33006,
6343,
23421,
14700,
330,
43618,
1,
2456,
1,
53119,
1,
1495,
345,
1,
73976,
1,
528,
345,
32586,
1,
1495,
345,
6682,
1401,
446,
73976,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8486,
10592,
220,
16,
26,
4815,
35689,
1393,
73976,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
86175,
1,
2456,
1,
23770,
1,
528,
345,
1,
73976,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
73976,
4561,
29543,
1401,
446,
73976,
909,
15407,
330,
43618,
1,
446,
73976,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
86175,
10592,
220,
16,
26,
4815,
1550,
1393,
73976,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
1,
20454,
1,
1495,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
16570,
1393,
64381,
33006,
6343,
23421,
14700,
330,
12482,
46924,
1,
2456,
1,
23770,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
64381,
4561,
29543,
1401,
446,
64381,
909,
15407,
330,
20454,
1,
446,
64381,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
46924,
10592,
220,
16,
26,
4815,
1550,
1393,
64381,
33006,
6343,
23421,
14700,
330,
72260,
1,
2456,
1,
16647,
1,
1495,
345,
1,
21200,
1,
1495,
345,
1,
84247,
4369,
1,
528,
345,
1,
73976,
1,
528,
345,
1,
10629,
1,
528,
345,
1,
16690,
4369,
1,
528,
345,
83827,
1,
1495,
345,
1,
3236,
1,
528,
345,
6682,
1401,
446,
10629,
4561,
29543,
1401,
446,
73976,
909,
15407,
330,
43618,
1,
446,
73976,
4561,
29543,
1401,
446,
21200,
909,
15407,
330,
79590,
1,
446,
21200,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17009,
10592,
220,
16,
26,
4815,
8278,
1393,
21200,
1393,
84247,
4369,
1393,
73976,
1393,
10629,
1393,
16690,
4369,
1393,
2150,
1393,
3236,
33006,
6343,
23421,
14700,
330,
12482,
28173,
367,
1,
2456,
1,
23770,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
28173,
367,
10592,
220,
16,
26,
4815,
1550,
1393,
10629,
33006,
6343,
23421,
14700,
330,
24844,
1,
2456,
1,
75695,
1,
1495,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
1,
590,
1,
528,
345,
6682,
1401,
446,
590,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7471,
10592,
220,
16,
26,
4815,
32843,
1393,
53119,
1393,
609,
1393,
590,
33006,
6343,
23421,
14700,
330,
72260,
46924,
1,
2456,
1,
10629,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
3573,
64381,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
64381,
909,
15407,
330,
20454,
1,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17009,
46924,
10592,
220,
16,
26,
4815,
15158,
1393,
64381,
33006,
6343,
23421,
14700,
330,
60179,
1,
2456,
1,
3864,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
3573,
3864,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
3864,
909,
15407,
330,
3170,
1,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
14238,
10592,
220,
16,
26,
4815,
12576,
1393,
10629,
33006,
6343,
23421,
14700,
330,
68175,
1,
2456,
98046,
1639,
1,
528,
345,
98046,
5977,
1,
220,
528,
345,
29543,
1401,
446,
66,
1639,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
66,
5977,
909,
15407,
330,
72260,
1,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
39396,
10592,
220,
16,
26,
4815,
22628,
1393,
66,
5977,
33006,
6343,
14711,
16225,
198,
693,
757,
279,
16570,
11,
902,
617,
1027,
13282,
555,
279,
1455,
1396,
315,
16064,
304,
393,
31798,
3590,
662,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
16,
75011,
4393,
17009,
46924,
5871,
259,
19,
13369,
16570,
5871,
259,
16,
6328,
259,
19,
5314,
307,
220,
284,
220,
259,
16,
5314,
307,
13369,
17009,
5871,
259,
17,
6328,
259,
17,
42039,
220,
284,
220,
259,
19,
42039,
13369,
8486,
5871,
259,
18,
6328,
259,
17,
1190,
307,
220,
284,
220,
259,
18,
1190,
307,
5401,
259,
18,
2710,
220,
284,
220,
330,
47,
31798,
3590,
1,
27968,
7866,
259,
16,
75011,
15888,
7866,
24945,
320,
60186,
259,
17,
6195,
883,
16477,
10592,
220,
16,
37094,
5525,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
16,
75011,
4393,
17009,
46924,
5871,
259,
19,
13369,
16570,
5871,
259,
16,
6328,
259,
19,
5314,
307,
220,
284,
220,
259,
16,
5314,
307,
13369,
17009,
5871,
259,
17,
6328,
259,
17,
42039,
220,
284,
220,
259,
19,
42039,
13369,
8486,
5871,
259,
18,
6328,
259,
17,
1190,
307,
220,
284,
220,
259,
18,
1190,
307,
5401,
259,
18,
2710,
220,
284,
220,
330,
47,
31798,
3590,
1,
27968,
7866,
259,
16,
75011,
15888,
7866,
24945,
320,
60186,
259,
17,
6195,
883,
16477,
10592,
220,
16,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "author" (
"aid" int,
"homepage" text,
"name" text,
"oid" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM author LIMIT 1;
aid ||homepage ||name ||oid
*/
CREATE TABLE "conference" (
"cid" int,
"homepage" text,
"name" text,
primary key ("cid")
)
/*
1 example row:
SELECT * FROM conference LIMIT 1;
cid ||homepage ||name
*/
CREATE TABLE "domain" (
"did" int,
"name" text,
primary key ("did")
)
/*
1 example row:
SELECT * FROM domain LIMIT 1;
did ||name
*/
CREATE TABLE "domain_author" (
"aid" int,
"did" int,
primary key ("did", "aid"),
foreign key("aid") references `author`("aid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_author LIMIT 1;
aid ||did
*/
CREATE TABLE "domain_conference" (
"cid" int,
"did" int,
primary key ("did", "cid"),
foreign key("cid") references `conference`("cid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_conference LIMIT 1;
cid ||did
*/
CREATE TABLE "journal" (
"homepage" text,
"jid" int,
"name" text,
primary key("jid")
)
/*
1 example row:
SELECT * FROM journal LIMIT 1;
homepage ||jid ||name
*/
CREATE TABLE "domain_journal" (
"did" int,
"jid" int,
primary key ("did", "jid"),
foreign key("jid") references "journal"("jid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_journal LIMIT 1;
did ||jid
*/
CREATE TABLE "keyword" (
"keyword" text,
"kid" int,
primary key("kid")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
keyword ||kid
*/
CREATE TABLE "domain_keyword" (
"did" int,
"kid" int,
primary key ("did", "kid"),
foreign key("kid") references "keyword"("kid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_keyword LIMIT 1;
did ||kid
*/
CREATE TABLE "publication" (
"abstract" text,
"cid" text,
"citation_num" int,
"jid" int,
"pid" int,
"reference_num" int,
"title" text,
"year" int,
primary key("pid"),
foreign key("jid") references "journal"("jid"),
foreign key("cid") references "conference"("cid")
)
/*
1 example row:
SELECT * FROM publication LIMIT 1;
abstract ||cid ||citation_num ||jid ||pid ||reference_num ||title ||year
*/
CREATE TABLE "domain_publication" (
"did" int,
"pid" int,
primary key ("did", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_publication LIMIT 1;
did ||pid
*/
CREATE TABLE "organization" (
"continent" text,
"homepage" text,
"name" text,
"oid" int,
primary key("oid")
)
/*
1 example row:
SELECT * FROM organization LIMIT 1;
continent ||homepage ||name ||oid
*/
CREATE TABLE "publication_keyword" (
"pid" int,
"kid" int,
primary key ("kid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("kid") references "keyword"("kid")
)
/*
1 example row:
SELECT * FROM publication_keyword LIMIT 1;
pid ||kid
*/
CREATE TABLE "writes" (
"aid" int,
"pid" int,
primary key ("aid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("aid") references "author"("aid")
)
/*
1 example row:
SELECT * FROM writes LIMIT 1;
aid ||pid
*/
CREATE TABLE "cite" (
"cited" int,
"citing" int,
foreign key("cited") references "publication"("pid"),
foreign key("citing") references "publication"("pid")
)
/*
1 example row:
SELECT * FROM cite LIMIT 1;
cited ||citing
*/
### Question
return me the keyword, which have been contained by the most number of papers in PVLDB .
|
[query_database(**{'query': 'SELECT t1.keyword FROM publication_keyword AS t4 JOIN keyword AS t1 ON t4.kid = t1.kid JOIN publication AS t2 ON t2.pid = t4.pid JOIN journal AS t3 ON t2.jid = t3.jid WHERE t3.name = "PVLDB" GROUP BY t1.keyword ORDER BY COUNT ( DISTINCT t2.title ) DESC LIMIT 1;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "author" (
"aid" int,
"homepage" text,
"name" text,
"oid" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM author LIMIT 1;
aid ||homepage ||name ||oid
*/
CREATE TABLE "conference" (
"cid" int,
"homepage" text,
"name" text,
primary key ("cid")
)
/*
1 example row:
SELECT * FROM conference LIMIT 1;
cid ||homepage ||name
*/
CREATE TABLE "domain" (
"did" int,
"name" text,
primary key ("did")
)
/*
1 example row:
SELECT * FROM domain LIMIT 1;
did ||name
*/
CREATE TABLE "domain_author" (
"aid" int,
"did" int,
primary key ("did", "aid"),
foreign key("aid") references `author`("aid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_author LIMIT 1;
aid ||did
*/
CREATE TABLE "domain_conference" (
"cid" int,
"did" int,
primary key ("did", "cid"),
foreign key("cid") references `conference`("cid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_conference LIMIT 1;
cid ||did
*/
CREATE TABLE "journal" (
"homepage" text,
"jid" int,
"name" text,
primary key("jid")
)
/*
1 example row:
SELECT * FROM journal LIMIT 1;
homepage ||jid ||name
*/
CREATE TABLE "domain_journal" (
"did" int,
"jid" int,
primary key ("did", "jid"),
foreign key("jid") references "journal"("jid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_journal LIMIT 1;
did ||jid
*/
CREATE TABLE "keyword" (
"keyword" text,
"kid" int,
primary key("kid")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
keyword ||kid
*/
CREATE TABLE "domain_keyword" (
"did" int,
"kid" int,
primary key ("did", "kid"),
foreign key("kid") references "keyword"("kid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_keyword LIMIT 1;
did ||kid
*/
CREATE TABLE "publication" (
"abstract" text,
"cid" text,
"citation_num" int,
"jid" int,
"pid" int,
"reference_num" int,
"title" text,
"year" int,
primary key("pid"),
foreign key("jid") references "journal"("jid"),
foreign key("cid") references "conference"("cid")
)
/*
1 example row:
SELECT * FROM publication LIMIT 1;
abstract ||cid ||citation_num ||jid ||pid ||reference_num ||title ||year
*/
CREATE TABLE "domain_publication" (
"did" int,
"pid" int,
primary key ("did", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_publication LIMIT 1;
did ||pid
*/
CREATE TABLE "organization" (
"continent" text,
"homepage" text,
"name" text,
"oid" int,
primary key("oid")
)
/*
1 example row:
SELECT * FROM organization LIMIT 1;
continent ||homepage ||name ||oid
*/
CREATE TABLE "publication_keyword" (
"pid" int,
"kid" int,
primary key ("kid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("kid") references "keyword"("kid")
)
/*
1 example row:
SELECT * FROM publication_keyword LIMIT 1;
pid ||kid
*/
CREATE TABLE "writes" (
"aid" int,
"pid" int,
primary key ("aid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("aid") references "author"("aid")
)
/*
1 example row:
SELECT * FROM writes LIMIT 1;
aid ||pid
*/
CREATE TABLE "cite" (
"cited" int,
"citing" int,
foreign key("cited") references "publication"("pid"),
foreign key("citing") references "publication"("pid")
)
/*
1 example row:
SELECT * FROM cite LIMIT 1;
cited ||citing
*/
|
1,399 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
3170,
1,
2456,
1,
3864,
1,
528,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
1,
590,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3229,
10592,
220,
16,
26,
4815,
12576,
1393,
53119,
1393,
609,
1393,
590,
33006,
6343,
23421,
14700,
330,
79590,
1,
2456,
1,
21200,
1,
528,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
6682,
1401,
3573,
21200,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10017,
10592,
220,
16,
26,
4815,
33241,
1393,
53119,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
1,
2456,
1,
23770,
1,
528,
345,
32586,
1,
1495,
345,
6682,
1401,
3573,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
10592,
220,
16,
26,
4815,
1550,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
23790,
1,
2456,
1,
3864,
1,
528,
11,
720,
1,
23770,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
3864,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
3170,
63,
446,
3864,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
12482,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
23790,
10592,
220,
16,
26,
4815,
12576,
1393,
23770,
33006,
6343,
23421,
14700,
330,
12482,
3464,
2251,
1,
2456,
1,
21200,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
21200,
4561,
29543,
1401,
446,
21200,
909,
15407,
1595,
79590,
63,
446,
21200,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
12482,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
3464,
2251,
10592,
220,
16,
26,
4815,
33241,
1393,
23770,
33006,
6343,
23421,
14700,
330,
43618,
1,
2456,
1,
53119,
1,
1495,
345,
1,
73976,
1,
528,
345,
32586,
1,
1495,
345,
6682,
1401,
446,
73976,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8486,
10592,
220,
16,
26,
4815,
35689,
1393,
73976,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
86175,
1,
2456,
1,
23770,
1,
528,
345,
1,
73976,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
73976,
4561,
29543,
1401,
446,
73976,
909,
15407,
330,
43618,
1,
446,
73976,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
86175,
10592,
220,
16,
26,
4815,
1550,
1393,
73976,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
1,
20454,
1,
1495,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
16570,
1393,
64381,
33006,
6343,
23421,
14700,
330,
12482,
46924,
1,
2456,
1,
23770,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
64381,
4561,
29543,
1401,
446,
64381,
909,
15407,
330,
20454,
1,
446,
64381,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
46924,
10592,
220,
16,
26,
4815,
1550,
1393,
64381,
33006,
6343,
23421,
14700,
330,
72260,
1,
2456,
1,
16647,
1,
1495,
345,
1,
21200,
1,
1495,
345,
1,
84247,
4369,
1,
528,
345,
1,
73976,
1,
528,
345,
1,
10629,
1,
528,
345,
1,
16690,
4369,
1,
528,
345,
83827,
1,
1495,
345,
1,
3236,
1,
528,
345,
6682,
1401,
446,
10629,
4561,
29543,
1401,
446,
73976,
909,
15407,
330,
43618,
1,
446,
73976,
4561,
29543,
1401,
446,
21200,
909,
15407,
330,
79590,
1,
446,
21200,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17009,
10592,
220,
16,
26,
4815,
8278,
1393,
21200,
1393,
84247,
4369,
1393,
73976,
1393,
10629,
1393,
16690,
4369,
1393,
2150,
1393,
3236,
33006,
6343,
23421,
14700,
330,
12482,
28173,
367,
1,
2456,
1,
23770,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
28173,
367,
10592,
220,
16,
26,
4815,
1550,
1393,
10629,
33006,
6343,
23421,
14700,
330,
24844,
1,
2456,
1,
75695,
1,
1495,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
1,
590,
1,
528,
345,
6682,
1401,
446,
590,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7471,
10592,
220,
16,
26,
4815,
32843,
1393,
53119,
1393,
609,
1393,
590,
33006,
6343,
23421,
14700,
330,
72260,
46924,
1,
2456,
1,
10629,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
3573,
64381,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
64381,
909,
15407,
330,
20454,
1,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17009,
46924,
10592,
220,
16,
26,
4815,
15158,
1393,
64381,
33006,
6343,
23421,
14700,
330,
60179,
1,
2456,
1,
3864,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
3573,
3864,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
3864,
909,
15407,
330,
3170,
1,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
14238,
10592,
220,
16,
26,
4815,
12576,
1393,
10629,
33006,
6343,
23421,
14700,
330,
68175,
1,
2456,
98046,
1639,
1,
528,
345,
98046,
5977,
1,
220,
528,
345,
29543,
1401,
446,
66,
1639,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
66,
5977,
909,
15407,
330,
72260,
1,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
39396,
10592,
220,
16,
26,
4815,
22628,
1393,
66,
5977,
33006,
6343,
14711,
16225,
198,
693,
757,
279,
16064,
5439,
555,
330,
473,
13,
650,
13,
30511,
329,
819,
330,
323,
330,
423,
1924,
71,
34688,
344,
561,
2979,
330,
449,
279,
1455,
1396,
315,
52946,
662,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
20,
6195,
4393,
14238,
5871,
259,
18,
13369,
3229,
5871,
259,
17,
6328,
259,
18,
13,
3864,
220,
284,
220,
259,
17,
13,
3864,
13369,
17009,
5871,
259,
20,
6328,
259,
18,
42039,
220,
284,
220,
259,
20,
42039,
13369,
14238,
5871,
259,
19,
6328,
259,
19,
42039,
220,
284,
220,
259,
20,
42039,
13369,
3229,
5871,
259,
16,
6328,
259,
19,
13,
3864,
220,
284,
220,
259,
16,
13,
3864,
5401,
259,
17,
2710,
220,
284,
220,
330,
35,
1924,
71,
34688,
344,
561,
2979,
1,
3651,
259,
16,
2710,
220,
284,
220,
330,
39,
13,
650,
13,
30511,
329,
819,
1,
15888,
7866,
259,
20,
522,
7709,
4369,
16477,
10592,
220,
16,
37094,
5525,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
20,
6195,
4393,
14238,
5871,
259,
18,
13369,
3229,
5871,
259,
17,
6328,
259,
18,
13,
3864,
220,
284,
220,
259,
17,
13,
3864,
13369,
17009,
5871,
259,
20,
6328,
259,
18,
42039,
220,
284,
220,
259,
20,
42039,
13369,
14238,
5871,
259,
19,
6328,
259,
19,
42039,
220,
284,
220,
259,
20,
42039,
13369,
3229,
5871,
259,
16,
6328,
259,
19,
13,
3864,
220,
284,
220,
259,
16,
13,
3864,
5401,
259,
17,
2710,
220,
284,
220,
330,
35,
1924,
71,
34688,
344,
561,
2979,
1,
3651,
259,
16,
2710,
220,
284,
220,
330,
39,
13,
650,
13,
30511,
329,
819,
1,
15888,
7866,
259,
20,
522,
7709,
4369,
16477,
10592,
220,
16,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "author" (
"aid" int,
"homepage" text,
"name" text,
"oid" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM author LIMIT 1;
aid ||homepage ||name ||oid
*/
CREATE TABLE "conference" (
"cid" int,
"homepage" text,
"name" text,
primary key ("cid")
)
/*
1 example row:
SELECT * FROM conference LIMIT 1;
cid ||homepage ||name
*/
CREATE TABLE "domain" (
"did" int,
"name" text,
primary key ("did")
)
/*
1 example row:
SELECT * FROM domain LIMIT 1;
did ||name
*/
CREATE TABLE "domain_author" (
"aid" int,
"did" int,
primary key ("did", "aid"),
foreign key("aid") references `author`("aid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_author LIMIT 1;
aid ||did
*/
CREATE TABLE "domain_conference" (
"cid" int,
"did" int,
primary key ("did", "cid"),
foreign key("cid") references `conference`("cid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_conference LIMIT 1;
cid ||did
*/
CREATE TABLE "journal" (
"homepage" text,
"jid" int,
"name" text,
primary key("jid")
)
/*
1 example row:
SELECT * FROM journal LIMIT 1;
homepage ||jid ||name
*/
CREATE TABLE "domain_journal" (
"did" int,
"jid" int,
primary key ("did", "jid"),
foreign key("jid") references "journal"("jid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_journal LIMIT 1;
did ||jid
*/
CREATE TABLE "keyword" (
"keyword" text,
"kid" int,
primary key("kid")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
keyword ||kid
*/
CREATE TABLE "domain_keyword" (
"did" int,
"kid" int,
primary key ("did", "kid"),
foreign key("kid") references "keyword"("kid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_keyword LIMIT 1;
did ||kid
*/
CREATE TABLE "publication" (
"abstract" text,
"cid" text,
"citation_num" int,
"jid" int,
"pid" int,
"reference_num" int,
"title" text,
"year" int,
primary key("pid"),
foreign key("jid") references "journal"("jid"),
foreign key("cid") references "conference"("cid")
)
/*
1 example row:
SELECT * FROM publication LIMIT 1;
abstract ||cid ||citation_num ||jid ||pid ||reference_num ||title ||year
*/
CREATE TABLE "domain_publication" (
"did" int,
"pid" int,
primary key ("did", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_publication LIMIT 1;
did ||pid
*/
CREATE TABLE "organization" (
"continent" text,
"homepage" text,
"name" text,
"oid" int,
primary key("oid")
)
/*
1 example row:
SELECT * FROM organization LIMIT 1;
continent ||homepage ||name ||oid
*/
CREATE TABLE "publication_keyword" (
"pid" int,
"kid" int,
primary key ("kid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("kid") references "keyword"("kid")
)
/*
1 example row:
SELECT * FROM publication_keyword LIMIT 1;
pid ||kid
*/
CREATE TABLE "writes" (
"aid" int,
"pid" int,
primary key ("aid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("aid") references "author"("aid")
)
/*
1 example row:
SELECT * FROM writes LIMIT 1;
aid ||pid
*/
CREATE TABLE "cite" (
"cited" int,
"citing" int,
foreign key("cited") references "publication"("pid"),
foreign key("citing") references "publication"("pid")
)
/*
1 example row:
SELECT * FROM cite LIMIT 1;
cited ||citing
*/
### Question
return me the papers written by " H. V. Jagadish " and " Divesh Srivastava " with the most number of citations .
|
[query_database(**{'query': 'SELECT t5.title FROM writes AS t3 JOIN author AS t2 ON t3.aid = t2.aid JOIN publication AS t5 ON t3.pid = t5.pid JOIN writes AS t4 ON t4.pid = t5.pid JOIN author AS t1 ON t4.aid = t1.aid WHERE t2.name = "Divesh Srivastava" AND t1.name = "H. V. Jagadish" ORDER BY t5.citation_num DESC LIMIT 1;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "author" (
"aid" int,
"homepage" text,
"name" text,
"oid" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM author LIMIT 1;
aid ||homepage ||name ||oid
*/
CREATE TABLE "conference" (
"cid" int,
"homepage" text,
"name" text,
primary key ("cid")
)
/*
1 example row:
SELECT * FROM conference LIMIT 1;
cid ||homepage ||name
*/
CREATE TABLE "domain" (
"did" int,
"name" text,
primary key ("did")
)
/*
1 example row:
SELECT * FROM domain LIMIT 1;
did ||name
*/
CREATE TABLE "domain_author" (
"aid" int,
"did" int,
primary key ("did", "aid"),
foreign key("aid") references `author`("aid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_author LIMIT 1;
aid ||did
*/
CREATE TABLE "domain_conference" (
"cid" int,
"did" int,
primary key ("did", "cid"),
foreign key("cid") references `conference`("cid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_conference LIMIT 1;
cid ||did
*/
CREATE TABLE "journal" (
"homepage" text,
"jid" int,
"name" text,
primary key("jid")
)
/*
1 example row:
SELECT * FROM journal LIMIT 1;
homepage ||jid ||name
*/
CREATE TABLE "domain_journal" (
"did" int,
"jid" int,
primary key ("did", "jid"),
foreign key("jid") references "journal"("jid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_journal LIMIT 1;
did ||jid
*/
CREATE TABLE "keyword" (
"keyword" text,
"kid" int,
primary key("kid")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
keyword ||kid
*/
CREATE TABLE "domain_keyword" (
"did" int,
"kid" int,
primary key ("did", "kid"),
foreign key("kid") references "keyword"("kid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_keyword LIMIT 1;
did ||kid
*/
CREATE TABLE "publication" (
"abstract" text,
"cid" text,
"citation_num" int,
"jid" int,
"pid" int,
"reference_num" int,
"title" text,
"year" int,
primary key("pid"),
foreign key("jid") references "journal"("jid"),
foreign key("cid") references "conference"("cid")
)
/*
1 example row:
SELECT * FROM publication LIMIT 1;
abstract ||cid ||citation_num ||jid ||pid ||reference_num ||title ||year
*/
CREATE TABLE "domain_publication" (
"did" int,
"pid" int,
primary key ("did", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_publication LIMIT 1;
did ||pid
*/
CREATE TABLE "organization" (
"continent" text,
"homepage" text,
"name" text,
"oid" int,
primary key("oid")
)
/*
1 example row:
SELECT * FROM organization LIMIT 1;
continent ||homepage ||name ||oid
*/
CREATE TABLE "publication_keyword" (
"pid" int,
"kid" int,
primary key ("kid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("kid") references "keyword"("kid")
)
/*
1 example row:
SELECT * FROM publication_keyword LIMIT 1;
pid ||kid
*/
CREATE TABLE "writes" (
"aid" int,
"pid" int,
primary key ("aid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("aid") references "author"("aid")
)
/*
1 example row:
SELECT * FROM writes LIMIT 1;
aid ||pid
*/
CREATE TABLE "cite" (
"cited" int,
"citing" int,
foreign key("cited") references "publication"("pid"),
foreign key("citing") references "publication"("pid")
)
/*
1 example row:
SELECT * FROM cite LIMIT 1;
cited ||citing
*/
|
1,403 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
3170,
1,
2456,
1,
3864,
1,
528,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
1,
590,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3229,
10592,
220,
16,
26,
4815,
12576,
1393,
53119,
1393,
609,
1393,
590,
33006,
6343,
23421,
14700,
330,
79590,
1,
2456,
1,
21200,
1,
528,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
6682,
1401,
3573,
21200,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10017,
10592,
220,
16,
26,
4815,
33241,
1393,
53119,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
1,
2456,
1,
23770,
1,
528,
345,
32586,
1,
1495,
345,
6682,
1401,
3573,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
10592,
220,
16,
26,
4815,
1550,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
23790,
1,
2456,
1,
3864,
1,
528,
11,
720,
1,
23770,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
3864,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
3170,
63,
446,
3864,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
12482,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
23790,
10592,
220,
16,
26,
4815,
12576,
1393,
23770,
33006,
6343,
23421,
14700,
330,
12482,
3464,
2251,
1,
2456,
1,
21200,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
21200,
4561,
29543,
1401,
446,
21200,
909,
15407,
1595,
79590,
63,
446,
21200,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
12482,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
3464,
2251,
10592,
220,
16,
26,
4815,
33241,
1393,
23770,
33006,
6343,
23421,
14700,
330,
43618,
1,
2456,
1,
53119,
1,
1495,
345,
1,
73976,
1,
528,
345,
32586,
1,
1495,
345,
6682,
1401,
446,
73976,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8486,
10592,
220,
16,
26,
4815,
35689,
1393,
73976,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
86175,
1,
2456,
1,
23770,
1,
528,
345,
1,
73976,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
73976,
4561,
29543,
1401,
446,
73976,
909,
15407,
330,
43618,
1,
446,
73976,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
86175,
10592,
220,
16,
26,
4815,
1550,
1393,
73976,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
1,
20454,
1,
1495,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
16570,
1393,
64381,
33006,
6343,
23421,
14700,
330,
12482,
46924,
1,
2456,
1,
23770,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
64381,
4561,
29543,
1401,
446,
64381,
909,
15407,
330,
20454,
1,
446,
64381,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
46924,
10592,
220,
16,
26,
4815,
1550,
1393,
64381,
33006,
6343,
23421,
14700,
330,
72260,
1,
2456,
1,
16647,
1,
1495,
345,
1,
21200,
1,
1495,
345,
1,
84247,
4369,
1,
528,
345,
1,
73976,
1,
528,
345,
1,
10629,
1,
528,
345,
1,
16690,
4369,
1,
528,
345,
83827,
1,
1495,
345,
1,
3236,
1,
528,
345,
6682,
1401,
446,
10629,
4561,
29543,
1401,
446,
73976,
909,
15407,
330,
43618,
1,
446,
73976,
4561,
29543,
1401,
446,
21200,
909,
15407,
330,
79590,
1,
446,
21200,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17009,
10592,
220,
16,
26,
4815,
8278,
1393,
21200,
1393,
84247,
4369,
1393,
73976,
1393,
10629,
1393,
16690,
4369,
1393,
2150,
1393,
3236,
33006,
6343,
23421,
14700,
330,
12482,
28173,
367,
1,
2456,
1,
23770,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
28173,
367,
10592,
220,
16,
26,
4815,
1550,
1393,
10629,
33006,
6343,
23421,
14700,
330,
24844,
1,
2456,
1,
75695,
1,
1495,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
1,
590,
1,
528,
345,
6682,
1401,
446,
590,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7471,
10592,
220,
16,
26,
4815,
32843,
1393,
53119,
1393,
609,
1393,
590,
33006,
6343,
23421,
14700,
330,
72260,
46924,
1,
2456,
1,
10629,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
3573,
64381,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
64381,
909,
15407,
330,
20454,
1,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17009,
46924,
10592,
220,
16,
26,
4815,
15158,
1393,
64381,
33006,
6343,
23421,
14700,
330,
60179,
1,
2456,
1,
3864,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
3573,
3864,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
3864,
909,
15407,
330,
3170,
1,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
14238,
10592,
220,
16,
26,
4815,
12576,
1393,
10629,
33006,
6343,
23421,
14700,
330,
68175,
1,
2456,
98046,
1639,
1,
528,
345,
98046,
5977,
1,
220,
528,
345,
29543,
1401,
446,
66,
1639,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
66,
5977,
909,
15407,
330,
72260,
1,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
39396,
10592,
220,
16,
26,
4815,
22628,
1393,
66,
5977,
33006,
6343,
14711,
16225,
198,
693,
757,
279,
8486,
11,
902,
617,
279,
1455,
1396,
315,
16064,
555,
330,
473,
13,
650,
13,
30511,
329,
819,
330,
662,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
2710,
4393,
17009,
5871,
259,
19,
13369,
8486,
5871,
259,
17,
6328,
259,
19,
1190,
307,
220,
284,
220,
259,
17,
1190,
307,
13369,
14238,
5871,
259,
18,
6328,
259,
18,
42039,
220,
284,
220,
259,
19,
42039,
13369,
3229,
5871,
259,
16,
6328,
259,
18,
13,
3864,
220,
284,
220,
259,
16,
13,
3864,
5401,
259,
16,
2710,
220,
284,
220,
330,
39,
13,
650,
13,
30511,
329,
819,
1,
27968,
7866,
259,
17,
2710,
15888,
7866,
24945,
320,
60186,
259,
19,
6195,
883,
16477,
10592,
220,
16,
37094,
5525,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
2710,
4393,
17009,
5871,
259,
19,
13369,
8486,
5871,
259,
17,
6328,
259,
19,
1190,
307,
220,
284,
220,
259,
17,
1190,
307,
13369,
14238,
5871,
259,
18,
6328,
259,
18,
42039,
220,
284,
220,
259,
19,
42039,
13369,
3229,
5871,
259,
16,
6328,
259,
18,
13,
3864,
220,
284,
220,
259,
16,
13,
3864,
5401,
259,
16,
2710,
220,
284,
220,
330,
39,
13,
650,
13,
30511,
329,
819,
1,
27968,
7866,
259,
17,
2710,
15888,
7866,
24945,
320,
60186,
259,
19,
6195,
883,
16477,
10592,
220,
16,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "author" (
"aid" int,
"homepage" text,
"name" text,
"oid" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM author LIMIT 1;
aid ||homepage ||name ||oid
*/
CREATE TABLE "conference" (
"cid" int,
"homepage" text,
"name" text,
primary key ("cid")
)
/*
1 example row:
SELECT * FROM conference LIMIT 1;
cid ||homepage ||name
*/
CREATE TABLE "domain" (
"did" int,
"name" text,
primary key ("did")
)
/*
1 example row:
SELECT * FROM domain LIMIT 1;
did ||name
*/
CREATE TABLE "domain_author" (
"aid" int,
"did" int,
primary key ("did", "aid"),
foreign key("aid") references `author`("aid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_author LIMIT 1;
aid ||did
*/
CREATE TABLE "domain_conference" (
"cid" int,
"did" int,
primary key ("did", "cid"),
foreign key("cid") references `conference`("cid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_conference LIMIT 1;
cid ||did
*/
CREATE TABLE "journal" (
"homepage" text,
"jid" int,
"name" text,
primary key("jid")
)
/*
1 example row:
SELECT * FROM journal LIMIT 1;
homepage ||jid ||name
*/
CREATE TABLE "domain_journal" (
"did" int,
"jid" int,
primary key ("did", "jid"),
foreign key("jid") references "journal"("jid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_journal LIMIT 1;
did ||jid
*/
CREATE TABLE "keyword" (
"keyword" text,
"kid" int,
primary key("kid")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
keyword ||kid
*/
CREATE TABLE "domain_keyword" (
"did" int,
"kid" int,
primary key ("did", "kid"),
foreign key("kid") references "keyword"("kid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_keyword LIMIT 1;
did ||kid
*/
CREATE TABLE "publication" (
"abstract" text,
"cid" text,
"citation_num" int,
"jid" int,
"pid" int,
"reference_num" int,
"title" text,
"year" int,
primary key("pid"),
foreign key("jid") references "journal"("jid"),
foreign key("cid") references "conference"("cid")
)
/*
1 example row:
SELECT * FROM publication LIMIT 1;
abstract ||cid ||citation_num ||jid ||pid ||reference_num ||title ||year
*/
CREATE TABLE "domain_publication" (
"did" int,
"pid" int,
primary key ("did", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_publication LIMIT 1;
did ||pid
*/
CREATE TABLE "organization" (
"continent" text,
"homepage" text,
"name" text,
"oid" int,
primary key("oid")
)
/*
1 example row:
SELECT * FROM organization LIMIT 1;
continent ||homepage ||name ||oid
*/
CREATE TABLE "publication_keyword" (
"pid" int,
"kid" int,
primary key ("kid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("kid") references "keyword"("kid")
)
/*
1 example row:
SELECT * FROM publication_keyword LIMIT 1;
pid ||kid
*/
CREATE TABLE "writes" (
"aid" int,
"pid" int,
primary key ("aid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("aid") references "author"("aid")
)
/*
1 example row:
SELECT * FROM writes LIMIT 1;
aid ||pid
*/
CREATE TABLE "cite" (
"cited" int,
"citing" int,
foreign key("cited") references "publication"("pid"),
foreign key("citing") references "publication"("pid")
)
/*
1 example row:
SELECT * FROM cite LIMIT 1;
cited ||citing
*/
### Question
return me the journal, which have the most number of papers by " H. V. Jagadish " .
|
[query_database(**{'query': 'SELECT t2.name FROM publication AS t4 JOIN journal AS t2 ON t4.jid = t2.jid JOIN writes AS t3 ON t3.pid = t4.pid JOIN author AS t1 ON t3.aid = t1.aid WHERE t1.name = "H. V. Jagadish" GROUP BY t2.name ORDER BY COUNT ( DISTINCT t4.title ) DESC LIMIT 1;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "author" (
"aid" int,
"homepage" text,
"name" text,
"oid" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM author LIMIT 1;
aid ||homepage ||name ||oid
*/
CREATE TABLE "conference" (
"cid" int,
"homepage" text,
"name" text,
primary key ("cid")
)
/*
1 example row:
SELECT * FROM conference LIMIT 1;
cid ||homepage ||name
*/
CREATE TABLE "domain" (
"did" int,
"name" text,
primary key ("did")
)
/*
1 example row:
SELECT * FROM domain LIMIT 1;
did ||name
*/
CREATE TABLE "domain_author" (
"aid" int,
"did" int,
primary key ("did", "aid"),
foreign key("aid") references `author`("aid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_author LIMIT 1;
aid ||did
*/
CREATE TABLE "domain_conference" (
"cid" int,
"did" int,
primary key ("did", "cid"),
foreign key("cid") references `conference`("cid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_conference LIMIT 1;
cid ||did
*/
CREATE TABLE "journal" (
"homepage" text,
"jid" int,
"name" text,
primary key("jid")
)
/*
1 example row:
SELECT * FROM journal LIMIT 1;
homepage ||jid ||name
*/
CREATE TABLE "domain_journal" (
"did" int,
"jid" int,
primary key ("did", "jid"),
foreign key("jid") references "journal"("jid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_journal LIMIT 1;
did ||jid
*/
CREATE TABLE "keyword" (
"keyword" text,
"kid" int,
primary key("kid")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
keyword ||kid
*/
CREATE TABLE "domain_keyword" (
"did" int,
"kid" int,
primary key ("did", "kid"),
foreign key("kid") references "keyword"("kid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_keyword LIMIT 1;
did ||kid
*/
CREATE TABLE "publication" (
"abstract" text,
"cid" text,
"citation_num" int,
"jid" int,
"pid" int,
"reference_num" int,
"title" text,
"year" int,
primary key("pid"),
foreign key("jid") references "journal"("jid"),
foreign key("cid") references "conference"("cid")
)
/*
1 example row:
SELECT * FROM publication LIMIT 1;
abstract ||cid ||citation_num ||jid ||pid ||reference_num ||title ||year
*/
CREATE TABLE "domain_publication" (
"did" int,
"pid" int,
primary key ("did", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_publication LIMIT 1;
did ||pid
*/
CREATE TABLE "organization" (
"continent" text,
"homepage" text,
"name" text,
"oid" int,
primary key("oid")
)
/*
1 example row:
SELECT * FROM organization LIMIT 1;
continent ||homepage ||name ||oid
*/
CREATE TABLE "publication_keyword" (
"pid" int,
"kid" int,
primary key ("kid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("kid") references "keyword"("kid")
)
/*
1 example row:
SELECT * FROM publication_keyword LIMIT 1;
pid ||kid
*/
CREATE TABLE "writes" (
"aid" int,
"pid" int,
primary key ("aid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("aid") references "author"("aid")
)
/*
1 example row:
SELECT * FROM writes LIMIT 1;
aid ||pid
*/
CREATE TABLE "cite" (
"cited" int,
"citing" int,
foreign key("cited") references "publication"("pid"),
foreign key("citing") references "publication"("pid")
)
/*
1 example row:
SELECT * FROM cite LIMIT 1;
cited ||citing
*/
|
1,407 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
3170,
1,
2456,
1,
3864,
1,
528,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
1,
590,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3229,
10592,
220,
16,
26,
4815,
12576,
1393,
53119,
1393,
609,
1393,
590,
33006,
6343,
23421,
14700,
330,
79590,
1,
2456,
1,
21200,
1,
528,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
6682,
1401,
3573,
21200,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10017,
10592,
220,
16,
26,
4815,
33241,
1393,
53119,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
1,
2456,
1,
23770,
1,
528,
345,
32586,
1,
1495,
345,
6682,
1401,
3573,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
10592,
220,
16,
26,
4815,
1550,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
23790,
1,
2456,
1,
3864,
1,
528,
11,
720,
1,
23770,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
3864,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
3170,
63,
446,
3864,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
12482,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
23790,
10592,
220,
16,
26,
4815,
12576,
1393,
23770,
33006,
6343,
23421,
14700,
330,
12482,
3464,
2251,
1,
2456,
1,
21200,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
21200,
4561,
29543,
1401,
446,
21200,
909,
15407,
1595,
79590,
63,
446,
21200,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
12482,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
3464,
2251,
10592,
220,
16,
26,
4815,
33241,
1393,
23770,
33006,
6343,
23421,
14700,
330,
43618,
1,
2456,
1,
53119,
1,
1495,
345,
1,
73976,
1,
528,
345,
32586,
1,
1495,
345,
6682,
1401,
446,
73976,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8486,
10592,
220,
16,
26,
4815,
35689,
1393,
73976,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
86175,
1,
2456,
1,
23770,
1,
528,
345,
1,
73976,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
73976,
4561,
29543,
1401,
446,
73976,
909,
15407,
330,
43618,
1,
446,
73976,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
86175,
10592,
220,
16,
26,
4815,
1550,
1393,
73976,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
1,
20454,
1,
1495,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
16570,
1393,
64381,
33006,
6343,
23421,
14700,
330,
12482,
46924,
1,
2456,
1,
23770,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
64381,
4561,
29543,
1401,
446,
64381,
909,
15407,
330,
20454,
1,
446,
64381,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
46924,
10592,
220,
16,
26,
4815,
1550,
1393,
64381,
33006,
6343,
23421,
14700,
330,
72260,
1,
2456,
1,
16647,
1,
1495,
345,
1,
21200,
1,
1495,
345,
1,
84247,
4369,
1,
528,
345,
1,
73976,
1,
528,
345,
1,
10629,
1,
528,
345,
1,
16690,
4369,
1,
528,
345,
83827,
1,
1495,
345,
1,
3236,
1,
528,
345,
6682,
1401,
446,
10629,
4561,
29543,
1401,
446,
73976,
909,
15407,
330,
43618,
1,
446,
73976,
4561,
29543,
1401,
446,
21200,
909,
15407,
330,
79590,
1,
446,
21200,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17009,
10592,
220,
16,
26,
4815,
8278,
1393,
21200,
1393,
84247,
4369,
1393,
73976,
1393,
10629,
1393,
16690,
4369,
1393,
2150,
1393,
3236,
33006,
6343,
23421,
14700,
330,
12482,
28173,
367,
1,
2456,
1,
23770,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
28173,
367,
10592,
220,
16,
26,
4815,
1550,
1393,
10629,
33006,
6343,
23421,
14700,
330,
24844,
1,
2456,
1,
75695,
1,
1495,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
1,
590,
1,
528,
345,
6682,
1401,
446,
590,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7471,
10592,
220,
16,
26,
4815,
32843,
1393,
53119,
1393,
609,
1393,
590,
33006,
6343,
23421,
14700,
330,
72260,
46924,
1,
2456,
1,
10629,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
3573,
64381,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
64381,
909,
15407,
330,
20454,
1,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17009,
46924,
10592,
220,
16,
26,
4815,
15158,
1393,
64381,
33006,
6343,
23421,
14700,
330,
60179,
1,
2456,
1,
3864,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
3573,
3864,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
3864,
909,
15407,
330,
3170,
1,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
14238,
10592,
220,
16,
26,
4815,
12576,
1393,
10629,
33006,
6343,
23421,
14700,
330,
68175,
1,
2456,
98046,
1639,
1,
528,
345,
98046,
5977,
1,
220,
528,
345,
29543,
1401,
446,
66,
1639,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
66,
5977,
909,
15407,
330,
72260,
1,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
39396,
10592,
220,
16,
26,
4815,
22628,
1393,
66,
5977,
33006,
6343,
14711,
16225,
198,
693,
757,
279,
5684,
304,
61322,
3590,
10017,
449,
279,
1455,
52946,
662,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
6195,
4393,
17009,
5871,
259,
17,
13369,
10017,
5871,
259,
16,
6328,
259,
17,
83986,
220,
284,
220,
259,
16,
83986,
5401,
259,
16,
2710,
220,
284,
220,
330,
31798,
3590,
1,
15888,
7866,
259,
17,
522,
7709,
4369,
16477,
10592,
220,
16,
37094,
5525,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
6195,
4393,
17009,
5871,
259,
17,
13369,
10017,
5871,
259,
16,
6328,
259,
17,
83986,
220,
284,
220,
259,
16,
83986,
5401,
259,
16,
2710,
220,
284,
220,
330,
31798,
3590,
1,
15888,
7866,
259,
17,
522,
7709,
4369,
16477,
10592,
220,
16,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "author" (
"aid" int,
"homepage" text,
"name" text,
"oid" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM author LIMIT 1;
aid ||homepage ||name ||oid
*/
CREATE TABLE "conference" (
"cid" int,
"homepage" text,
"name" text,
primary key ("cid")
)
/*
1 example row:
SELECT * FROM conference LIMIT 1;
cid ||homepage ||name
*/
CREATE TABLE "domain" (
"did" int,
"name" text,
primary key ("did")
)
/*
1 example row:
SELECT * FROM domain LIMIT 1;
did ||name
*/
CREATE TABLE "domain_author" (
"aid" int,
"did" int,
primary key ("did", "aid"),
foreign key("aid") references `author`("aid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_author LIMIT 1;
aid ||did
*/
CREATE TABLE "domain_conference" (
"cid" int,
"did" int,
primary key ("did", "cid"),
foreign key("cid") references `conference`("cid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_conference LIMIT 1;
cid ||did
*/
CREATE TABLE "journal" (
"homepage" text,
"jid" int,
"name" text,
primary key("jid")
)
/*
1 example row:
SELECT * FROM journal LIMIT 1;
homepage ||jid ||name
*/
CREATE TABLE "domain_journal" (
"did" int,
"jid" int,
primary key ("did", "jid"),
foreign key("jid") references "journal"("jid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_journal LIMIT 1;
did ||jid
*/
CREATE TABLE "keyword" (
"keyword" text,
"kid" int,
primary key("kid")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
keyword ||kid
*/
CREATE TABLE "domain_keyword" (
"did" int,
"kid" int,
primary key ("did", "kid"),
foreign key("kid") references "keyword"("kid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_keyword LIMIT 1;
did ||kid
*/
CREATE TABLE "publication" (
"abstract" text,
"cid" text,
"citation_num" int,
"jid" int,
"pid" int,
"reference_num" int,
"title" text,
"year" int,
primary key("pid"),
foreign key("jid") references "journal"("jid"),
foreign key("cid") references "conference"("cid")
)
/*
1 example row:
SELECT * FROM publication LIMIT 1;
abstract ||cid ||citation_num ||jid ||pid ||reference_num ||title ||year
*/
CREATE TABLE "domain_publication" (
"did" int,
"pid" int,
primary key ("did", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_publication LIMIT 1;
did ||pid
*/
CREATE TABLE "organization" (
"continent" text,
"homepage" text,
"name" text,
"oid" int,
primary key("oid")
)
/*
1 example row:
SELECT * FROM organization LIMIT 1;
continent ||homepage ||name ||oid
*/
CREATE TABLE "publication_keyword" (
"pid" int,
"kid" int,
primary key ("kid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("kid") references "keyword"("kid")
)
/*
1 example row:
SELECT * FROM publication_keyword LIMIT 1;
pid ||kid
*/
CREATE TABLE "writes" (
"aid" int,
"pid" int,
primary key ("aid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("aid") references "author"("aid")
)
/*
1 example row:
SELECT * FROM writes LIMIT 1;
aid ||pid
*/
CREATE TABLE "cite" (
"cited" int,
"citing" int,
foreign key("cited") references "publication"("pid"),
foreign key("citing") references "publication"("pid")
)
/*
1 example row:
SELECT * FROM cite LIMIT 1;
cited ||citing
*/
### Question
return me the paper in VLDB conference with the most citations .
|
[query_database(**{'query': 'SELECT t2.title FROM publication AS t2 JOIN conference AS t1 ON t2.cid = t1.cid WHERE t1.name = "VLDB" ORDER BY t2.citation_num DESC LIMIT 1;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "author" (
"aid" int,
"homepage" text,
"name" text,
"oid" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM author LIMIT 1;
aid ||homepage ||name ||oid
*/
CREATE TABLE "conference" (
"cid" int,
"homepage" text,
"name" text,
primary key ("cid")
)
/*
1 example row:
SELECT * FROM conference LIMIT 1;
cid ||homepage ||name
*/
CREATE TABLE "domain" (
"did" int,
"name" text,
primary key ("did")
)
/*
1 example row:
SELECT * FROM domain LIMIT 1;
did ||name
*/
CREATE TABLE "domain_author" (
"aid" int,
"did" int,
primary key ("did", "aid"),
foreign key("aid") references `author`("aid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_author LIMIT 1;
aid ||did
*/
CREATE TABLE "domain_conference" (
"cid" int,
"did" int,
primary key ("did", "cid"),
foreign key("cid") references `conference`("cid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_conference LIMIT 1;
cid ||did
*/
CREATE TABLE "journal" (
"homepage" text,
"jid" int,
"name" text,
primary key("jid")
)
/*
1 example row:
SELECT * FROM journal LIMIT 1;
homepage ||jid ||name
*/
CREATE TABLE "domain_journal" (
"did" int,
"jid" int,
primary key ("did", "jid"),
foreign key("jid") references "journal"("jid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_journal LIMIT 1;
did ||jid
*/
CREATE TABLE "keyword" (
"keyword" text,
"kid" int,
primary key("kid")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
keyword ||kid
*/
CREATE TABLE "domain_keyword" (
"did" int,
"kid" int,
primary key ("did", "kid"),
foreign key("kid") references "keyword"("kid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_keyword LIMIT 1;
did ||kid
*/
CREATE TABLE "publication" (
"abstract" text,
"cid" text,
"citation_num" int,
"jid" int,
"pid" int,
"reference_num" int,
"title" text,
"year" int,
primary key("pid"),
foreign key("jid") references "journal"("jid"),
foreign key("cid") references "conference"("cid")
)
/*
1 example row:
SELECT * FROM publication LIMIT 1;
abstract ||cid ||citation_num ||jid ||pid ||reference_num ||title ||year
*/
CREATE TABLE "domain_publication" (
"did" int,
"pid" int,
primary key ("did", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_publication LIMIT 1;
did ||pid
*/
CREATE TABLE "organization" (
"continent" text,
"homepage" text,
"name" text,
"oid" int,
primary key("oid")
)
/*
1 example row:
SELECT * FROM organization LIMIT 1;
continent ||homepage ||name ||oid
*/
CREATE TABLE "publication_keyword" (
"pid" int,
"kid" int,
primary key ("kid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("kid") references "keyword"("kid")
)
/*
1 example row:
SELECT * FROM publication_keyword LIMIT 1;
pid ||kid
*/
CREATE TABLE "writes" (
"aid" int,
"pid" int,
primary key ("aid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("aid") references "author"("aid")
)
/*
1 example row:
SELECT * FROM writes LIMIT 1;
aid ||pid
*/
CREATE TABLE "cite" (
"cited" int,
"citing" int,
foreign key("cited") references "publication"("pid"),
foreign key("citing") references "publication"("pid")
)
/*
1 example row:
SELECT * FROM cite LIMIT 1;
cited ||citing
*/
|
1,411 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
3170,
1,
2456,
1,
3864,
1,
528,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
1,
590,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3229,
10592,
220,
16,
26,
4815,
12576,
1393,
53119,
1393,
609,
1393,
590,
33006,
6343,
23421,
14700,
330,
79590,
1,
2456,
1,
21200,
1,
528,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
6682,
1401,
3573,
21200,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10017,
10592,
220,
16,
26,
4815,
33241,
1393,
53119,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
1,
2456,
1,
23770,
1,
528,
345,
32586,
1,
1495,
345,
6682,
1401,
3573,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
10592,
220,
16,
26,
4815,
1550,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
23790,
1,
2456,
1,
3864,
1,
528,
11,
720,
1,
23770,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
3864,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
3170,
63,
446,
3864,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
12482,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
23790,
10592,
220,
16,
26,
4815,
12576,
1393,
23770,
33006,
6343,
23421,
14700,
330,
12482,
3464,
2251,
1,
2456,
1,
21200,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
21200,
4561,
29543,
1401,
446,
21200,
909,
15407,
1595,
79590,
63,
446,
21200,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
12482,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
3464,
2251,
10592,
220,
16,
26,
4815,
33241,
1393,
23770,
33006,
6343,
23421,
14700,
330,
43618,
1,
2456,
1,
53119,
1,
1495,
345,
1,
73976,
1,
528,
345,
32586,
1,
1495,
345,
6682,
1401,
446,
73976,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8486,
10592,
220,
16,
26,
4815,
35689,
1393,
73976,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
86175,
1,
2456,
1,
23770,
1,
528,
345,
1,
73976,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
73976,
4561,
29543,
1401,
446,
73976,
909,
15407,
330,
43618,
1,
446,
73976,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
86175,
10592,
220,
16,
26,
4815,
1550,
1393,
73976,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
1,
20454,
1,
1495,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
16570,
1393,
64381,
33006,
6343,
23421,
14700,
330,
12482,
46924,
1,
2456,
1,
23770,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
64381,
4561,
29543,
1401,
446,
64381,
909,
15407,
330,
20454,
1,
446,
64381,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
46924,
10592,
220,
16,
26,
4815,
1550,
1393,
64381,
33006,
6343,
23421,
14700,
330,
72260,
1,
2456,
1,
16647,
1,
1495,
345,
1,
21200,
1,
1495,
345,
1,
84247,
4369,
1,
528,
345,
1,
73976,
1,
528,
345,
1,
10629,
1,
528,
345,
1,
16690,
4369,
1,
528,
345,
83827,
1,
1495,
345,
1,
3236,
1,
528,
345,
6682,
1401,
446,
10629,
4561,
29543,
1401,
446,
73976,
909,
15407,
330,
43618,
1,
446,
73976,
4561,
29543,
1401,
446,
21200,
909,
15407,
330,
79590,
1,
446,
21200,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17009,
10592,
220,
16,
26,
4815,
8278,
1393,
21200,
1393,
84247,
4369,
1393,
73976,
1393,
10629,
1393,
16690,
4369,
1393,
2150,
1393,
3236,
33006,
6343,
23421,
14700,
330,
12482,
28173,
367,
1,
2456,
1,
23770,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
28173,
367,
10592,
220,
16,
26,
4815,
1550,
1393,
10629,
33006,
6343,
23421,
14700,
330,
24844,
1,
2456,
1,
75695,
1,
1495,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
1,
590,
1,
528,
345,
6682,
1401,
446,
590,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7471,
10592,
220,
16,
26,
4815,
32843,
1393,
53119,
1393,
609,
1393,
590,
33006,
6343,
23421,
14700,
330,
72260,
46924,
1,
2456,
1,
10629,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
3573,
64381,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
64381,
909,
15407,
330,
20454,
1,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17009,
46924,
10592,
220,
16,
26,
4815,
15158,
1393,
64381,
33006,
6343,
23421,
14700,
330,
60179,
1,
2456,
1,
3864,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
3573,
3864,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
3864,
909,
15407,
330,
3170,
1,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
14238,
10592,
220,
16,
26,
4815,
12576,
1393,
10629,
33006,
6343,
23421,
14700,
330,
68175,
1,
2456,
98046,
1639,
1,
528,
345,
98046,
5977,
1,
220,
528,
345,
29543,
1401,
446,
66,
1639,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
66,
5977,
909,
15407,
330,
72260,
1,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
39396,
10592,
220,
16,
26,
4815,
22628,
1393,
66,
5977,
33006,
6343,
14711,
16225,
198,
693,
757,
279,
5684,
1306,
220,
1049,
15,
304,
393,
31798,
3590,
449,
279,
1455,
52946,
662,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
6195,
4393,
17009,
5871,
259,
17,
13369,
8486,
5871,
259,
16,
6328,
259,
17,
1190,
307,
220,
284,
220,
259,
16,
1190,
307,
5401,
259,
16,
2710,
220,
284,
220,
330,
47,
31798,
3590,
1,
3651,
259,
17,
25418,
220,
871,
220,
220,
1049,
15,
15888,
7866,
259,
17,
522,
7709,
4369,
16477,
10592,
220,
16,
37094,
5525,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
6195,
4393,
17009,
5871,
259,
17,
13369,
8486,
5871,
259,
16,
6328,
259,
17,
1190,
307,
220,
284,
220,
259,
16,
1190,
307,
5401,
259,
16,
2710,
220,
284,
220,
330,
47,
31798,
3590,
1,
3651,
259,
17,
25418,
220,
871,
220,
220,
1049,
15,
15888,
7866,
259,
17,
522,
7709,
4369,
16477,
10592,
220,
16,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "author" (
"aid" int,
"homepage" text,
"name" text,
"oid" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM author LIMIT 1;
aid ||homepage ||name ||oid
*/
CREATE TABLE "conference" (
"cid" int,
"homepage" text,
"name" text,
primary key ("cid")
)
/*
1 example row:
SELECT * FROM conference LIMIT 1;
cid ||homepage ||name
*/
CREATE TABLE "domain" (
"did" int,
"name" text,
primary key ("did")
)
/*
1 example row:
SELECT * FROM domain LIMIT 1;
did ||name
*/
CREATE TABLE "domain_author" (
"aid" int,
"did" int,
primary key ("did", "aid"),
foreign key("aid") references `author`("aid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_author LIMIT 1;
aid ||did
*/
CREATE TABLE "domain_conference" (
"cid" int,
"did" int,
primary key ("did", "cid"),
foreign key("cid") references `conference`("cid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_conference LIMIT 1;
cid ||did
*/
CREATE TABLE "journal" (
"homepage" text,
"jid" int,
"name" text,
primary key("jid")
)
/*
1 example row:
SELECT * FROM journal LIMIT 1;
homepage ||jid ||name
*/
CREATE TABLE "domain_journal" (
"did" int,
"jid" int,
primary key ("did", "jid"),
foreign key("jid") references "journal"("jid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_journal LIMIT 1;
did ||jid
*/
CREATE TABLE "keyword" (
"keyword" text,
"kid" int,
primary key("kid")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
keyword ||kid
*/
CREATE TABLE "domain_keyword" (
"did" int,
"kid" int,
primary key ("did", "kid"),
foreign key("kid") references "keyword"("kid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_keyword LIMIT 1;
did ||kid
*/
CREATE TABLE "publication" (
"abstract" text,
"cid" text,
"citation_num" int,
"jid" int,
"pid" int,
"reference_num" int,
"title" text,
"year" int,
primary key("pid"),
foreign key("jid") references "journal"("jid"),
foreign key("cid") references "conference"("cid")
)
/*
1 example row:
SELECT * FROM publication LIMIT 1;
abstract ||cid ||citation_num ||jid ||pid ||reference_num ||title ||year
*/
CREATE TABLE "domain_publication" (
"did" int,
"pid" int,
primary key ("did", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_publication LIMIT 1;
did ||pid
*/
CREATE TABLE "organization" (
"continent" text,
"homepage" text,
"name" text,
"oid" int,
primary key("oid")
)
/*
1 example row:
SELECT * FROM organization LIMIT 1;
continent ||homepage ||name ||oid
*/
CREATE TABLE "publication_keyword" (
"pid" int,
"kid" int,
primary key ("kid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("kid") references "keyword"("kid")
)
/*
1 example row:
SELECT * FROM publication_keyword LIMIT 1;
pid ||kid
*/
CREATE TABLE "writes" (
"aid" int,
"pid" int,
primary key ("aid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("aid") references "author"("aid")
)
/*
1 example row:
SELECT * FROM writes LIMIT 1;
aid ||pid
*/
CREATE TABLE "cite" (
"cited" int,
"citing" int,
foreign key("cited") references "publication"("pid"),
foreign key("citing") references "publication"("pid")
)
/*
1 example row:
SELECT * FROM cite LIMIT 1;
cited ||citing
*/
### Question
return me the paper after 2000 in PVLDB with the most citations .
|
[query_database(**{'query': 'SELECT t2.title FROM publication AS t2 JOIN journal AS t1 ON t2.jid = t1.jid WHERE t1.name = "PVLDB" AND t2.year > 2000 ORDER BY t2.citation_num DESC LIMIT 1;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "author" (
"aid" int,
"homepage" text,
"name" text,
"oid" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM author LIMIT 1;
aid ||homepage ||name ||oid
*/
CREATE TABLE "conference" (
"cid" int,
"homepage" text,
"name" text,
primary key ("cid")
)
/*
1 example row:
SELECT * FROM conference LIMIT 1;
cid ||homepage ||name
*/
CREATE TABLE "domain" (
"did" int,
"name" text,
primary key ("did")
)
/*
1 example row:
SELECT * FROM domain LIMIT 1;
did ||name
*/
CREATE TABLE "domain_author" (
"aid" int,
"did" int,
primary key ("did", "aid"),
foreign key("aid") references `author`("aid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_author LIMIT 1;
aid ||did
*/
CREATE TABLE "domain_conference" (
"cid" int,
"did" int,
primary key ("did", "cid"),
foreign key("cid") references `conference`("cid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_conference LIMIT 1;
cid ||did
*/
CREATE TABLE "journal" (
"homepage" text,
"jid" int,
"name" text,
primary key("jid")
)
/*
1 example row:
SELECT * FROM journal LIMIT 1;
homepage ||jid ||name
*/
CREATE TABLE "domain_journal" (
"did" int,
"jid" int,
primary key ("did", "jid"),
foreign key("jid") references "journal"("jid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_journal LIMIT 1;
did ||jid
*/
CREATE TABLE "keyword" (
"keyword" text,
"kid" int,
primary key("kid")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
keyword ||kid
*/
CREATE TABLE "domain_keyword" (
"did" int,
"kid" int,
primary key ("did", "kid"),
foreign key("kid") references "keyword"("kid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_keyword LIMIT 1;
did ||kid
*/
CREATE TABLE "publication" (
"abstract" text,
"cid" text,
"citation_num" int,
"jid" int,
"pid" int,
"reference_num" int,
"title" text,
"year" int,
primary key("pid"),
foreign key("jid") references "journal"("jid"),
foreign key("cid") references "conference"("cid")
)
/*
1 example row:
SELECT * FROM publication LIMIT 1;
abstract ||cid ||citation_num ||jid ||pid ||reference_num ||title ||year
*/
CREATE TABLE "domain_publication" (
"did" int,
"pid" int,
primary key ("did", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_publication LIMIT 1;
did ||pid
*/
CREATE TABLE "organization" (
"continent" text,
"homepage" text,
"name" text,
"oid" int,
primary key("oid")
)
/*
1 example row:
SELECT * FROM organization LIMIT 1;
continent ||homepage ||name ||oid
*/
CREATE TABLE "publication_keyword" (
"pid" int,
"kid" int,
primary key ("kid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("kid") references "keyword"("kid")
)
/*
1 example row:
SELECT * FROM publication_keyword LIMIT 1;
pid ||kid
*/
CREATE TABLE "writes" (
"aid" int,
"pid" int,
primary key ("aid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("aid") references "author"("aid")
)
/*
1 example row:
SELECT * FROM writes LIMIT 1;
aid ||pid
*/
CREATE TABLE "cite" (
"cited" int,
"citing" int,
foreign key("cited") references "publication"("pid"),
foreign key("citing") references "publication"("pid")
)
/*
1 example row:
SELECT * FROM cite LIMIT 1;
cited ||citing
*/
|
1,415 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
3170,
1,
2456,
1,
3864,
1,
528,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
1,
590,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3229,
10592,
220,
16,
26,
4815,
12576,
1393,
53119,
1393,
609,
1393,
590,
33006,
6343,
23421,
14700,
330,
79590,
1,
2456,
1,
21200,
1,
528,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
6682,
1401,
3573,
21200,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10017,
10592,
220,
16,
26,
4815,
33241,
1393,
53119,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
1,
2456,
1,
23770,
1,
528,
345,
32586,
1,
1495,
345,
6682,
1401,
3573,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
10592,
220,
16,
26,
4815,
1550,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
23790,
1,
2456,
1,
3864,
1,
528,
11,
720,
1,
23770,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
3864,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
3170,
63,
446,
3864,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
12482,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
23790,
10592,
220,
16,
26,
4815,
12576,
1393,
23770,
33006,
6343,
23421,
14700,
330,
12482,
3464,
2251,
1,
2456,
1,
21200,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
21200,
4561,
29543,
1401,
446,
21200,
909,
15407,
1595,
79590,
63,
446,
21200,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
12482,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
3464,
2251,
10592,
220,
16,
26,
4815,
33241,
1393,
23770,
33006,
6343,
23421,
14700,
330,
43618,
1,
2456,
1,
53119,
1,
1495,
345,
1,
73976,
1,
528,
345,
32586,
1,
1495,
345,
6682,
1401,
446,
73976,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8486,
10592,
220,
16,
26,
4815,
35689,
1393,
73976,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
86175,
1,
2456,
1,
23770,
1,
528,
345,
1,
73976,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
73976,
4561,
29543,
1401,
446,
73976,
909,
15407,
330,
43618,
1,
446,
73976,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
86175,
10592,
220,
16,
26,
4815,
1550,
1393,
73976,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
1,
20454,
1,
1495,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
16570,
1393,
64381,
33006,
6343,
23421,
14700,
330,
12482,
46924,
1,
2456,
1,
23770,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
64381,
4561,
29543,
1401,
446,
64381,
909,
15407,
330,
20454,
1,
446,
64381,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
46924,
10592,
220,
16,
26,
4815,
1550,
1393,
64381,
33006,
6343,
23421,
14700,
330,
72260,
1,
2456,
1,
16647,
1,
1495,
345,
1,
21200,
1,
1495,
345,
1,
84247,
4369,
1,
528,
345,
1,
73976,
1,
528,
345,
1,
10629,
1,
528,
345,
1,
16690,
4369,
1,
528,
345,
83827,
1,
1495,
345,
1,
3236,
1,
528,
345,
6682,
1401,
446,
10629,
4561,
29543,
1401,
446,
73976,
909,
15407,
330,
43618,
1,
446,
73976,
4561,
29543,
1401,
446,
21200,
909,
15407,
330,
79590,
1,
446,
21200,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17009,
10592,
220,
16,
26,
4815,
8278,
1393,
21200,
1393,
84247,
4369,
1393,
73976,
1393,
10629,
1393,
16690,
4369,
1393,
2150,
1393,
3236,
33006,
6343,
23421,
14700,
330,
12482,
28173,
367,
1,
2456,
1,
23770,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
28173,
367,
10592,
220,
16,
26,
4815,
1550,
1393,
10629,
33006,
6343,
23421,
14700,
330,
24844,
1,
2456,
1,
75695,
1,
1495,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
1,
590,
1,
528,
345,
6682,
1401,
446,
590,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7471,
10592,
220,
16,
26,
4815,
32843,
1393,
53119,
1393,
609,
1393,
590,
33006,
6343,
23421,
14700,
330,
72260,
46924,
1,
2456,
1,
10629,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
3573,
64381,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
64381,
909,
15407,
330,
20454,
1,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17009,
46924,
10592,
220,
16,
26,
4815,
15158,
1393,
64381,
33006,
6343,
23421,
14700,
330,
60179,
1,
2456,
1,
3864,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
3573,
3864,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
3864,
909,
15407,
330,
3170,
1,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
14238,
10592,
220,
16,
26,
4815,
12576,
1393,
10629,
33006,
6343,
23421,
14700,
330,
68175,
1,
2456,
98046,
1639,
1,
528,
345,
98046,
5977,
1,
220,
528,
345,
29543,
1401,
446,
66,
1639,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
66,
5977,
909,
15407,
330,
72260,
1,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
39396,
10592,
220,
16,
26,
4815,
22628,
1393,
66,
5977,
33006,
6343,
14711,
16225,
198,
693,
757,
279,
12283,
889,
617,
810,
1109,
220,
605,
16064,
8649,
16570,
330,
6649,
1697,
10199,
330,
662,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
2710,
4393,
17009,
46924,
5871,
259,
20,
13369,
16570,
5871,
259,
16,
6328,
259,
20,
5314,
307,
220,
284,
220,
259,
16,
5314,
307,
13369,
17009,
5871,
259,
18,
6328,
259,
18,
42039,
220,
284,
220,
259,
20,
42039,
13369,
14238,
5871,
259,
19,
6328,
259,
19,
42039,
220,
284,
220,
259,
18,
42039,
13369,
3229,
5871,
259,
17,
6328,
259,
19,
13,
3864,
220,
284,
220,
259,
17,
13,
3864,
5401,
259,
16,
75011,
220,
284,
220,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
2710,
4393,
17009,
46924,
5871,
259,
20,
13369,
16570,
5871,
259,
16,
6328,
259,
20,
5314,
307,
220,
284,
220,
259,
16,
5314,
307,
13369,
17009,
5871,
259,
18,
6328,
259,
18,
42039,
220,
284,
220,
259,
20,
42039,
13369,
14238,
5871,
259,
19,
6328,
259,
19,
42039,
220,
284,
220,
259,
18,
42039,
13369,
3229,
5871,
259,
17,
6328,
259,
19,
13,
3864,
220,
284,
220,
259,
17,
13,
3864,
5401,
259,
16,
75011,
220,
284,
220,
330,
6882,
1697,
10199,
1,
27968,
7866,
259,
17,
2710,
473,
84822,
24945,
320,
60186,
259,
18,
6195,
883,
220,
871,
220,
220,
605,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "author" (
"aid" int,
"homepage" text,
"name" text,
"oid" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM author LIMIT 1;
aid ||homepage ||name ||oid
*/
CREATE TABLE "conference" (
"cid" int,
"homepage" text,
"name" text,
primary key ("cid")
)
/*
1 example row:
SELECT * FROM conference LIMIT 1;
cid ||homepage ||name
*/
CREATE TABLE "domain" (
"did" int,
"name" text,
primary key ("did")
)
/*
1 example row:
SELECT * FROM domain LIMIT 1;
did ||name
*/
CREATE TABLE "domain_author" (
"aid" int,
"did" int,
primary key ("did", "aid"),
foreign key("aid") references `author`("aid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_author LIMIT 1;
aid ||did
*/
CREATE TABLE "domain_conference" (
"cid" int,
"did" int,
primary key ("did", "cid"),
foreign key("cid") references `conference`("cid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_conference LIMIT 1;
cid ||did
*/
CREATE TABLE "journal" (
"homepage" text,
"jid" int,
"name" text,
primary key("jid")
)
/*
1 example row:
SELECT * FROM journal LIMIT 1;
homepage ||jid ||name
*/
CREATE TABLE "domain_journal" (
"did" int,
"jid" int,
primary key ("did", "jid"),
foreign key("jid") references "journal"("jid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_journal LIMIT 1;
did ||jid
*/
CREATE TABLE "keyword" (
"keyword" text,
"kid" int,
primary key("kid")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
keyword ||kid
*/
CREATE TABLE "domain_keyword" (
"did" int,
"kid" int,
primary key ("did", "kid"),
foreign key("kid") references "keyword"("kid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_keyword LIMIT 1;
did ||kid
*/
CREATE TABLE "publication" (
"abstract" text,
"cid" text,
"citation_num" int,
"jid" int,
"pid" int,
"reference_num" int,
"title" text,
"year" int,
primary key("pid"),
foreign key("jid") references "journal"("jid"),
foreign key("cid") references "conference"("cid")
)
/*
1 example row:
SELECT * FROM publication LIMIT 1;
abstract ||cid ||citation_num ||jid ||pid ||reference_num ||title ||year
*/
CREATE TABLE "domain_publication" (
"did" int,
"pid" int,
primary key ("did", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_publication LIMIT 1;
did ||pid
*/
CREATE TABLE "organization" (
"continent" text,
"homepage" text,
"name" text,
"oid" int,
primary key("oid")
)
/*
1 example row:
SELECT * FROM organization LIMIT 1;
continent ||homepage ||name ||oid
*/
CREATE TABLE "publication_keyword" (
"pid" int,
"kid" int,
primary key ("kid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("kid") references "keyword"("kid")
)
/*
1 example row:
SELECT * FROM publication_keyword LIMIT 1;
pid ||kid
*/
CREATE TABLE "writes" (
"aid" int,
"pid" int,
primary key ("aid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("aid") references "author"("aid")
)
/*
1 example row:
SELECT * FROM writes LIMIT 1;
aid ||pid
*/
CREATE TABLE "cite" (
"cited" int,
"citing" int,
foreign key("cited") references "publication"("pid"),
foreign key("citing") references "publication"("pid")
)
/*
1 example row:
SELECT * FROM cite LIMIT 1;
cited ||citing
*/
### Question
return me the authors who have more than 10 papers containing keyword " Relational Database " .
|
[query_database(**{'query': 'SELECT t2.name FROM publication_keyword AS t5 JOIN keyword AS t1 ON t5.kid = t1.kid JOIN publication AS t3 ON t3.pid = t5.pid JOIN writes AS t4 ON t4.pid = t3.pid JOIN author AS t2 ON t4.aid = t2.aid WHERE t1.keyword = "Relational Database" GROUP BY t2.name HAVING COUNT ( DISTINCT t3.title ) > 10;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "author" (
"aid" int,
"homepage" text,
"name" text,
"oid" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM author LIMIT 1;
aid ||homepage ||name ||oid
*/
CREATE TABLE "conference" (
"cid" int,
"homepage" text,
"name" text,
primary key ("cid")
)
/*
1 example row:
SELECT * FROM conference LIMIT 1;
cid ||homepage ||name
*/
CREATE TABLE "domain" (
"did" int,
"name" text,
primary key ("did")
)
/*
1 example row:
SELECT * FROM domain LIMIT 1;
did ||name
*/
CREATE TABLE "domain_author" (
"aid" int,
"did" int,
primary key ("did", "aid"),
foreign key("aid") references `author`("aid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_author LIMIT 1;
aid ||did
*/
CREATE TABLE "domain_conference" (
"cid" int,
"did" int,
primary key ("did", "cid"),
foreign key("cid") references `conference`("cid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_conference LIMIT 1;
cid ||did
*/
CREATE TABLE "journal" (
"homepage" text,
"jid" int,
"name" text,
primary key("jid")
)
/*
1 example row:
SELECT * FROM journal LIMIT 1;
homepage ||jid ||name
*/
CREATE TABLE "domain_journal" (
"did" int,
"jid" int,
primary key ("did", "jid"),
foreign key("jid") references "journal"("jid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_journal LIMIT 1;
did ||jid
*/
CREATE TABLE "keyword" (
"keyword" text,
"kid" int,
primary key("kid")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
keyword ||kid
*/
CREATE TABLE "domain_keyword" (
"did" int,
"kid" int,
primary key ("did", "kid"),
foreign key("kid") references "keyword"("kid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_keyword LIMIT 1;
did ||kid
*/
CREATE TABLE "publication" (
"abstract" text,
"cid" text,
"citation_num" int,
"jid" int,
"pid" int,
"reference_num" int,
"title" text,
"year" int,
primary key("pid"),
foreign key("jid") references "journal"("jid"),
foreign key("cid") references "conference"("cid")
)
/*
1 example row:
SELECT * FROM publication LIMIT 1;
abstract ||cid ||citation_num ||jid ||pid ||reference_num ||title ||year
*/
CREATE TABLE "domain_publication" (
"did" int,
"pid" int,
primary key ("did", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_publication LIMIT 1;
did ||pid
*/
CREATE TABLE "organization" (
"continent" text,
"homepage" text,
"name" text,
"oid" int,
primary key("oid")
)
/*
1 example row:
SELECT * FROM organization LIMIT 1;
continent ||homepage ||name ||oid
*/
CREATE TABLE "publication_keyword" (
"pid" int,
"kid" int,
primary key ("kid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("kid") references "keyword"("kid")
)
/*
1 example row:
SELECT * FROM publication_keyword LIMIT 1;
pid ||kid
*/
CREATE TABLE "writes" (
"aid" int,
"pid" int,
primary key ("aid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("aid") references "author"("aid")
)
/*
1 example row:
SELECT * FROM writes LIMIT 1;
aid ||pid
*/
CREATE TABLE "cite" (
"cited" int,
"citing" int,
foreign key("cited") references "publication"("pid"),
foreign key("citing") references "publication"("pid")
)
/*
1 example row:
SELECT * FROM cite LIMIT 1;
cited ||citing
*/
|
1,419 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
3170,
1,
2456,
1,
3864,
1,
528,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
1,
590,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3229,
10592,
220,
16,
26,
4815,
12576,
1393,
53119,
1393,
609,
1393,
590,
33006,
6343,
23421,
14700,
330,
79590,
1,
2456,
1,
21200,
1,
528,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
6682,
1401,
3573,
21200,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10017,
10592,
220,
16,
26,
4815,
33241,
1393,
53119,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
1,
2456,
1,
23770,
1,
528,
345,
32586,
1,
1495,
345,
6682,
1401,
3573,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
10592,
220,
16,
26,
4815,
1550,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
23790,
1,
2456,
1,
3864,
1,
528,
11,
720,
1,
23770,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
3864,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
3170,
63,
446,
3864,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
12482,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
23790,
10592,
220,
16,
26,
4815,
12576,
1393,
23770,
33006,
6343,
23421,
14700,
330,
12482,
3464,
2251,
1,
2456,
1,
21200,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
21200,
4561,
29543,
1401,
446,
21200,
909,
15407,
1595,
79590,
63,
446,
21200,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
12482,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
3464,
2251,
10592,
220,
16,
26,
4815,
33241,
1393,
23770,
33006,
6343,
23421,
14700,
330,
43618,
1,
2456,
1,
53119,
1,
1495,
345,
1,
73976,
1,
528,
345,
32586,
1,
1495,
345,
6682,
1401,
446,
73976,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8486,
10592,
220,
16,
26,
4815,
35689,
1393,
73976,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
86175,
1,
2456,
1,
23770,
1,
528,
345,
1,
73976,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
73976,
4561,
29543,
1401,
446,
73976,
909,
15407,
330,
43618,
1,
446,
73976,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
86175,
10592,
220,
16,
26,
4815,
1550,
1393,
73976,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
1,
20454,
1,
1495,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
16570,
1393,
64381,
33006,
6343,
23421,
14700,
330,
12482,
46924,
1,
2456,
1,
23770,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
64381,
4561,
29543,
1401,
446,
64381,
909,
15407,
330,
20454,
1,
446,
64381,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
46924,
10592,
220,
16,
26,
4815,
1550,
1393,
64381,
33006,
6343,
23421,
14700,
330,
72260,
1,
2456,
1,
16647,
1,
1495,
345,
1,
21200,
1,
1495,
345,
1,
84247,
4369,
1,
528,
345,
1,
73976,
1,
528,
345,
1,
10629,
1,
528,
345,
1,
16690,
4369,
1,
528,
345,
83827,
1,
1495,
345,
1,
3236,
1,
528,
345,
6682,
1401,
446,
10629,
4561,
29543,
1401,
446,
73976,
909,
15407,
330,
43618,
1,
446,
73976,
4561,
29543,
1401,
446,
21200,
909,
15407,
330,
79590,
1,
446,
21200,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17009,
10592,
220,
16,
26,
4815,
8278,
1393,
21200,
1393,
84247,
4369,
1393,
73976,
1393,
10629,
1393,
16690,
4369,
1393,
2150,
1393,
3236,
33006,
6343,
23421,
14700,
330,
12482,
28173,
367,
1,
2456,
1,
23770,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
28173,
367,
10592,
220,
16,
26,
4815,
1550,
1393,
10629,
33006,
6343,
23421,
14700,
330,
24844,
1,
2456,
1,
75695,
1,
1495,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
1,
590,
1,
528,
345,
6682,
1401,
446,
590,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7471,
10592,
220,
16,
26,
4815,
32843,
1393,
53119,
1393,
609,
1393,
590,
33006,
6343,
23421,
14700,
330,
72260,
46924,
1,
2456,
1,
10629,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
3573,
64381,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
64381,
909,
15407,
330,
20454,
1,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17009,
46924,
10592,
220,
16,
26,
4815,
15158,
1393,
64381,
33006,
6343,
23421,
14700,
330,
60179,
1,
2456,
1,
3864,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
3573,
3864,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
3864,
909,
15407,
330,
3170,
1,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
14238,
10592,
220,
16,
26,
4815,
12576,
1393,
10629,
33006,
6343,
23421,
14700,
330,
68175,
1,
2456,
98046,
1639,
1,
528,
345,
98046,
5977,
1,
220,
528,
345,
29543,
1401,
446,
66,
1639,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
66,
5977,
909,
15407,
330,
72260,
1,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
39396,
10592,
220,
16,
26,
4815,
22628,
1393,
66,
5977,
33006,
6343,
14711,
16225,
198,
693,
757,
279,
21513,
11,
902,
617,
1027,
13282,
555,
810,
1109,
220,
1041,
16064,
304,
393,
31798,
3590,
662,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
16,
75011,
4393,
17009,
46924,
5871,
259,
19,
13369,
16570,
5871,
259,
16,
6328,
259,
19,
5314,
307,
220,
284,
220,
259,
16,
5314,
307,
13369,
17009,
5871,
259,
17,
6328,
259,
17,
42039,
220,
284,
220,
259,
19,
42039,
13369,
8486,
5871,
259,
18,
6328,
259,
17,
1190,
307,
220,
284,
220,
259,
18,
1190,
307,
5401,
259,
18,
2710,
220,
284,
220,
330,
47,
31798,
3590,
1,
27968,
7866,
259,
16,
75011,
473,
84822,
24945,
320,
60186,
259,
17,
6195,
883,
220,
871,
220,
220,
1041,
37094,
5525,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
16,
75011,
4393,
17009,
46924,
5871,
259,
19,
13369,
16570,
5871,
259,
16,
6328,
259,
19,
5314,
307,
220,
284,
220,
259,
16,
5314,
307,
13369,
17009,
5871,
259,
17,
6328,
259,
17,
42039,
220,
284,
220,
259,
19,
42039,
13369,
8486,
5871,
259,
18,
6328,
259,
17,
1190,
307,
220,
284,
220,
259,
18,
1190,
307,
5401,
259,
18,
2710,
220,
284,
220,
330,
47,
31798,
3590,
1,
27968,
7866,
259,
16,
75011,
473,
84822,
24945,
320,
60186,
259,
17,
6195,
883,
220,
871,
220,
220,
1041,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "author" (
"aid" int,
"homepage" text,
"name" text,
"oid" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM author LIMIT 1;
aid ||homepage ||name ||oid
*/
CREATE TABLE "conference" (
"cid" int,
"homepage" text,
"name" text,
primary key ("cid")
)
/*
1 example row:
SELECT * FROM conference LIMIT 1;
cid ||homepage ||name
*/
CREATE TABLE "domain" (
"did" int,
"name" text,
primary key ("did")
)
/*
1 example row:
SELECT * FROM domain LIMIT 1;
did ||name
*/
CREATE TABLE "domain_author" (
"aid" int,
"did" int,
primary key ("did", "aid"),
foreign key("aid") references `author`("aid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_author LIMIT 1;
aid ||did
*/
CREATE TABLE "domain_conference" (
"cid" int,
"did" int,
primary key ("did", "cid"),
foreign key("cid") references `conference`("cid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_conference LIMIT 1;
cid ||did
*/
CREATE TABLE "journal" (
"homepage" text,
"jid" int,
"name" text,
primary key("jid")
)
/*
1 example row:
SELECT * FROM journal LIMIT 1;
homepage ||jid ||name
*/
CREATE TABLE "domain_journal" (
"did" int,
"jid" int,
primary key ("did", "jid"),
foreign key("jid") references "journal"("jid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_journal LIMIT 1;
did ||jid
*/
CREATE TABLE "keyword" (
"keyword" text,
"kid" int,
primary key("kid")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
keyword ||kid
*/
CREATE TABLE "domain_keyword" (
"did" int,
"kid" int,
primary key ("did", "kid"),
foreign key("kid") references "keyword"("kid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_keyword LIMIT 1;
did ||kid
*/
CREATE TABLE "publication" (
"abstract" text,
"cid" text,
"citation_num" int,
"jid" int,
"pid" int,
"reference_num" int,
"title" text,
"year" int,
primary key("pid"),
foreign key("jid") references "journal"("jid"),
foreign key("cid") references "conference"("cid")
)
/*
1 example row:
SELECT * FROM publication LIMIT 1;
abstract ||cid ||citation_num ||jid ||pid ||reference_num ||title ||year
*/
CREATE TABLE "domain_publication" (
"did" int,
"pid" int,
primary key ("did", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_publication LIMIT 1;
did ||pid
*/
CREATE TABLE "organization" (
"continent" text,
"homepage" text,
"name" text,
"oid" int,
primary key("oid")
)
/*
1 example row:
SELECT * FROM organization LIMIT 1;
continent ||homepage ||name ||oid
*/
CREATE TABLE "publication_keyword" (
"pid" int,
"kid" int,
primary key ("kid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("kid") references "keyword"("kid")
)
/*
1 example row:
SELECT * FROM publication_keyword LIMIT 1;
pid ||kid
*/
CREATE TABLE "writes" (
"aid" int,
"pid" int,
primary key ("aid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("aid") references "author"("aid")
)
/*
1 example row:
SELECT * FROM writes LIMIT 1;
aid ||pid
*/
CREATE TABLE "cite" (
"cited" int,
"citing" int,
foreign key("cited") references "publication"("pid"),
foreign key("citing") references "publication"("pid")
)
/*
1 example row:
SELECT * FROM cite LIMIT 1;
cited ||citing
*/
### Question
return me the keywords, which have been contained by more than 100 papers in PVLDB .
|
[query_database(**{'query': 'SELECT t1.keyword FROM publication_keyword AS t4 JOIN keyword AS t1 ON t4.kid = t1.kid JOIN publication AS t2 ON t2.pid = t4.pid JOIN journal AS t3 ON t2.jid = t3.jid WHERE t3.name = "PVLDB" GROUP BY t1.keyword HAVING COUNT ( DISTINCT t2.title ) > 100;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "author" (
"aid" int,
"homepage" text,
"name" text,
"oid" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM author LIMIT 1;
aid ||homepage ||name ||oid
*/
CREATE TABLE "conference" (
"cid" int,
"homepage" text,
"name" text,
primary key ("cid")
)
/*
1 example row:
SELECT * FROM conference LIMIT 1;
cid ||homepage ||name
*/
CREATE TABLE "domain" (
"did" int,
"name" text,
primary key ("did")
)
/*
1 example row:
SELECT * FROM domain LIMIT 1;
did ||name
*/
CREATE TABLE "domain_author" (
"aid" int,
"did" int,
primary key ("did", "aid"),
foreign key("aid") references `author`("aid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_author LIMIT 1;
aid ||did
*/
CREATE TABLE "domain_conference" (
"cid" int,
"did" int,
primary key ("did", "cid"),
foreign key("cid") references `conference`("cid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_conference LIMIT 1;
cid ||did
*/
CREATE TABLE "journal" (
"homepage" text,
"jid" int,
"name" text,
primary key("jid")
)
/*
1 example row:
SELECT * FROM journal LIMIT 1;
homepage ||jid ||name
*/
CREATE TABLE "domain_journal" (
"did" int,
"jid" int,
primary key ("did", "jid"),
foreign key("jid") references "journal"("jid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_journal LIMIT 1;
did ||jid
*/
CREATE TABLE "keyword" (
"keyword" text,
"kid" int,
primary key("kid")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
keyword ||kid
*/
CREATE TABLE "domain_keyword" (
"did" int,
"kid" int,
primary key ("did", "kid"),
foreign key("kid") references "keyword"("kid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_keyword LIMIT 1;
did ||kid
*/
CREATE TABLE "publication" (
"abstract" text,
"cid" text,
"citation_num" int,
"jid" int,
"pid" int,
"reference_num" int,
"title" text,
"year" int,
primary key("pid"),
foreign key("jid") references "journal"("jid"),
foreign key("cid") references "conference"("cid")
)
/*
1 example row:
SELECT * FROM publication LIMIT 1;
abstract ||cid ||citation_num ||jid ||pid ||reference_num ||title ||year
*/
CREATE TABLE "domain_publication" (
"did" int,
"pid" int,
primary key ("did", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_publication LIMIT 1;
did ||pid
*/
CREATE TABLE "organization" (
"continent" text,
"homepage" text,
"name" text,
"oid" int,
primary key("oid")
)
/*
1 example row:
SELECT * FROM organization LIMIT 1;
continent ||homepage ||name ||oid
*/
CREATE TABLE "publication_keyword" (
"pid" int,
"kid" int,
primary key ("kid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("kid") references "keyword"("kid")
)
/*
1 example row:
SELECT * FROM publication_keyword LIMIT 1;
pid ||kid
*/
CREATE TABLE "writes" (
"aid" int,
"pid" int,
primary key ("aid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("aid") references "author"("aid")
)
/*
1 example row:
SELECT * FROM writes LIMIT 1;
aid ||pid
*/
CREATE TABLE "cite" (
"cited" int,
"citing" int,
foreign key("cited") references "publication"("pid"),
foreign key("citing") references "publication"("pid")
)
/*
1 example row:
SELECT * FROM cite LIMIT 1;
cited ||citing
*/
|
1,423 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
3170,
1,
2456,
1,
3864,
1,
528,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
1,
590,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3229,
10592,
220,
16,
26,
4815,
12576,
1393,
53119,
1393,
609,
1393,
590,
33006,
6343,
23421,
14700,
330,
79590,
1,
2456,
1,
21200,
1,
528,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
6682,
1401,
3573,
21200,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10017,
10592,
220,
16,
26,
4815,
33241,
1393,
53119,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
1,
2456,
1,
23770,
1,
528,
345,
32586,
1,
1495,
345,
6682,
1401,
3573,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
10592,
220,
16,
26,
4815,
1550,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
23790,
1,
2456,
1,
3864,
1,
528,
11,
720,
1,
23770,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
3864,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
3170,
63,
446,
3864,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
12482,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
23790,
10592,
220,
16,
26,
4815,
12576,
1393,
23770,
33006,
6343,
23421,
14700,
330,
12482,
3464,
2251,
1,
2456,
1,
21200,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
21200,
4561,
29543,
1401,
446,
21200,
909,
15407,
1595,
79590,
63,
446,
21200,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
12482,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
3464,
2251,
10592,
220,
16,
26,
4815,
33241,
1393,
23770,
33006,
6343,
23421,
14700,
330,
43618,
1,
2456,
1,
53119,
1,
1495,
345,
1,
73976,
1,
528,
345,
32586,
1,
1495,
345,
6682,
1401,
446,
73976,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8486,
10592,
220,
16,
26,
4815,
35689,
1393,
73976,
1393,
609,
33006,
6343,
23421,
14700,
330,
12482,
86175,
1,
2456,
1,
23770,
1,
528,
345,
1,
73976,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
73976,
4561,
29543,
1401,
446,
73976,
909,
15407,
330,
43618,
1,
446,
73976,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
86175,
10592,
220,
16,
26,
4815,
1550,
1393,
73976,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
1,
20454,
1,
1495,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
16570,
1393,
64381,
33006,
6343,
23421,
14700,
330,
12482,
46924,
1,
2456,
1,
23770,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
64381,
4561,
29543,
1401,
446,
64381,
909,
15407,
330,
20454,
1,
446,
64381,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
46924,
10592,
220,
16,
26,
4815,
1550,
1393,
64381,
33006,
6343,
23421,
14700,
330,
72260,
1,
2456,
1,
16647,
1,
1495,
345,
1,
21200,
1,
1495,
345,
1,
84247,
4369,
1,
528,
345,
1,
73976,
1,
528,
345,
1,
10629,
1,
528,
345,
1,
16690,
4369,
1,
528,
345,
83827,
1,
1495,
345,
1,
3236,
1,
528,
345,
6682,
1401,
446,
10629,
4561,
29543,
1401,
446,
73976,
909,
15407,
330,
43618,
1,
446,
73976,
4561,
29543,
1401,
446,
21200,
909,
15407,
330,
79590,
1,
446,
21200,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17009,
10592,
220,
16,
26,
4815,
8278,
1393,
21200,
1393,
84247,
4369,
1393,
73976,
1393,
10629,
1393,
16690,
4369,
1393,
2150,
1393,
3236,
33006,
6343,
23421,
14700,
330,
12482,
28173,
367,
1,
2456,
1,
23770,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
3573,
23770,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
23770,
909,
15407,
330,
12482,
1,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
8106,
28173,
367,
10592,
220,
16,
26,
4815,
1550,
1393,
10629,
33006,
6343,
23421,
14700,
330,
24844,
1,
2456,
1,
75695,
1,
1495,
345,
1,
53119,
1,
1495,
345,
32586,
1,
1495,
345,
1,
590,
1,
528,
345,
6682,
1401,
446,
590,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7471,
10592,
220,
16,
26,
4815,
32843,
1393,
53119,
1393,
609,
1393,
590,
33006,
6343,
23421,
14700,
330,
72260,
46924,
1,
2456,
1,
10629,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
3573,
64381,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
64381,
909,
15407,
330,
20454,
1,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17009,
46924,
10592,
220,
16,
26,
4815,
15158,
1393,
64381,
33006,
6343,
23421,
14700,
330,
60179,
1,
2456,
1,
3864,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
3573,
3864,
498,
330,
10629,
4561,
29543,
1401,
446,
10629,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
3864,
909,
15407,
330,
3170,
1,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
14238,
10592,
220,
16,
26,
4815,
12576,
1393,
10629,
33006,
6343,
23421,
14700,
330,
68175,
1,
2456,
98046,
1639,
1,
528,
345,
98046,
5977,
1,
220,
528,
345,
29543,
1401,
446,
66,
1639,
909,
15407,
330,
72260,
1,
446,
10629,
4561,
29543,
1401,
446,
66,
5977,
909,
15407,
330,
72260,
1,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
39396,
10592,
220,
16,
26,
4815,
22628,
1393,
66,
5977,
33006,
6343,
14711,
16225,
198,
693,
757,
279,
3229,
304,
279,
330,
3907,
315,
14972,
330,
6832,
16064,
617,
810,
1109,
220,
2636,
15,
2860,
52946,
662,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
16,
2710,
4393,
7471,
5871,
259,
17,
13369,
3229,
5871,
259,
16,
6328,
259,
17,
13,
590,
220,
284,
220,
259,
16,
13,
590,
13369,
14238,
5871,
259,
18,
6328,
259,
18,
13,
3864,
220,
284,
220,
259,
16,
13,
3864,
13369,
17009,
5871,
259,
19,
6328,
259,
18,
42039,
220,
284,
220,
259,
19,
42039,
5401,
259,
17,
2710,
220,
284,
220,
330,
31272,
315,
14972,
1,
27968,
7866,
259,
16,
2710,
473,
84822,
31835,
320,
259,
19,
522,
7709,
4369,
883,
220,
871,
220,
220,
2636,
15,
37094,
5525,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
16,
2710,
4393,
7471,
5871,
259,
17,
13369,
3229,
5871,
259,
16,
6328,
259,
17,
13,
590,
220,
284,
220,
259,
16,
13,
590,
13369,
14238,
5871,
259,
18,
6328,
259,
18,
13,
3864,
220,
284,
220,
259,
16,
13,
3864,
13369,
17009,
5871,
259,
19,
6328,
259,
18,
42039,
220,
284,
220,
259,
19,
42039,
5401,
259,
17,
2710,
220,
284,
220,
330,
31272,
315,
14972,
1,
27968,
7866,
259,
16,
2710,
473,
84822,
31835,
320,
259,
19,
522,
7709,
4369,
883,
220,
871,
220,
220,
2636,
15,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "author" (
"aid" int,
"homepage" text,
"name" text,
"oid" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM author LIMIT 1;
aid ||homepage ||name ||oid
*/
CREATE TABLE "conference" (
"cid" int,
"homepage" text,
"name" text,
primary key ("cid")
)
/*
1 example row:
SELECT * FROM conference LIMIT 1;
cid ||homepage ||name
*/
CREATE TABLE "domain" (
"did" int,
"name" text,
primary key ("did")
)
/*
1 example row:
SELECT * FROM domain LIMIT 1;
did ||name
*/
CREATE TABLE "domain_author" (
"aid" int,
"did" int,
primary key ("did", "aid"),
foreign key("aid") references `author`("aid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_author LIMIT 1;
aid ||did
*/
CREATE TABLE "domain_conference" (
"cid" int,
"did" int,
primary key ("did", "cid"),
foreign key("cid") references `conference`("cid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_conference LIMIT 1;
cid ||did
*/
CREATE TABLE "journal" (
"homepage" text,
"jid" int,
"name" text,
primary key("jid")
)
/*
1 example row:
SELECT * FROM journal LIMIT 1;
homepage ||jid ||name
*/
CREATE TABLE "domain_journal" (
"did" int,
"jid" int,
primary key ("did", "jid"),
foreign key("jid") references "journal"("jid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_journal LIMIT 1;
did ||jid
*/
CREATE TABLE "keyword" (
"keyword" text,
"kid" int,
primary key("kid")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
keyword ||kid
*/
CREATE TABLE "domain_keyword" (
"did" int,
"kid" int,
primary key ("did", "kid"),
foreign key("kid") references "keyword"("kid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_keyword LIMIT 1;
did ||kid
*/
CREATE TABLE "publication" (
"abstract" text,
"cid" text,
"citation_num" int,
"jid" int,
"pid" int,
"reference_num" int,
"title" text,
"year" int,
primary key("pid"),
foreign key("jid") references "journal"("jid"),
foreign key("cid") references "conference"("cid")
)
/*
1 example row:
SELECT * FROM publication LIMIT 1;
abstract ||cid ||citation_num ||jid ||pid ||reference_num ||title ||year
*/
CREATE TABLE "domain_publication" (
"did" int,
"pid" int,
primary key ("did", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_publication LIMIT 1;
did ||pid
*/
CREATE TABLE "organization" (
"continent" text,
"homepage" text,
"name" text,
"oid" int,
primary key("oid")
)
/*
1 example row:
SELECT * FROM organization LIMIT 1;
continent ||homepage ||name ||oid
*/
CREATE TABLE "publication_keyword" (
"pid" int,
"kid" int,
primary key ("kid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("kid") references "keyword"("kid")
)
/*
1 example row:
SELECT * FROM publication_keyword LIMIT 1;
pid ||kid
*/
CREATE TABLE "writes" (
"aid" int,
"pid" int,
primary key ("aid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("aid") references "author"("aid")
)
/*
1 example row:
SELECT * FROM writes LIMIT 1;
aid ||pid
*/
CREATE TABLE "cite" (
"cited" int,
"citing" int,
foreign key("cited") references "publication"("pid"),
foreign key("citing") references "publication"("pid")
)
/*
1 example row:
SELECT * FROM cite LIMIT 1;
cited ||citing
*/
### Question
return me the author in the " University of Michigan " whose papers have more than 5000 total citations .
|
[query_database(**{'query': 'SELECT t1.name FROM organization AS t2 JOIN author AS t1 ON t2.oid = t1.oid JOIN writes AS t3 ON t3.aid = t1.aid JOIN publication AS t4 ON t3.pid = t4.pid WHERE t2.name = "University of Michigan" GROUP BY t1.name HAVING SUM ( t4.citation_num ) > 5000;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "author" (
"aid" int,
"homepage" text,
"name" text,
"oid" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM author LIMIT 1;
aid ||homepage ||name ||oid
*/
CREATE TABLE "conference" (
"cid" int,
"homepage" text,
"name" text,
primary key ("cid")
)
/*
1 example row:
SELECT * FROM conference LIMIT 1;
cid ||homepage ||name
*/
CREATE TABLE "domain" (
"did" int,
"name" text,
primary key ("did")
)
/*
1 example row:
SELECT * FROM domain LIMIT 1;
did ||name
*/
CREATE TABLE "domain_author" (
"aid" int,
"did" int,
primary key ("did", "aid"),
foreign key("aid") references `author`("aid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_author LIMIT 1;
aid ||did
*/
CREATE TABLE "domain_conference" (
"cid" int,
"did" int,
primary key ("did", "cid"),
foreign key("cid") references `conference`("cid"),
foreign key("did") references `domain`("did")
)
/*
1 example row:
SELECT * FROM domain_conference LIMIT 1;
cid ||did
*/
CREATE TABLE "journal" (
"homepage" text,
"jid" int,
"name" text,
primary key("jid")
)
/*
1 example row:
SELECT * FROM journal LIMIT 1;
homepage ||jid ||name
*/
CREATE TABLE "domain_journal" (
"did" int,
"jid" int,
primary key ("did", "jid"),
foreign key("jid") references "journal"("jid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_journal LIMIT 1;
did ||jid
*/
CREATE TABLE "keyword" (
"keyword" text,
"kid" int,
primary key("kid")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
keyword ||kid
*/
CREATE TABLE "domain_keyword" (
"did" int,
"kid" int,
primary key ("did", "kid"),
foreign key("kid") references "keyword"("kid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_keyword LIMIT 1;
did ||kid
*/
CREATE TABLE "publication" (
"abstract" text,
"cid" text,
"citation_num" int,
"jid" int,
"pid" int,
"reference_num" int,
"title" text,
"year" int,
primary key("pid"),
foreign key("jid") references "journal"("jid"),
foreign key("cid") references "conference"("cid")
)
/*
1 example row:
SELECT * FROM publication LIMIT 1;
abstract ||cid ||citation_num ||jid ||pid ||reference_num ||title ||year
*/
CREATE TABLE "domain_publication" (
"did" int,
"pid" int,
primary key ("did", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("did") references "domain"("did")
)
/*
1 example row:
SELECT * FROM domain_publication LIMIT 1;
did ||pid
*/
CREATE TABLE "organization" (
"continent" text,
"homepage" text,
"name" text,
"oid" int,
primary key("oid")
)
/*
1 example row:
SELECT * FROM organization LIMIT 1;
continent ||homepage ||name ||oid
*/
CREATE TABLE "publication_keyword" (
"pid" int,
"kid" int,
primary key ("kid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("kid") references "keyword"("kid")
)
/*
1 example row:
SELECT * FROM publication_keyword LIMIT 1;
pid ||kid
*/
CREATE TABLE "writes" (
"aid" int,
"pid" int,
primary key ("aid", "pid"),
foreign key("pid") references "publication"("pid"),
foreign key("aid") references "author"("aid")
)
/*
1 example row:
SELECT * FROM writes LIMIT 1;
aid ||pid
*/
CREATE TABLE "cite" (
"cited" int,
"citing" int,
foreign key("cited") references "publication"("pid"),
foreign key("citing") references "publication"("pid")
)
/*
1 example row:
SELECT * FROM cite LIMIT 1;
cited ||citing
*/
|
1,427 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
5739,
1,
2456,
1,
3864,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
12360,
10592,
220,
16,
26,
4815,
12576,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
15859,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
21200,
1,
528,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7065,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
21200,
33006,
6343,
23421,
14700,
330,
3914,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
3864,
1,
528,
345,
1,
5898,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
5739,
63,
446,
3864,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
6445,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
3864,
1393,
5898,
33006,
6343,
23421,
14700,
330,
34713,
1,
2456,
1,
35949,
1,
528,
345,
1,
34713,
1,
1495,
345,
6682,
1401,
446,
35949,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17779,
10592,
220,
16,
26,
4815,
46963,
1393,
34713,
33006,
6343,
23421,
14700,
330,
66481,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
35949,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
35949,
909,
15407,
1595,
34713,
63,
446,
35949,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
24790,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
35949,
33006,
6343,
23421,
14700,
330,
10348,
1,
2456,
29800,
1,
528,
345,
32586,
1,
1495,
345,
1,
11389,
4229,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
2883,
10592,
220,
16,
26,
4815,
887,
1393,
609,
1393,
11389,
4229,
33006,
6343,
23421,
14700,
330,
70895,
1,
2456,
1,
23770,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7690,
10592,
220,
16,
26,
4815,
1550,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
60012,
1,
2456,
1,
10629,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17276,
10592,
220,
16,
26,
4815,
15158,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
20384,
291,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
70895,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15910,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
23770,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
29800,
1,
528,
345,
1,
20454,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
887,
1393,
20454,
33006,
6343,
23421,
14700,
330,
28010,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
10629,
909,
15407,
1595,
60012,
63,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1903,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
10629,
33006,
6343,
23421,
14700,
330,
20633,
1,
2456,
1,
16497,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
16497,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5818,
10592,
220,
16,
26,
4815,
5209,
1393,
2150,
1393,
23859,
14987,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
14412,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
64381,
909,
15407,
1595,
20454,
63,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
9681,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
64381,
33006,
6343,
23421,
14700,
330,
23001,
36115,
1,
2456,
1,
21703,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
1,
2470,
3659,
79825,
82,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
21703,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
11333,
36115,
10592,
220,
16,
26,
4815,
14414,
1393,
2150,
1393,
23859,
14987,
1393,
2470,
3659,
79825,
82,
1393,
2470,
3659,
98107,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
18688,
1,
2456,
1,
44715,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
528,
345,
1,
42240,
488,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7061,
10592,
220,
16,
26,
4815,
9923,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
2470,
3659,
98107,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
26650,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
44715,
1,
528,
345,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
44715,
909,
15407,
1595,
18688,
63,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5439,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
44715,
33006,
6343,
14711,
16225,
198,
3923,
1060,
574,
330,
62245,
356,
900,
14377,
330,
9405,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
7342,
14987,
4393,
12360,
5401,
836,
220,
284,
220,
330,
33,
6901,
858,
356,
900,
14377,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
7342,
14987,
4393,
12360,
5401,
836,
220,
284,
220,
330,
33,
6901,
858,
356,
900,
14377,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
### Question
What year was " Benedict Cumberbatch " born ?
|
[query_database(**{'query': 'SELECT birth_year FROM actor WHERE name = "Benedict Cumberbatch";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
|
1,431 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
5739,
1,
2456,
1,
3864,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
12360,
10592,
220,
16,
26,
4815,
12576,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
15859,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
21200,
1,
528,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7065,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
21200,
33006,
6343,
23421,
14700,
330,
3914,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
3864,
1,
528,
345,
1,
5898,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
5739,
63,
446,
3864,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
6445,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
3864,
1393,
5898,
33006,
6343,
23421,
14700,
330,
34713,
1,
2456,
1,
35949,
1,
528,
345,
1,
34713,
1,
1495,
345,
6682,
1401,
446,
35949,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17779,
10592,
220,
16,
26,
4815,
46963,
1393,
34713,
33006,
6343,
23421,
14700,
330,
66481,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
35949,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
35949,
909,
15407,
1595,
34713,
63,
446,
35949,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
24790,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
35949,
33006,
6343,
23421,
14700,
330,
10348,
1,
2456,
29800,
1,
528,
345,
32586,
1,
1495,
345,
1,
11389,
4229,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
2883,
10592,
220,
16,
26,
4815,
887,
1393,
609,
1393,
11389,
4229,
33006,
6343,
23421,
14700,
330,
70895,
1,
2456,
1,
23770,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7690,
10592,
220,
16,
26,
4815,
1550,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
60012,
1,
2456,
1,
10629,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17276,
10592,
220,
16,
26,
4815,
15158,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
20384,
291,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
70895,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15910,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
23770,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
29800,
1,
528,
345,
1,
20454,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
887,
1393,
20454,
33006,
6343,
23421,
14700,
330,
28010,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
10629,
909,
15407,
1595,
60012,
63,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1903,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
10629,
33006,
6343,
23421,
14700,
330,
20633,
1,
2456,
1,
16497,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
16497,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5818,
10592,
220,
16,
26,
4815,
5209,
1393,
2150,
1393,
23859,
14987,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
14412,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
64381,
909,
15407,
1595,
20454,
63,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
9681,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
64381,
33006,
6343,
23421,
14700,
330,
23001,
36115,
1,
2456,
1,
21703,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
1,
2470,
3659,
79825,
82,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
21703,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
11333,
36115,
10592,
220,
16,
26,
4815,
14414,
1393,
2150,
1393,
23859,
14987,
1393,
2470,
3659,
79825,
82,
1393,
2470,
3659,
98107,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
18688,
1,
2456,
1,
44715,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
528,
345,
1,
42240,
488,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7061,
10592,
220,
16,
26,
4815,
9923,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
2470,
3659,
98107,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
26650,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
44715,
1,
528,
345,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
44715,
909,
15407,
1595,
18688,
63,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5439,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
44715,
33006,
6343,
14711,
16225,
198,
10086,
682,
9698,
9124,
304,
220,
679,
20,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
2316,
4393,
5818,
5401,
4984,
14987,
220,
284,
220,
220,
679,
20,
37094,
5525,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
2316,
4393,
5818,
5401,
4984,
14987,
220,
284,
220,
220,
679,
20,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
### Question
Find all movies produced in 2015
|
[query_database(**{'query': 'SELECT title FROM movie WHERE release_year = 2015;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
|
1,435 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
5739,
1,
2456,
1,
3864,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
12360,
10592,
220,
16,
26,
4815,
12576,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
15859,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
21200,
1,
528,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7065,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
21200,
33006,
6343,
23421,
14700,
330,
3914,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
3864,
1,
528,
345,
1,
5898,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
5739,
63,
446,
3864,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
6445,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
3864,
1393,
5898,
33006,
6343,
23421,
14700,
330,
34713,
1,
2456,
1,
35949,
1,
528,
345,
1,
34713,
1,
1495,
345,
6682,
1401,
446,
35949,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17779,
10592,
220,
16,
26,
4815,
46963,
1393,
34713,
33006,
6343,
23421,
14700,
330,
66481,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
35949,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
35949,
909,
15407,
1595,
34713,
63,
446,
35949,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
24790,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
35949,
33006,
6343,
23421,
14700,
330,
10348,
1,
2456,
29800,
1,
528,
345,
32586,
1,
1495,
345,
1,
11389,
4229,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
2883,
10592,
220,
16,
26,
4815,
887,
1393,
609,
1393,
11389,
4229,
33006,
6343,
23421,
14700,
330,
70895,
1,
2456,
1,
23770,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7690,
10592,
220,
16,
26,
4815,
1550,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
60012,
1,
2456,
1,
10629,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17276,
10592,
220,
16,
26,
4815,
15158,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
20384,
291,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
70895,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15910,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
23770,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
29800,
1,
528,
345,
1,
20454,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
887,
1393,
20454,
33006,
6343,
23421,
14700,
330,
28010,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
10629,
909,
15407,
1595,
60012,
63,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1903,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
10629,
33006,
6343,
23421,
14700,
330,
20633,
1,
2456,
1,
16497,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
16497,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5818,
10592,
220,
16,
26,
4815,
5209,
1393,
2150,
1393,
23859,
14987,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
14412,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
64381,
909,
15407,
1595,
20454,
63,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
9681,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
64381,
33006,
6343,
23421,
14700,
330,
23001,
36115,
1,
2456,
1,
21703,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
1,
2470,
3659,
79825,
82,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
21703,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
11333,
36115,
10592,
220,
16,
26,
4815,
14414,
1393,
2150,
1393,
23859,
14987,
1393,
2470,
3659,
79825,
82,
1393,
2470,
3659,
98107,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
18688,
1,
2456,
1,
44715,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
528,
345,
1,
42240,
488,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7061,
10592,
220,
16,
26,
4815,
9923,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
2470,
3659,
98107,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
26650,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
44715,
1,
528,
345,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
44715,
909,
15407,
1595,
18688,
63,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5439,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
44715,
33006,
6343,
14711,
16225,
198,
10086,
682,
20142,
889,
527,
505,
21139,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
836,
4393,
12360,
5401,
59343,
220,
284,
220,
330,
55439,
16083,
9121,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
836,
4393,
12360,
5401,
59343,
220,
284,
220,
330,
55439,
16083,
9121,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
### Question
Find all actors who are from Afghanistan
|
[query_database(**{'query': 'SELECT name FROM actor WHERE nationality = "Afghanistan";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
|
1,439 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
5739,
1,
2456,
1,
3864,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
12360,
10592,
220,
16,
26,
4815,
12576,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
15859,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
21200,
1,
528,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7065,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
21200,
33006,
6343,
23421,
14700,
330,
3914,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
3864,
1,
528,
345,
1,
5898,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
5739,
63,
446,
3864,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
6445,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
3864,
1393,
5898,
33006,
6343,
23421,
14700,
330,
34713,
1,
2456,
1,
35949,
1,
528,
345,
1,
34713,
1,
1495,
345,
6682,
1401,
446,
35949,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17779,
10592,
220,
16,
26,
4815,
46963,
1393,
34713,
33006,
6343,
23421,
14700,
330,
66481,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
35949,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
35949,
909,
15407,
1595,
34713,
63,
446,
35949,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
24790,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
35949,
33006,
6343,
23421,
14700,
330,
10348,
1,
2456,
29800,
1,
528,
345,
32586,
1,
1495,
345,
1,
11389,
4229,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
2883,
10592,
220,
16,
26,
4815,
887,
1393,
609,
1393,
11389,
4229,
33006,
6343,
23421,
14700,
330,
70895,
1,
2456,
1,
23770,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7690,
10592,
220,
16,
26,
4815,
1550,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
60012,
1,
2456,
1,
10629,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17276,
10592,
220,
16,
26,
4815,
15158,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
20384,
291,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
70895,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15910,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
23770,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
29800,
1,
528,
345,
1,
20454,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
887,
1393,
20454,
33006,
6343,
23421,
14700,
330,
28010,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
10629,
909,
15407,
1595,
60012,
63,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1903,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
10629,
33006,
6343,
23421,
14700,
330,
20633,
1,
2456,
1,
16497,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
16497,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5818,
10592,
220,
16,
26,
4815,
5209,
1393,
2150,
1393,
23859,
14987,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
14412,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
64381,
909,
15407,
1595,
20454,
63,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
9681,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
64381,
33006,
6343,
23421,
14700,
330,
23001,
36115,
1,
2456,
1,
21703,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
1,
2470,
3659,
79825,
82,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
21703,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
11333,
36115,
10592,
220,
16,
26,
4815,
14414,
1393,
2150,
1393,
23859,
14987,
1393,
2470,
3659,
79825,
82,
1393,
2470,
3659,
98107,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
18688,
1,
2456,
1,
44715,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
528,
345,
1,
42240,
488,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7061,
10592,
220,
16,
26,
4815,
9923,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
2470,
3659,
98107,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
26650,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
44715,
1,
528,
345,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
44715,
909,
15407,
1595,
18688,
63,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5439,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
44715,
33006,
6343,
14711,
16225,
198,
4599,
574,
330,
16768,
11746,
88,
330,
9405,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
7342,
14987,
4393,
12360,
5401,
836,
220,
284,
220,
330,
5739,
1292,
15,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
7342,
14987,
4393,
12360,
5401,
836,
220,
284,
220,
330,
5739,
1292,
15,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
### Question
When was " Kevin Spacey " born ?
|
[query_database(**{'query': 'SELECT birth_year FROM actor WHERE name = "actor_name0";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
|
1,443 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
5739,
1,
2456,
1,
3864,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
12360,
10592,
220,
16,
26,
4815,
12576,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
15859,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
21200,
1,
528,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7065,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
21200,
33006,
6343,
23421,
14700,
330,
3914,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
3864,
1,
528,
345,
1,
5898,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
5739,
63,
446,
3864,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
6445,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
3864,
1393,
5898,
33006,
6343,
23421,
14700,
330,
34713,
1,
2456,
1,
35949,
1,
528,
345,
1,
34713,
1,
1495,
345,
6682,
1401,
446,
35949,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17779,
10592,
220,
16,
26,
4815,
46963,
1393,
34713,
33006,
6343,
23421,
14700,
330,
66481,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
35949,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
35949,
909,
15407,
1595,
34713,
63,
446,
35949,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
24790,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
35949,
33006,
6343,
23421,
14700,
330,
10348,
1,
2456,
29800,
1,
528,
345,
32586,
1,
1495,
345,
1,
11389,
4229,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
2883,
10592,
220,
16,
26,
4815,
887,
1393,
609,
1393,
11389,
4229,
33006,
6343,
23421,
14700,
330,
70895,
1,
2456,
1,
23770,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7690,
10592,
220,
16,
26,
4815,
1550,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
60012,
1,
2456,
1,
10629,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17276,
10592,
220,
16,
26,
4815,
15158,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
20384,
291,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
70895,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15910,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
23770,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
29800,
1,
528,
345,
1,
20454,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
887,
1393,
20454,
33006,
6343,
23421,
14700,
330,
28010,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
10629,
909,
15407,
1595,
60012,
63,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1903,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
10629,
33006,
6343,
23421,
14700,
330,
20633,
1,
2456,
1,
16497,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
16497,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5818,
10592,
220,
16,
26,
4815,
5209,
1393,
2150,
1393,
23859,
14987,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
14412,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
64381,
909,
15407,
1595,
20454,
63,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
9681,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
64381,
33006,
6343,
23421,
14700,
330,
23001,
36115,
1,
2456,
1,
21703,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
1,
2470,
3659,
79825,
82,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
21703,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
11333,
36115,
10592,
220,
16,
26,
4815,
14414,
1393,
2150,
1393,
23859,
14987,
1393,
2470,
3659,
79825,
82,
1393,
2470,
3659,
98107,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
18688,
1,
2456,
1,
44715,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
528,
345,
1,
42240,
488,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7061,
10592,
220,
16,
26,
4815,
9923,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
2470,
3659,
98107,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
26650,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
44715,
1,
528,
345,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
44715,
909,
15407,
1595,
18688,
63,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5439,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
44715,
33006,
6343,
14711,
16225,
198,
3923,
374,
279,
59343,
315,
330,
16768,
11746,
88,
330,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
59343,
4393,
7690,
5401,
836,
220,
284,
220,
330,
70895,
1292,
15,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
59343,
4393,
7690,
5401,
836,
220,
284,
220,
330,
70895,
1292,
15,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
### Question
What is the nationality of " Kevin Spacey " ?
|
[query_database(**{'query': 'SELECT nationality FROM director WHERE name = "director_name0";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
|
1,447 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
5739,
1,
2456,
1,
3864,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
12360,
10592,
220,
16,
26,
4815,
12576,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
15859,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
21200,
1,
528,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7065,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
21200,
33006,
6343,
23421,
14700,
330,
3914,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
3864,
1,
528,
345,
1,
5898,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
5739,
63,
446,
3864,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
6445,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
3864,
1393,
5898,
33006,
6343,
23421,
14700,
330,
34713,
1,
2456,
1,
35949,
1,
528,
345,
1,
34713,
1,
1495,
345,
6682,
1401,
446,
35949,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17779,
10592,
220,
16,
26,
4815,
46963,
1393,
34713,
33006,
6343,
23421,
14700,
330,
66481,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
35949,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
35949,
909,
15407,
1595,
34713,
63,
446,
35949,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
24790,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
35949,
33006,
6343,
23421,
14700,
330,
10348,
1,
2456,
29800,
1,
528,
345,
32586,
1,
1495,
345,
1,
11389,
4229,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
2883,
10592,
220,
16,
26,
4815,
887,
1393,
609,
1393,
11389,
4229,
33006,
6343,
23421,
14700,
330,
70895,
1,
2456,
1,
23770,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7690,
10592,
220,
16,
26,
4815,
1550,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
60012,
1,
2456,
1,
10629,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17276,
10592,
220,
16,
26,
4815,
15158,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
20384,
291,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
70895,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15910,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
23770,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
29800,
1,
528,
345,
1,
20454,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
887,
1393,
20454,
33006,
6343,
23421,
14700,
330,
28010,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
10629,
909,
15407,
1595,
60012,
63,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1903,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
10629,
33006,
6343,
23421,
14700,
330,
20633,
1,
2456,
1,
16497,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
16497,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5818,
10592,
220,
16,
26,
4815,
5209,
1393,
2150,
1393,
23859,
14987,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
14412,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
64381,
909,
15407,
1595,
20454,
63,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
9681,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
64381,
33006,
6343,
23421,
14700,
330,
23001,
36115,
1,
2456,
1,
21703,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
1,
2470,
3659,
79825,
82,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
21703,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
11333,
36115,
10592,
220,
16,
26,
4815,
14414,
1393,
2150,
1393,
23859,
14987,
1393,
2470,
3659,
79825,
82,
1393,
2470,
3659,
98107,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
18688,
1,
2456,
1,
44715,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
528,
345,
1,
42240,
488,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7061,
10592,
220,
16,
26,
4815,
9923,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
2470,
3659,
98107,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
26650,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
44715,
1,
528,
345,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
44715,
909,
15407,
1595,
18688,
63,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5439,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
44715,
33006,
6343,
14711,
16225,
198,
15546,
15910,
279,
5818,
330,
7957,
24537,
330,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
2710,
4393,
7690,
5871,
259,
17,
13369,
15910,
3795,
5871,
259,
16,
6328,
259,
17,
49054,
220,
284,
220,
259,
16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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
2710,
4393,
7690,
5871,
259,
17,
13369,
15910,
3795,
5871,
259,
16,
6328,
259,
17,
49054,
220,
284,
220,
259,
16,
49054,
13369,
5818,
5871,
259,
18,
6328,
259,
18,
49171,
220,
284,
220,
259,
16,
749,
21703,
5401,
259,
18,
6195,
220,
284,
220,
330,
29184,
24537,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
### Question
Who directed the movie " James Bond " ?
|
[query_database(**{'query': 'SELECT t2.name FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t3.title = "James Bond";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
|
1,451 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
5739,
1,
2456,
1,
3864,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
12360,
10592,
220,
16,
26,
4815,
12576,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
15859,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
21200,
1,
528,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7065,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
21200,
33006,
6343,
23421,
14700,
330,
3914,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
3864,
1,
528,
345,
1,
5898,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
5739,
63,
446,
3864,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
6445,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
3864,
1393,
5898,
33006,
6343,
23421,
14700,
330,
34713,
1,
2456,
1,
35949,
1,
528,
345,
1,
34713,
1,
1495,
345,
6682,
1401,
446,
35949,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17779,
10592,
220,
16,
26,
4815,
46963,
1393,
34713,
33006,
6343,
23421,
14700,
330,
66481,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
35949,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
35949,
909,
15407,
1595,
34713,
63,
446,
35949,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
24790,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
35949,
33006,
6343,
23421,
14700,
330,
10348,
1,
2456,
29800,
1,
528,
345,
32586,
1,
1495,
345,
1,
11389,
4229,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
2883,
10592,
220,
16,
26,
4815,
887,
1393,
609,
1393,
11389,
4229,
33006,
6343,
23421,
14700,
330,
70895,
1,
2456,
1,
23770,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7690,
10592,
220,
16,
26,
4815,
1550,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
60012,
1,
2456,
1,
10629,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17276,
10592,
220,
16,
26,
4815,
15158,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
20384,
291,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
70895,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15910,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
23770,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
29800,
1,
528,
345,
1,
20454,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
887,
1393,
20454,
33006,
6343,
23421,
14700,
330,
28010,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
10629,
909,
15407,
1595,
60012,
63,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1903,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
10629,
33006,
6343,
23421,
14700,
330,
20633,
1,
2456,
1,
16497,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
16497,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5818,
10592,
220,
16,
26,
4815,
5209,
1393,
2150,
1393,
23859,
14987,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
14412,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
64381,
909,
15407,
1595,
20454,
63,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
9681,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
64381,
33006,
6343,
23421,
14700,
330,
23001,
36115,
1,
2456,
1,
21703,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
1,
2470,
3659,
79825,
82,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
21703,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
11333,
36115,
10592,
220,
16,
26,
4815,
14414,
1393,
2150,
1393,
23859,
14987,
1393,
2470,
3659,
79825,
82,
1393,
2470,
3659,
98107,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
18688,
1,
2456,
1,
44715,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
528,
345,
1,
42240,
488,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7061,
10592,
220,
16,
26,
4815,
9923,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
2470,
3659,
98107,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
26650,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
44715,
1,
528,
345,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
44715,
909,
15407,
1595,
18688,
63,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5439,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
44715,
33006,
6343,
14711,
16225,
198,
15546,
574,
279,
12360,
430,
6476,
330,
26349,
95530,
330,
304,
279,
5818,
330,
578,
358,
1800,
367,
4140,
330,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
16,
2710,
4393,
62787,
5871,
259,
17,
13369,
12360,
5871,
259,
16,
6328,
259,
17,
13,
3864,
220,
284,
220,
259,
16,
13,
3864,
13369,
5818,
5871,
259,
18,
6328,
259,
18,
49171,
220,
284,
220,
259,
17,
749,
21703,
5401,
259,
17,
27097,
220,
284,
220,
330,
68724,
95530,
1,
3651,
259,
18,
6195,
220,
284,
220,
330,
791,
358,
1800,
367,
4140,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
16,
2710,
4393,
62787,
5871,
259,
17,
13369,
12360,
5871,
259,
16,
6328,
259,
17,
13,
3864,
220,
284,
220,
259,
16,
13,
3864,
13369,
5818,
5871,
259,
18,
6328,
259,
18,
49171,
220,
284,
220,
259,
17,
749,
21703,
5401,
259,
17,
27097,
220,
284,
220,
330,
68724,
95530,
1,
3651,
259,
18,
6195,
220,
284,
220,
330,
791,
358,
1800,
367,
4140,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
### Question
Who was the actor that played " Alan Turing " in the movie " The Imitation Game " ?
|
[query_database(**{'query': 'SELECT t1.name FROM CAST AS t2 JOIN actor AS t1 ON t2.aid = t1.aid JOIN movie AS t3 ON t3.mid = t2.msid WHERE t2.role = "Alan Turing" AND t3.title = "The Imitation Game";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
|
1,455 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
5739,
1,
2456,
1,
3864,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
12360,
10592,
220,
16,
26,
4815,
12576,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
15859,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
21200,
1,
528,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7065,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
21200,
33006,
6343,
23421,
14700,
330,
3914,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
3864,
1,
528,
345,
1,
5898,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
5739,
63,
446,
3864,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
6445,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
3864,
1393,
5898,
33006,
6343,
23421,
14700,
330,
34713,
1,
2456,
1,
35949,
1,
528,
345,
1,
34713,
1,
1495,
345,
6682,
1401,
446,
35949,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17779,
10592,
220,
16,
26,
4815,
46963,
1393,
34713,
33006,
6343,
23421,
14700,
330,
66481,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
35949,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
35949,
909,
15407,
1595,
34713,
63,
446,
35949,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
24790,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
35949,
33006,
6343,
23421,
14700,
330,
10348,
1,
2456,
29800,
1,
528,
345,
32586,
1,
1495,
345,
1,
11389,
4229,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
2883,
10592,
220,
16,
26,
4815,
887,
1393,
609,
1393,
11389,
4229,
33006,
6343,
23421,
14700,
330,
70895,
1,
2456,
1,
23770,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7690,
10592,
220,
16,
26,
4815,
1550,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
60012,
1,
2456,
1,
10629,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17276,
10592,
220,
16,
26,
4815,
15158,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
20384,
291,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
70895,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15910,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
23770,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
29800,
1,
528,
345,
1,
20454,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
887,
1393,
20454,
33006,
6343,
23421,
14700,
330,
28010,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
10629,
909,
15407,
1595,
60012,
63,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1903,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
10629,
33006,
6343,
23421,
14700,
330,
20633,
1,
2456,
1,
16497,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
16497,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5818,
10592,
220,
16,
26,
4815,
5209,
1393,
2150,
1393,
23859,
14987,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
14412,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
64381,
909,
15407,
1595,
20454,
63,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
9681,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
64381,
33006,
6343,
23421,
14700,
330,
23001,
36115,
1,
2456,
1,
21703,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
1,
2470,
3659,
79825,
82,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
21703,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
11333,
36115,
10592,
220,
16,
26,
4815,
14414,
1393,
2150,
1393,
23859,
14987,
1393,
2470,
3659,
79825,
82,
1393,
2470,
3659,
98107,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
18688,
1,
2456,
1,
44715,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
528,
345,
1,
42240,
488,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7061,
10592,
220,
16,
26,
4815,
9923,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
2470,
3659,
98107,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
26650,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
44715,
1,
528,
345,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
44715,
909,
15407,
1595,
18688,
63,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5439,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
44715,
33006,
6343,
14711,
16225,
198,
15546,
574,
279,
7690,
315,
279,
5818,
28237,
505,
220,
679,
20,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
2710,
4393,
7690,
5871,
259,
17,
13369,
15910,
3795,
5871,
259,
16,
6328,
259,
17,
49054,
220,
284,
220,
259,
16,
49054,
13369,
5818,
5871,
259,
18,
6328,
259,
18,
49171,
220,
284,
220,
259,
16,
749,
21703,
5401,
259,
18,
26642,
14987,
220,
284,
220,
220,
679,
20,
3651,
259,
18,
6195,
220,
284,
220,
330,
80871,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
2710,
4393,
7690,
5871,
259,
17,
13369,
15910,
3795,
5871,
259,
16,
6328,
259,
17,
49054,
220,
284,
220,
259,
16,
49054,
13369,
5818,
5871,
259,
18,
6328,
259,
18,
49171,
220,
284,
220,
259,
16,
749,
21703,
5401,
259,
18,
26642,
14987,
220,
284,
220,
220,
679,
20,
3651,
259,
18,
6195,
220,
284,
220,
330,
80871,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
### Question
Who was the director of the movie Joy from 2015 ?
|
[query_database(**{'query': 'SELECT t2.name FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t3.release_year = 2015 AND t3.title = "Joy";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
|
1,459 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
5739,
1,
2456,
1,
3864,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
12360,
10592,
220,
16,
26,
4815,
12576,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
15859,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
21200,
1,
528,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7065,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
21200,
33006,
6343,
23421,
14700,
330,
3914,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
3864,
1,
528,
345,
1,
5898,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
5739,
63,
446,
3864,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
6445,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
3864,
1393,
5898,
33006,
6343,
23421,
14700,
330,
34713,
1,
2456,
1,
35949,
1,
528,
345,
1,
34713,
1,
1495,
345,
6682,
1401,
446,
35949,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17779,
10592,
220,
16,
26,
4815,
46963,
1393,
34713,
33006,
6343,
23421,
14700,
330,
66481,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
35949,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
35949,
909,
15407,
1595,
34713,
63,
446,
35949,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
24790,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
35949,
33006,
6343,
23421,
14700,
330,
10348,
1,
2456,
29800,
1,
528,
345,
32586,
1,
1495,
345,
1,
11389,
4229,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
2883,
10592,
220,
16,
26,
4815,
887,
1393,
609,
1393,
11389,
4229,
33006,
6343,
23421,
14700,
330,
70895,
1,
2456,
1,
23770,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7690,
10592,
220,
16,
26,
4815,
1550,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
60012,
1,
2456,
1,
10629,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17276,
10592,
220,
16,
26,
4815,
15158,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
20384,
291,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
70895,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15910,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
23770,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
29800,
1,
528,
345,
1,
20454,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
887,
1393,
20454,
33006,
6343,
23421,
14700,
330,
28010,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
10629,
909,
15407,
1595,
60012,
63,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1903,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
10629,
33006,
6343,
23421,
14700,
330,
20633,
1,
2456,
1,
16497,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
16497,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5818,
10592,
220,
16,
26,
4815,
5209,
1393,
2150,
1393,
23859,
14987,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
14412,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
64381,
909,
15407,
1595,
20454,
63,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
9681,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
64381,
33006,
6343,
23421,
14700,
330,
23001,
36115,
1,
2456,
1,
21703,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
1,
2470,
3659,
79825,
82,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
21703,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
11333,
36115,
10592,
220,
16,
26,
4815,
14414,
1393,
2150,
1393,
23859,
14987,
1393,
2470,
3659,
79825,
82,
1393,
2470,
3659,
98107,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
18688,
1,
2456,
1,
44715,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
528,
345,
1,
42240,
488,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7061,
10592,
220,
16,
26,
4815,
9923,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
2470,
3659,
98107,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
26650,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
44715,
1,
528,
345,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
44715,
909,
15407,
1595,
18688,
63,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5439,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
44715,
33006,
6343,
14711,
16225,
198,
3923,
527,
682,
279,
9698,
16850,
330,
17582,
27839,
330,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
6195,
4393,
62787,
5871,
259,
18,
13369,
12360,
5871,
259,
16,
6328,
259,
18,
13,
3864,
220,
284,
220,
259,
16,
13,
3864,
13369,
5818,
5871,
259,
17,
6328,
259,
17,
49171,
220,
284,
220,
259,
18,
749,
21703,
5401,
259,
16,
2710,
220,
284,
220,
330,
77771,
27839,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
6195,
4393,
62787,
5871,
259,
18,
13369,
12360,
5871,
259,
16,
6328,
259,
18,
13,
3864,
220,
284,
220,
259,
16,
13,
3864,
13369,
5818,
5871,
259,
17,
6328,
259,
17,
49171,
220,
284,
220,
259,
18,
749,
21703,
5401,
259,
16,
2710,
220,
284,
220,
330,
77771,
27839,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
### Question
What are all the movies featuring " Robin Wright " ?
|
[query_database(**{'query': 'SELECT t2.title FROM CAST AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.name = "Robin Wright";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
|
1,463 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
5739,
1,
2456,
1,
3864,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
12360,
10592,
220,
16,
26,
4815,
12576,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
15859,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
21200,
1,
528,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7065,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
21200,
33006,
6343,
23421,
14700,
330,
3914,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
3864,
1,
528,
345,
1,
5898,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
5739,
63,
446,
3864,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
6445,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
3864,
1393,
5898,
33006,
6343,
23421,
14700,
330,
34713,
1,
2456,
1,
35949,
1,
528,
345,
1,
34713,
1,
1495,
345,
6682,
1401,
446,
35949,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17779,
10592,
220,
16,
26,
4815,
46963,
1393,
34713,
33006,
6343,
23421,
14700,
330,
66481,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
35949,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
35949,
909,
15407,
1595,
34713,
63,
446,
35949,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
24790,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
35949,
33006,
6343,
23421,
14700,
330,
10348,
1,
2456,
29800,
1,
528,
345,
32586,
1,
1495,
345,
1,
11389,
4229,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
2883,
10592,
220,
16,
26,
4815,
887,
1393,
609,
1393,
11389,
4229,
33006,
6343,
23421,
14700,
330,
70895,
1,
2456,
1,
23770,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7690,
10592,
220,
16,
26,
4815,
1550,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
60012,
1,
2456,
1,
10629,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17276,
10592,
220,
16,
26,
4815,
15158,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
20384,
291,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
70895,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15910,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
23770,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
29800,
1,
528,
345,
1,
20454,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
887,
1393,
20454,
33006,
6343,
23421,
14700,
330,
28010,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
10629,
909,
15407,
1595,
60012,
63,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1903,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
10629,
33006,
6343,
23421,
14700,
330,
20633,
1,
2456,
1,
16497,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
16497,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5818,
10592,
220,
16,
26,
4815,
5209,
1393,
2150,
1393,
23859,
14987,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
14412,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
64381,
909,
15407,
1595,
20454,
63,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
9681,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
64381,
33006,
6343,
23421,
14700,
330,
23001,
36115,
1,
2456,
1,
21703,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
1,
2470,
3659,
79825,
82,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
21703,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
11333,
36115,
10592,
220,
16,
26,
4815,
14414,
1393,
2150,
1393,
23859,
14987,
1393,
2470,
3659,
79825,
82,
1393,
2470,
3659,
98107,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
18688,
1,
2456,
1,
44715,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
528,
345,
1,
42240,
488,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7061,
10592,
220,
16,
26,
4815,
9923,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
2470,
3659,
98107,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
26650,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
44715,
1,
528,
345,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
44715,
909,
15407,
1595,
18688,
63,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5439,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
44715,
33006,
6343,
14711,
16225,
198,
861,
682,
279,
41472,
27395,
9698,
902,
6004,
304,
220,
679,
15,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
18,
6195,
4393,
17779,
5871,
259,
17,
13369,
24790,
5871,
259,
16,
6328,
259,
17,
1326,
307,
220,
284,
220,
259,
16,
1326,
307,
13369,
5818,
5871,
259,
18,
6328,
259,
18,
49171,
220,
284,
220,
259,
16,
749,
21703,
5401,
259,
17,
85967,
220,
284,
220,
330,
91792,
27395,
1,
3651,
259,
18,
26642,
14987,
220,
284,
220,
220,
679,
15,
37094,
5525,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
18,
6195,
4393,
17779,
5871,
259,
17,
13369,
24790,
5871,
259,
16,
6328,
259,
17,
1326,
307,
220,
284,
220,
259,
16,
1326,
307,
13369,
5818,
5871,
259,
18,
6328,
259,
18,
49171,
220,
284,
220,
259,
16,
749,
21703,
5401,
259,
17,
85967,
220,
284,
220,
330,
91792,
27395,
1,
3651,
259,
18,
26642,
14987,
220,
284,
220,
220,
679,
15,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
### Question
List all the Sci-Fi movies which released in 2010
|
[query_database(**{'query': 'SELECT t3.title FROM genre AS t2 JOIN classification AS t1 ON t2.gid = t1.gid JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.genre = "Sci-Fi" AND t3.release_year = 2010;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
|
1,467 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
5739,
1,
2456,
1,
3864,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
12360,
10592,
220,
16,
26,
4815,
12576,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
15859,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
21200,
1,
528,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7065,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
21200,
33006,
6343,
23421,
14700,
330,
3914,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
3864,
1,
528,
345,
1,
5898,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
5739,
63,
446,
3864,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
6445,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
3864,
1393,
5898,
33006,
6343,
23421,
14700,
330,
34713,
1,
2456,
1,
35949,
1,
528,
345,
1,
34713,
1,
1495,
345,
6682,
1401,
446,
35949,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17779,
10592,
220,
16,
26,
4815,
46963,
1393,
34713,
33006,
6343,
23421,
14700,
330,
66481,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
35949,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
35949,
909,
15407,
1595,
34713,
63,
446,
35949,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
24790,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
35949,
33006,
6343,
23421,
14700,
330,
10348,
1,
2456,
29800,
1,
528,
345,
32586,
1,
1495,
345,
1,
11389,
4229,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
2883,
10592,
220,
16,
26,
4815,
887,
1393,
609,
1393,
11389,
4229,
33006,
6343,
23421,
14700,
330,
70895,
1,
2456,
1,
23770,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7690,
10592,
220,
16,
26,
4815,
1550,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
60012,
1,
2456,
1,
10629,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17276,
10592,
220,
16,
26,
4815,
15158,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
20384,
291,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
70895,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15910,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
23770,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
29800,
1,
528,
345,
1,
20454,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
887,
1393,
20454,
33006,
6343,
23421,
14700,
330,
28010,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
10629,
909,
15407,
1595,
60012,
63,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1903,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
10629,
33006,
6343,
23421,
14700,
330,
20633,
1,
2456,
1,
16497,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
16497,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5818,
10592,
220,
16,
26,
4815,
5209,
1393,
2150,
1393,
23859,
14987,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
14412,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
64381,
909,
15407,
1595,
20454,
63,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
9681,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
64381,
33006,
6343,
23421,
14700,
330,
23001,
36115,
1,
2456,
1,
21703,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
1,
2470,
3659,
79825,
82,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
21703,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
11333,
36115,
10592,
220,
16,
26,
4815,
14414,
1393,
2150,
1393,
23859,
14987,
1393,
2470,
3659,
79825,
82,
1393,
2470,
3659,
98107,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
18688,
1,
2456,
1,
44715,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
528,
345,
1,
42240,
488,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7061,
10592,
220,
16,
26,
4815,
9923,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
2470,
3659,
98107,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
26650,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
44715,
1,
528,
345,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
44715,
909,
15407,
1595,
18688,
63,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5439,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
44715,
33006,
6343,
14711,
16225,
198,
10086,
682,
9698,
555,
28454,
9405,
304,
330,
9853,
12167,
330,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
18,
6195,
4393,
7690,
5871,
259,
17,
13369,
15910,
3795,
5871,
259,
16,
6328,
259,
17,
49054,
220,
284,
220,
259,
16,
49054,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
18,
6195,
4393,
7690,
5871,
259,
17,
13369,
15910,
3795,
5871,
259,
16,
6328,
259,
17,
49054,
220,
284,
220,
259,
16,
49054,
13369,
5818,
5871,
259,
18,
6328,
259,
18,
49171,
220,
284,
220,
259,
16,
749,
21703,
5401,
259,
17,
85082,
26019,
220,
284,
220,
330,
30696,
12167,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
### Question
Find all movies by directors born in " Los Angeles "
|
[query_database(**{'query': 'SELECT t3.title FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.birth_city = "Los Angeles";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
|
1,471 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
5739,
1,
2456,
1,
3864,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
12360,
10592,
220,
16,
26,
4815,
12576,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
15859,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
21200,
1,
528,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7065,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
21200,
33006,
6343,
23421,
14700,
330,
3914,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
3864,
1,
528,
345,
1,
5898,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
5739,
63,
446,
3864,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
6445,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
3864,
1393,
5898,
33006,
6343,
23421,
14700,
330,
34713,
1,
2456,
1,
35949,
1,
528,
345,
1,
34713,
1,
1495,
345,
6682,
1401,
446,
35949,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17779,
10592,
220,
16,
26,
4815,
46963,
1393,
34713,
33006,
6343,
23421,
14700,
330,
66481,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
35949,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
35949,
909,
15407,
1595,
34713,
63,
446,
35949,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
24790,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
35949,
33006,
6343,
23421,
14700,
330,
10348,
1,
2456,
29800,
1,
528,
345,
32586,
1,
1495,
345,
1,
11389,
4229,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
2883,
10592,
220,
16,
26,
4815,
887,
1393,
609,
1393,
11389,
4229,
33006,
6343,
23421,
14700,
330,
70895,
1,
2456,
1,
23770,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7690,
10592,
220,
16,
26,
4815,
1550,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
60012,
1,
2456,
1,
10629,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17276,
10592,
220,
16,
26,
4815,
15158,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
20384,
291,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
70895,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15910,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
23770,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
29800,
1,
528,
345,
1,
20454,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
887,
1393,
20454,
33006,
6343,
23421,
14700,
330,
28010,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
10629,
909,
15407,
1595,
60012,
63,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1903,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
10629,
33006,
6343,
23421,
14700,
330,
20633,
1,
2456,
1,
16497,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
16497,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5818,
10592,
220,
16,
26,
4815,
5209,
1393,
2150,
1393,
23859,
14987,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
14412,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
64381,
909,
15407,
1595,
20454,
63,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
9681,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
64381,
33006,
6343,
23421,
14700,
330,
23001,
36115,
1,
2456,
1,
21703,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
1,
2470,
3659,
79825,
82,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
21703,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
11333,
36115,
10592,
220,
16,
26,
4815,
14414,
1393,
2150,
1393,
23859,
14987,
1393,
2470,
3659,
79825,
82,
1393,
2470,
3659,
98107,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
18688,
1,
2456,
1,
44715,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
528,
345,
1,
42240,
488,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7061,
10592,
220,
16,
26,
4815,
9923,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
2470,
3659,
98107,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
26650,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
44715,
1,
528,
345,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
44715,
909,
15407,
1595,
18688,
63,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5439,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
44715,
33006,
6343,
14711,
16225,
198,
23956,
9698,
1550,
330,
42592,
71464,
38253,
330,
2167,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
18,
6195,
4393,
7690,
5871,
259,
17,
13369,
15910,
3795,
5871,
259,
16,
6328,
259,
17,
49054,
220,
284,
220,
259,
16,
49054,
13369,
5818,
5871,
259,
18,
6328,
259,
18,
49171,
220,
284,
220,
259,
16,
749,
21703,
5401,
259,
17,
2710,
220,
284,
220,
330,
2149,
29093,
71464,
38253,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
18,
6195,
4393,
7690,
5871,
259,
17,
13369,
15910,
3795,
5871,
259,
16,
6328,
259,
17,
49054,
220,
284,
220,
259,
16,
49054,
13369,
5818,
5871,
259,
18,
6328,
259,
18,
49171,
220,
284,
220,
259,
16,
749,
21703,
5401,
259,
17,
2710,
220,
284,
220,
330,
2149,
29093,
71464,
38253,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
### Question
Which movies did " Alfred Hitchcock " direct ?
|
[query_database(**{'query': 'SELECT t3.title FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.name = "Alfred Hitchcock";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
|
1,475 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
5739,
1,
2456,
1,
3864,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
12360,
10592,
220,
16,
26,
4815,
12576,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
15859,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
21200,
1,
528,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7065,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
21200,
33006,
6343,
23421,
14700,
330,
3914,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
3864,
1,
528,
345,
1,
5898,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
5739,
63,
446,
3864,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
6445,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
3864,
1393,
5898,
33006,
6343,
23421,
14700,
330,
34713,
1,
2456,
1,
35949,
1,
528,
345,
1,
34713,
1,
1495,
345,
6682,
1401,
446,
35949,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17779,
10592,
220,
16,
26,
4815,
46963,
1393,
34713,
33006,
6343,
23421,
14700,
330,
66481,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
35949,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
35949,
909,
15407,
1595,
34713,
63,
446,
35949,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
24790,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
35949,
33006,
6343,
23421,
14700,
330,
10348,
1,
2456,
29800,
1,
528,
345,
32586,
1,
1495,
345,
1,
11389,
4229,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
2883,
10592,
220,
16,
26,
4815,
887,
1393,
609,
1393,
11389,
4229,
33006,
6343,
23421,
14700,
330,
70895,
1,
2456,
1,
23770,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7690,
10592,
220,
16,
26,
4815,
1550,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
60012,
1,
2456,
1,
10629,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17276,
10592,
220,
16,
26,
4815,
15158,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
20384,
291,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
70895,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15910,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
23770,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
29800,
1,
528,
345,
1,
20454,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
887,
1393,
20454,
33006,
6343,
23421,
14700,
330,
28010,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
10629,
909,
15407,
1595,
60012,
63,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1903,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
10629,
33006,
6343,
23421,
14700,
330,
20633,
1,
2456,
1,
16497,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
16497,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5818,
10592,
220,
16,
26,
4815,
5209,
1393,
2150,
1393,
23859,
14987,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
14412,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
64381,
909,
15407,
1595,
20454,
63,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
9681,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
64381,
33006,
6343,
23421,
14700,
330,
23001,
36115,
1,
2456,
1,
21703,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
1,
2470,
3659,
79825,
82,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
21703,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
11333,
36115,
10592,
220,
16,
26,
4815,
14414,
1393,
2150,
1393,
23859,
14987,
1393,
2470,
3659,
79825,
82,
1393,
2470,
3659,
98107,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
18688,
1,
2456,
1,
44715,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
528,
345,
1,
42240,
488,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7061,
10592,
220,
16,
26,
4815,
9923,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
2470,
3659,
98107,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
26650,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
44715,
1,
528,
345,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
44715,
909,
15407,
1595,
18688,
63,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5439,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
44715,
33006,
6343,
14711,
16225,
198,
861,
682,
279,
9698,
15910,
555,
330,
1666,
876,
277,
13759,
71,
2836,
330,
304,
902,
330,
24912,
2194,
71,
1708,
5362,
71779,
330,
6476,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
19,
6195,
4393,
62787,
5871,
259,
20,
13369,
12360,
5871,
259,
16,
6328,
259,
20,
13,
3864,
220,
284,
220,
259,
16,
13,
3864,
13369,
5818,
5871,
259,
19,
6328,
259,
19,
49171,
220,
284,
220,
259,
20,
749,
21703,
13369,
15910,
3795,
5871,
259,
17,
6328,
259,
19,
49171,
220,
284,
220,
259,
17,
749,
21703,
13369,
7690,
5871,
259,
18,
6328,
259,
18,
49054,
220,
284,
220,
259,
17,
49054,
5401,
259,
16,
2710,
220,
284,
220,
330,
63833,
2194,
71,
1708,
5362,
71779,
1,
3651,
259,
18,
2710,
220,
284,
220,
330,
2170,
876,
277,
13759,
71,
2836,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
19,
6195,
4393,
62787,
5871,
259,
20,
13369,
12360,
5871,
259,
16,
6328,
259,
20,
13,
3864,
220,
284,
220,
259,
16,
13,
3864,
13369,
5818,
5871,
259,
19,
6328,
259,
19,
49171,
220,
284,
220,
259,
20,
749,
21703,
13369,
15910,
3795,
5871,
259,
17,
6328,
259,
19,
49171,
220,
284,
220,
259,
17,
749,
21703,
13369,
7690,
5871,
259,
18,
6328,
259,
18,
49054,
220,
284,
220,
259,
17,
49054,
5401,
259,
16,
2710,
220,
284,
220,
330,
63833,
2194,
71,
1708,
5362,
71779,
1,
3651,
259,
18,
2710,
220,
284,
220,
330,
2170,
876,
277,
13759,
71,
2836,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
### Question
List all the movies directed by " Asghar Farhadi " in which " Taraneh Alidoosti " played
|
[query_database(**{'query': 'SELECT t4.title FROM CAST AS t5 JOIN actor AS t1 ON t5.aid = t1.aid JOIN movie AS t4 ON t4.mid = t5.msid JOIN directed_by AS t2 ON t4.mid = t2.msid JOIN director AS t3 ON t3.did = t2.did WHERE t1.name = "Taraneh Alidoosti" AND t3.name = "Asghar Farhadi";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
|
1,479 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
5739,
1,
2456,
1,
3864,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
12360,
10592,
220,
16,
26,
4815,
12576,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
15859,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
21200,
1,
528,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7065,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
21200,
33006,
6343,
23421,
14700,
330,
3914,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
3864,
1,
528,
345,
1,
5898,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
5739,
63,
446,
3864,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
6445,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
3864,
1393,
5898,
33006,
6343,
23421,
14700,
330,
34713,
1,
2456,
1,
35949,
1,
528,
345,
1,
34713,
1,
1495,
345,
6682,
1401,
446,
35949,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17779,
10592,
220,
16,
26,
4815,
46963,
1393,
34713,
33006,
6343,
23421,
14700,
330,
66481,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
35949,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
35949,
909,
15407,
1595,
34713,
63,
446,
35949,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
24790,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
35949,
33006,
6343,
23421,
14700,
330,
10348,
1,
2456,
29800,
1,
528,
345,
32586,
1,
1495,
345,
1,
11389,
4229,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
2883,
10592,
220,
16,
26,
4815,
887,
1393,
609,
1393,
11389,
4229,
33006,
6343,
23421,
14700,
330,
70895,
1,
2456,
1,
23770,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7690,
10592,
220,
16,
26,
4815,
1550,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
60012,
1,
2456,
1,
10629,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17276,
10592,
220,
16,
26,
4815,
15158,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
20384,
291,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
70895,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15910,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
23770,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
29800,
1,
528,
345,
1,
20454,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
887,
1393,
20454,
33006,
6343,
23421,
14700,
330,
28010,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
10629,
909,
15407,
1595,
60012,
63,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1903,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
10629,
33006,
6343,
23421,
14700,
330,
20633,
1,
2456,
1,
16497,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
16497,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5818,
10592,
220,
16,
26,
4815,
5209,
1393,
2150,
1393,
23859,
14987,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
14412,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
64381,
909,
15407,
1595,
20454,
63,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
9681,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
64381,
33006,
6343,
23421,
14700,
330,
23001,
36115,
1,
2456,
1,
21703,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
1,
2470,
3659,
79825,
82,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
21703,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
11333,
36115,
10592,
220,
16,
26,
4815,
14414,
1393,
2150,
1393,
23859,
14987,
1393,
2470,
3659,
79825,
82,
1393,
2470,
3659,
98107,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
18688,
1,
2456,
1,
44715,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
528,
345,
1,
42240,
488,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7061,
10592,
220,
16,
26,
4815,
9923,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
2470,
3659,
98107,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
26650,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
44715,
1,
528,
345,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
44715,
909,
15407,
1595,
18688,
63,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5439,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
44715,
33006,
6343,
14711,
16225,
198,
15546,
374,
279,
7061,
315,
330,
578,
80936,
7073,
330,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
2710,
4393,
5439,
3795,
5871,
259,
18,
13369,
5818,
5871,
259,
16,
6328,
259,
18,
749,
21703,
220,
284,
220,
259,
16,
49171,
13369,
7061,
5871,
259,
17,
6328,
259,
18,
1444,
307,
220,
284,
220,
259,
17,
1444,
307,
5401,
259,
16,
6195,
220,
284,
220,
330,
791,
80936,
7073,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
2710,
4393,
5439,
3795,
5871,
259,
18,
13369,
5818,
5871,
259,
16,
6328,
259,
18,
749,
21703,
220,
284,
220,
259,
16,
49171,
13369,
7061,
5871,
259,
17,
6328,
259,
18,
1444,
307,
220,
284,
220,
259,
17,
1444,
307,
5401,
259,
16,
6195,
220,
284,
220,
330,
791,
80936,
7073,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
### Question
Who is the writer of " The Truman Show "
|
[query_database(**{'query': 'SELECT t2.name FROM written_by AS t3 JOIN movie AS t1 ON t3.msid = t1.mid JOIN writer AS t2 ON t3.wid = t2.wid WHERE t1.title = "The Truman Show";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
|
1,483 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
5739,
1,
2456,
1,
3864,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
12360,
10592,
220,
16,
26,
4815,
12576,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
15859,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
21200,
1,
528,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7065,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
21200,
33006,
6343,
23421,
14700,
330,
3914,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
3864,
1,
528,
345,
1,
5898,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
5739,
63,
446,
3864,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
6445,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
3864,
1393,
5898,
33006,
6343,
23421,
14700,
330,
34713,
1,
2456,
1,
35949,
1,
528,
345,
1,
34713,
1,
1495,
345,
6682,
1401,
446,
35949,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17779,
10592,
220,
16,
26,
4815,
46963,
1393,
34713,
33006,
6343,
23421,
14700,
330,
66481,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
35949,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
35949,
909,
15407,
1595,
34713,
63,
446,
35949,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
24790,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
35949,
33006,
6343,
23421,
14700,
330,
10348,
1,
2456,
29800,
1,
528,
345,
32586,
1,
1495,
345,
1,
11389,
4229,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
2883,
10592,
220,
16,
26,
4815,
887,
1393,
609,
1393,
11389,
4229,
33006,
6343,
23421,
14700,
330,
70895,
1,
2456,
1,
23770,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7690,
10592,
220,
16,
26,
4815,
1550,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
60012,
1,
2456,
1,
10629,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17276,
10592,
220,
16,
26,
4815,
15158,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
20384,
291,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
70895,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15910,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
23770,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
29800,
1,
528,
345,
1,
20454,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
887,
1393,
20454,
33006,
6343,
23421,
14700,
330,
28010,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
10629,
909,
15407,
1595,
60012,
63,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1903,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
10629,
33006,
6343,
23421,
14700,
330,
20633,
1,
2456,
1,
16497,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
16497,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5818,
10592,
220,
16,
26,
4815,
5209,
1393,
2150,
1393,
23859,
14987,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
14412,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
64381,
909,
15407,
1595,
20454,
63,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
9681,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
64381,
33006,
6343,
23421,
14700,
330,
23001,
36115,
1,
2456,
1,
21703,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
1,
2470,
3659,
79825,
82,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
21703,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
11333,
36115,
10592,
220,
16,
26,
4815,
14414,
1393,
2150,
1393,
23859,
14987,
1393,
2470,
3659,
79825,
82,
1393,
2470,
3659,
98107,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
18688,
1,
2456,
1,
44715,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
528,
345,
1,
42240,
488,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7061,
10592,
220,
16,
26,
4815,
9923,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
2470,
3659,
98107,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
26650,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
44715,
1,
528,
345,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
44715,
909,
15407,
1595,
18688,
63,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5439,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
44715,
33006,
6343,
14711,
16225,
198,
10086,
279,
24190,
315,
682,
9698,
304,
902,
330,
30301,
49544,
1169,
330,
374,
459,
12360,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
16,
2710,
4393,
62787,
5871,
259,
18,
13369,
12360,
5871,
259,
17,
6328,
259,
18,
13,
3864,
220,
284,
220,
259,
17,
13,
3864,
13369,
5818,
5871,
259,
20,
6328,
259,
20,
49171,
220,
284,
220,
259,
18,
749,
21703,
13369,
1903,
3795,
5871,
259,
19,
6328,
259,
20,
49171,
220,
284,
220,
259,
19,
749,
21703,
13369,
17276,
5871,
259,
16,
6328,
259,
16,
42039,
220,
284,
220,
259,
19,
42039,
5401,
259,
17,
2710,
220,
284,
220,
330,
80469,
49544,
1169,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
16,
2710,
4393,
62787,
5871,
259,
18,
13369,
12360,
5871,
259,
17,
6328,
259,
18,
13,
3864,
220,
284,
220,
259,
17,
13,
3864,
13369,
5818,
5871,
259,
20,
6328,
259,
20,
49171,
220,
284,
220,
259,
18,
749,
21703,
13369,
1903,
3795,
5871,
259,
19,
6328,
259,
20,
49171,
220,
284,
220,
259,
19,
749,
21703,
13369,
17276,
5871,
259,
16,
6328,
259,
16,
42039,
220,
284,
220,
259,
19,
42039,
5401,
259,
17,
2710,
220,
284,
220,
330,
80469,
49544,
1169,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
### Question
Find the producers of all movies in which " Kate Winslet " is an actor
|
[query_database(**{'query': 'SELECT t1.name FROM CAST AS t3 JOIN actor AS t2 ON t3.aid = t2.aid JOIN movie AS t5 ON t5.mid = t3.msid JOIN made_by AS t4 ON t5.mid = t4.msid JOIN producer AS t1 ON t1.pid = t4.pid WHERE t2.name = "Kate Winslet";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
|
1,487 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
5739,
1,
2456,
1,
3864,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
12360,
10592,
220,
16,
26,
4815,
12576,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
15859,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
21200,
1,
528,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7065,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
21200,
33006,
6343,
23421,
14700,
330,
3914,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
3864,
1,
528,
345,
1,
5898,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
5739,
63,
446,
3864,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
6445,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
3864,
1393,
5898,
33006,
6343,
23421,
14700,
330,
34713,
1,
2456,
1,
35949,
1,
528,
345,
1,
34713,
1,
1495,
345,
6682,
1401,
446,
35949,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17779,
10592,
220,
16,
26,
4815,
46963,
1393,
34713,
33006,
6343,
23421,
14700,
330,
66481,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
35949,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
35949,
909,
15407,
1595,
34713,
63,
446,
35949,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
24790,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
35949,
33006,
6343,
23421,
14700,
330,
10348,
1,
2456,
29800,
1,
528,
345,
32586,
1,
1495,
345,
1,
11389,
4229,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
2883,
10592,
220,
16,
26,
4815,
887,
1393,
609,
1393,
11389,
4229,
33006,
6343,
23421,
14700,
330,
70895,
1,
2456,
1,
23770,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7690,
10592,
220,
16,
26,
4815,
1550,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
60012,
1,
2456,
1,
10629,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17276,
10592,
220,
16,
26,
4815,
15158,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
20384,
291,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
70895,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15910,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
23770,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
29800,
1,
528,
345,
1,
20454,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
887,
1393,
20454,
33006,
6343,
23421,
14700,
330,
28010,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
10629,
909,
15407,
1595,
60012,
63,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1903,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
10629,
33006,
6343,
23421,
14700,
330,
20633,
1,
2456,
1,
16497,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
16497,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5818,
10592,
220,
16,
26,
4815,
5209,
1393,
2150,
1393,
23859,
14987,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
14412,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
64381,
909,
15407,
1595,
20454,
63,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
9681,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
64381,
33006,
6343,
23421,
14700,
330,
23001,
36115,
1,
2456,
1,
21703,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
1,
2470,
3659,
79825,
82,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
21703,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
11333,
36115,
10592,
220,
16,
26,
4815,
14414,
1393,
2150,
1393,
23859,
14987,
1393,
2470,
3659,
79825,
82,
1393,
2470,
3659,
98107,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
18688,
1,
2456,
1,
44715,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
528,
345,
1,
42240,
488,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7061,
10592,
220,
16,
26,
4815,
9923,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
2470,
3659,
98107,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
26650,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
44715,
1,
528,
345,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
44715,
909,
15407,
1595,
18688,
63,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5439,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
44715,
33006,
6343,
14711,
16225,
198,
10086,
682,
279,
8954,
20142,
9405,
304,
330,
1561,
4356,
4409,
330,
1306,
220,
3753,
15,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
836,
4393,
12360,
5401,
7342,
26019,
220,
284,
220,
330,
3648,
4356,
4409,
1,
3651,
7342,
14987,
220,
871,
220,
220,
3753,
15,
3651,
10026,
220,
284,
220,
330,
43734,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
836,
4393,
12360,
5401,
7342,
26019,
220,
284,
220,
330,
3648,
4356,
4409,
1,
3651,
7342,
14987,
220,
871,
220,
220,
3753,
15,
3651,
10026,
220,
284,
220,
330,
43734,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
### Question
Find all the female actors born in " New York City " after 1980
|
[query_database(**{'query': 'SELECT name FROM actor WHERE birth_city = "New York City" AND birth_year > 1980 AND gender = "female";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
|
1,491 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
5739,
1,
2456,
1,
3864,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
12360,
10592,
220,
16,
26,
4815,
12576,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
15859,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
21200,
1,
528,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7065,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
21200,
33006,
6343,
23421,
14700,
330,
3914,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
3864,
1,
528,
345,
1,
5898,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
5739,
63,
446,
3864,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
6445,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
3864,
1393,
5898,
33006,
6343,
23421,
14700,
330,
34713,
1,
2456,
1,
35949,
1,
528,
345,
1,
34713,
1,
1495,
345,
6682,
1401,
446,
35949,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17779,
10592,
220,
16,
26,
4815,
46963,
1393,
34713,
33006,
6343,
23421,
14700,
330,
66481,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
35949,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
35949,
909,
15407,
1595,
34713,
63,
446,
35949,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
24790,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
35949,
33006,
6343,
23421,
14700,
330,
10348,
1,
2456,
29800,
1,
528,
345,
32586,
1,
1495,
345,
1,
11389,
4229,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
2883,
10592,
220,
16,
26,
4815,
887,
1393,
609,
1393,
11389,
4229,
33006,
6343,
23421,
14700,
330,
70895,
1,
2456,
1,
23770,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7690,
10592,
220,
16,
26,
4815,
1550,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
60012,
1,
2456,
1,
10629,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17276,
10592,
220,
16,
26,
4815,
15158,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
20384,
291,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
70895,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15910,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
23770,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
29800,
1,
528,
345,
1,
20454,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
887,
1393,
20454,
33006,
6343,
23421,
14700,
330,
28010,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
10629,
909,
15407,
1595,
60012,
63,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1903,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
10629,
33006,
6343,
23421,
14700,
330,
20633,
1,
2456,
1,
16497,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
16497,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5818,
10592,
220,
16,
26,
4815,
5209,
1393,
2150,
1393,
23859,
14987,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
14412,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
64381,
909,
15407,
1595,
20454,
63,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
9681,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
64381,
33006,
6343,
23421,
14700,
330,
23001,
36115,
1,
2456,
1,
21703,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
1,
2470,
3659,
79825,
82,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
21703,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
11333,
36115,
10592,
220,
16,
26,
4815,
14414,
1393,
2150,
1393,
23859,
14987,
1393,
2470,
3659,
79825,
82,
1393,
2470,
3659,
98107,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
18688,
1,
2456,
1,
44715,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
528,
345,
1,
42240,
488,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7061,
10592,
220,
16,
26,
4815,
9923,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
2470,
3659,
98107,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
26650,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
44715,
1,
528,
345,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
44715,
909,
15407,
1595,
18688,
63,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5439,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
44715,
33006,
6343,
14711,
16225,
198,
10086,
682,
20142,
505,
7008,
889,
31532,
304,
330,
7957,
24537,
330,
9698,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
16,
2710,
4393,
62787,
5871,
259,
17,
13369,
12360,
5871,
259,
16,
6328,
259,
17,
13,
3864,
220,
284,
220,
259,
16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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
16,
2710,
4393,
62787,
5871,
259,
17,
13369,
12360,
5871,
259,
16,
6328,
259,
17,
13,
3864,
220,
284,
220,
259,
16,
13,
3864,
13369,
5818,
5871,
259,
18,
6328,
259,
18,
49171,
220,
284,
220,
259,
17,
749,
21703,
5401,
259,
16,
1276,
1697,
488,
220,
284,
220,
330,
37031,
1,
3651,
259,
18,
6195,
220,
284,
220,
330,
29184,
24537,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
### Question
Find all actors from Canada who acted in " James Bond " movies
|
[query_database(**{'query': 'SELECT t1.name FROM CAST AS t2 JOIN actor AS t1 ON t2.aid = t1.aid JOIN movie AS t3 ON t3.mid = t2.msid WHERE t1.nationality = "Canada" AND t3.title = "James Bond";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
|
1,495 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
5739,
1,
2456,
1,
3864,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
12360,
10592,
220,
16,
26,
4815,
12576,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
15859,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
21200,
1,
528,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7065,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
21200,
33006,
6343,
23421,
14700,
330,
3914,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
3864,
1,
528,
345,
1,
5898,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
5739,
63,
446,
3864,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
6445,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
3864,
1393,
5898,
33006,
6343,
23421,
14700,
330,
34713,
1,
2456,
1,
35949,
1,
528,
345,
1,
34713,
1,
1495,
345,
6682,
1401,
446,
35949,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17779,
10592,
220,
16,
26,
4815,
46963,
1393,
34713,
33006,
6343,
23421,
14700,
330,
66481,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
35949,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
35949,
909,
15407,
1595,
34713,
63,
446,
35949,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
24790,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
35949,
33006,
6343,
23421,
14700,
330,
10348,
1,
2456,
29800,
1,
528,
345,
32586,
1,
1495,
345,
1,
11389,
4229,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
2883,
10592,
220,
16,
26,
4815,
887,
1393,
609,
1393,
11389,
4229,
33006,
6343,
23421,
14700,
330,
70895,
1,
2456,
1,
23770,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7690,
10592,
220,
16,
26,
4815,
1550,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
60012,
1,
2456,
1,
10629,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17276,
10592,
220,
16,
26,
4815,
15158,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
20384,
291,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
70895,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15910,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
23770,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
29800,
1,
528,
345,
1,
20454,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
887,
1393,
20454,
33006,
6343,
23421,
14700,
330,
28010,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
10629,
909,
15407,
1595,
60012,
63,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1903,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
10629,
33006,
6343,
23421,
14700,
330,
20633,
1,
2456,
1,
16497,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
16497,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5818,
10592,
220,
16,
26,
4815,
5209,
1393,
2150,
1393,
23859,
14987,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
14412,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
64381,
909,
15407,
1595,
20454,
63,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
9681,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
64381,
33006,
6343,
23421,
14700,
330,
23001,
36115,
1,
2456,
1,
21703,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
1,
2470,
3659,
79825,
82,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
21703,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
11333,
36115,
10592,
220,
16,
26,
4815,
14414,
1393,
2150,
1393,
23859,
14987,
1393,
2470,
3659,
79825,
82,
1393,
2470,
3659,
98107,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
18688,
1,
2456,
1,
44715,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
528,
345,
1,
42240,
488,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7061,
10592,
220,
16,
26,
4815,
9923,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
2470,
3659,
98107,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
26650,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
44715,
1,
528,
345,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
44715,
909,
15407,
1595,
18688,
63,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5439,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
44715,
33006,
6343,
14711,
16225,
198,
12840,
527,
279,
36744,
315,
9698,
15910,
555,
330,
1666,
876,
277,
13759,
71,
2836,
330,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
18,
85967,
4393,
7690,
5871,
259,
20,
13369,
15910,
3795,
5871,
259,
17,
6328,
259,
20,
49054,
220,
284,
220,
259,
17,
49054,
13369,
5818,
5871,
259,
19,
6328,
259,
19,
49171,
220,
284,
220,
259,
17,
749,
21703,
13369,
24790,
5871,
259,
16,
6328,
259,
19,
49171,
220,
284,
220,
259,
16,
749,
21703,
13369,
17779,
5871,
259,
18,
6328,
259,
18,
1326,
307,
220,
284,
220,
259,
16,
1326,
307,
5401,
259,
20,
2710,
220,
284,
220,
330,
2170,
876,
277,
13759,
71,
2836,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
18,
85967,
4393,
7690,
5871,
259,
20,
13369,
15910,
3795,
5871,
259,
17,
6328,
259,
20,
49054,
220,
284,
220,
259,
17,
49054,
13369,
5818,
5871,
259,
19,
6328,
259,
19,
49171,
220,
284,
220,
259,
17,
749,
21703,
13369,
24790,
5871,
259,
16,
6328,
259,
19,
49171,
220,
284,
220,
259,
16,
749,
21703,
13369,
17779,
5871,
259,
18,
6328,
259,
18,
1326,
307,
220,
284,
220,
259,
16,
1326,
307,
5401,
259,
20,
2710,
220,
284,
220,
330,
2170,
876,
277,
13759,
71,
2836,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
### Question
what are the genres of movies directed by " Asghar Farhadi "
|
[query_database(**{'query': 'SELECT t3.genre FROM director AS t5 JOIN directed_by AS t2 ON t5.did = t2.did JOIN movie AS t4 ON t4.mid = t2.msid JOIN classification AS t1 ON t4.mid = t1.msid JOIN genre AS t3 ON t3.gid = t1.gid WHERE t5.name = "Asghar Farhadi";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
|
1,499 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
5739,
1,
2456,
1,
3864,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
12360,
10592,
220,
16,
26,
4815,
12576,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
15859,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
21200,
1,
528,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7065,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
21200,
33006,
6343,
23421,
14700,
330,
3914,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
3864,
1,
528,
345,
1,
5898,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
5739,
63,
446,
3864,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
6445,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
3864,
1393,
5898,
33006,
6343,
23421,
14700,
330,
34713,
1,
2456,
1,
35949,
1,
528,
345,
1,
34713,
1,
1495,
345,
6682,
1401,
446,
35949,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17779,
10592,
220,
16,
26,
4815,
46963,
1393,
34713,
33006,
6343,
23421,
14700,
330,
66481,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
35949,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
35949,
909,
15407,
1595,
34713,
63,
446,
35949,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
24790,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
35949,
33006,
6343,
23421,
14700,
330,
10348,
1,
2456,
29800,
1,
528,
345,
32586,
1,
1495,
345,
1,
11389,
4229,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
2883,
10592,
220,
16,
26,
4815,
887,
1393,
609,
1393,
11389,
4229,
33006,
6343,
23421,
14700,
330,
70895,
1,
2456,
1,
23770,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7690,
10592,
220,
16,
26,
4815,
1550,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
60012,
1,
2456,
1,
10629,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17276,
10592,
220,
16,
26,
4815,
15158,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
20384,
291,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
70895,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15910,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
23770,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
29800,
1,
528,
345,
1,
20454,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
887,
1393,
20454,
33006,
6343,
23421,
14700,
330,
28010,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
10629,
909,
15407,
1595,
60012,
63,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1903,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
10629,
33006,
6343,
23421,
14700,
330,
20633,
1,
2456,
1,
16497,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
16497,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5818,
10592,
220,
16,
26,
4815,
5209,
1393,
2150,
1393,
23859,
14987,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
14412,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
64381,
909,
15407,
1595,
20454,
63,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
9681,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
64381,
33006,
6343,
23421,
14700,
330,
23001,
36115,
1,
2456,
1,
21703,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
1,
2470,
3659,
79825,
82,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
21703,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
11333,
36115,
10592,
220,
16,
26,
4815,
14414,
1393,
2150,
1393,
23859,
14987,
1393,
2470,
3659,
79825,
82,
1393,
2470,
3659,
98107,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
18688,
1,
2456,
1,
44715,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
528,
345,
1,
42240,
488,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7061,
10592,
220,
16,
26,
4815,
9923,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
2470,
3659,
98107,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
26650,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
44715,
1,
528,
345,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
44715,
909,
15407,
1595,
18688,
63,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5439,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
44715,
33006,
6343,
14711,
16225,
198,
3923,
374,
279,
1396,
315,
9698,
304,
902,
330,
30750,
1556,
59919,
330,
31532,
1306,
220,
679,
15,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
24945,
320,
60186,
259,
17,
6195,
220,
883,
4393,
62787,
5871,
259,
18,
13369,
12360,
5871,
259,
16,
6328,
259,
18,
13,
3864,
220,
284,
220,
259,
16,
13,
3864,
13369,
5818,
5871,
259,
17,
6328,
259,
17,
49171,
220,
284,
220,
259,
18,
749,
21703,
5401,
259,
16,
2710,
220,
284,
220,
330,
72526,
1556,
59919,
1,
3651,
259,
17,
26642,
14987,
220,
871,
220,
220,
679,
15,
37094,
5525,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
24945,
320,
60186,
259,
17,
6195,
220,
883,
4393,
62787,
5871,
259,
18,
13369,
12360,
5871,
259,
16,
6328,
259,
18,
13,
3864,
220,
284,
220,
259,
16,
13,
3864,
13369,
5818,
5871,
259,
17,
6328,
259,
17,
49171,
220,
284,
220,
259,
18,
749,
21703,
5401,
259,
16,
2710,
220,
284,
220,
330,
72526,
1556,
59919,
1,
3651,
259,
17,
26642,
14987,
220,
871,
220,
220,
679,
15,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
### Question
What is the number of movies in which " Jennifer Aniston " acted after 2010 ?
|
[query_database(**{'query': 'SELECT COUNT ( DISTINCT t2.title ) FROM CAST AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.name = "Jennifer Aniston" AND t2.release_year > 2010;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
|
1,503 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
5739,
1,
2456,
1,
3864,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
12360,
10592,
220,
16,
26,
4815,
12576,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
15859,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
21200,
1,
528,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7065,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
21200,
33006,
6343,
23421,
14700,
330,
3914,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
3864,
1,
528,
345,
1,
5898,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
5739,
63,
446,
3864,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
6445,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
3864,
1393,
5898,
33006,
6343,
23421,
14700,
330,
34713,
1,
2456,
1,
35949,
1,
528,
345,
1,
34713,
1,
1495,
345,
6682,
1401,
446,
35949,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17779,
10592,
220,
16,
26,
4815,
46963,
1393,
34713,
33006,
6343,
23421,
14700,
330,
66481,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
35949,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
35949,
909,
15407,
1595,
34713,
63,
446,
35949,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
24790,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
35949,
33006,
6343,
23421,
14700,
330,
10348,
1,
2456,
29800,
1,
528,
345,
32586,
1,
1495,
345,
1,
11389,
4229,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
2883,
10592,
220,
16,
26,
4815,
887,
1393,
609,
1393,
11389,
4229,
33006,
6343,
23421,
14700,
330,
70895,
1,
2456,
1,
23770,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7690,
10592,
220,
16,
26,
4815,
1550,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
60012,
1,
2456,
1,
10629,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17276,
10592,
220,
16,
26,
4815,
15158,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
20384,
291,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
70895,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15910,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
23770,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
29800,
1,
528,
345,
1,
20454,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
887,
1393,
20454,
33006,
6343,
23421,
14700,
330,
28010,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
10629,
909,
15407,
1595,
60012,
63,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1903,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
10629,
33006,
6343,
23421,
14700,
330,
20633,
1,
2456,
1,
16497,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
16497,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5818,
10592,
220,
16,
26,
4815,
5209,
1393,
2150,
1393,
23859,
14987,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
14412,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
64381,
909,
15407,
1595,
20454,
63,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
9681,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
64381,
33006,
6343,
23421,
14700,
330,
23001,
36115,
1,
2456,
1,
21703,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
1,
2470,
3659,
79825,
82,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
21703,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
11333,
36115,
10592,
220,
16,
26,
4815,
14414,
1393,
2150,
1393,
23859,
14987,
1393,
2470,
3659,
79825,
82,
1393,
2470,
3659,
98107,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
18688,
1,
2456,
1,
44715,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
528,
345,
1,
42240,
488,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7061,
10592,
220,
16,
26,
4815,
9923,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
2470,
3659,
98107,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
26650,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
44715,
1,
528,
345,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
44715,
909,
15407,
1595,
18688,
63,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5439,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
44715,
33006,
6343,
14711,
16225,
198,
4438,
1690,
9698,
1051,
9124,
304,
279,
1060,
220,
679,
18,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
24945,
320,
60186,
2316,
220,
883,
4393,
5818,
5401,
4984,
14987,
220,
284,
220,
220,
679,
18,
37094,
5525,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
24945,
320,
60186,
2316,
220,
883,
4393,
5818,
5401,
4984,
14987,
220,
284,
220,
220,
679,
18,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
### Question
How many movies were produced in the year 2013 ?
|
[query_database(**{'query': 'SELECT COUNT ( DISTINCT title ) FROM movie WHERE release_year = 2013;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
|
1,507 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
5739,
1,
2456,
1,
3864,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
12360,
10592,
220,
16,
26,
4815,
12576,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
15859,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
21200,
1,
528,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7065,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
21200,
33006,
6343,
23421,
14700,
330,
3914,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
3864,
1,
528,
345,
1,
5898,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
5739,
63,
446,
3864,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
6445,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
3864,
1393,
5898,
33006,
6343,
23421,
14700,
330,
34713,
1,
2456,
1,
35949,
1,
528,
345,
1,
34713,
1,
1495,
345,
6682,
1401,
446,
35949,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17779,
10592,
220,
16,
26,
4815,
46963,
1393,
34713,
33006,
6343,
23421,
14700,
330,
66481,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
35949,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
35949,
909,
15407,
1595,
34713,
63,
446,
35949,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
24790,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
35949,
33006,
6343,
23421,
14700,
330,
10348,
1,
2456,
29800,
1,
528,
345,
32586,
1,
1495,
345,
1,
11389,
4229,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
2883,
10592,
220,
16,
26,
4815,
887,
1393,
609,
1393,
11389,
4229,
33006,
6343,
23421,
14700,
330,
70895,
1,
2456,
1,
23770,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7690,
10592,
220,
16,
26,
4815,
1550,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
60012,
1,
2456,
1,
10629,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17276,
10592,
220,
16,
26,
4815,
15158,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
20384,
291,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
70895,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15910,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
23770,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
29800,
1,
528,
345,
1,
20454,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
887,
1393,
20454,
33006,
6343,
23421,
14700,
330,
28010,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
10629,
909,
15407,
1595,
60012,
63,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1903,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
10629,
33006,
6343,
23421,
14700,
330,
20633,
1,
2456,
1,
16497,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
16497,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5818,
10592,
220,
16,
26,
4815,
5209,
1393,
2150,
1393,
23859,
14987,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
14412,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
64381,
909,
15407,
1595,
20454,
63,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
9681,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
64381,
33006,
6343,
23421,
14700,
330,
23001,
36115,
1,
2456,
1,
21703,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
1,
2470,
3659,
79825,
82,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
21703,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
11333,
36115,
10592,
220,
16,
26,
4815,
14414,
1393,
2150,
1393,
23859,
14987,
1393,
2470,
3659,
79825,
82,
1393,
2470,
3659,
98107,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
18688,
1,
2456,
1,
44715,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
528,
345,
1,
42240,
488,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7061,
10592,
220,
16,
26,
4815,
9923,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
2470,
3659,
98107,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
26650,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
44715,
1,
528,
345,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
44715,
909,
15407,
1595,
18688,
63,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5439,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
44715,
33006,
6343,
14711,
16225,
198,
3923,
374,
279,
1396,
315,
9698,
304,
902,
330,
37617,
370,
65090,
325,
6729,
330,
31532,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
24945,
320,
60186,
259,
17,
6195,
220,
883,
4393,
62787,
5871,
259,
18,
13369,
12360,
5871,
259,
16,
6328,
259,
18,
13,
3864,
220,
284,
220,
259,
16,
13,
3864,
13369,
5818,
5871,
259,
17,
6328,
259,
17,
49171,
220,
284,
220,
259,
18,
749,
21703,
5401,
259,
16,
2710,
220,
284,
220,
330,
2059,
1494,
370,
65090,
325,
6729,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
24945,
320,
60186,
259,
17,
6195,
220,
883,
4393,
62787,
5871,
259,
18,
13369,
12360,
5871,
259,
16,
6328,
259,
18,
13,
3864,
220,
284,
220,
259,
16,
13,
3864,
13369,
5818,
5871,
259,
17,
6328,
259,
17,
49171,
220,
284,
220,
259,
18,
749,
21703,
5401,
259,
16,
2710,
220,
284,
220,
330,
2059,
1494,
370,
65090,
325,
6729,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
### Question
What is the number of movies in which " Shahab Hosseini " acted ?
|
[query_database(**{'query': 'SELECT COUNT ( DISTINCT t2.title ) FROM CAST AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.name = "Shahab Hosseini";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
|
1,511 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
5739,
1,
2456,
1,
3864,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
12360,
10592,
220,
16,
26,
4815,
12576,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
15859,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
21200,
1,
528,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7065,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
21200,
33006,
6343,
23421,
14700,
330,
3914,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
3864,
1,
528,
345,
1,
5898,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
5739,
63,
446,
3864,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
6445,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
3864,
1393,
5898,
33006,
6343,
23421,
14700,
330,
34713,
1,
2456,
1,
35949,
1,
528,
345,
1,
34713,
1,
1495,
345,
6682,
1401,
446,
35949,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17779,
10592,
220,
16,
26,
4815,
46963,
1393,
34713,
33006,
6343,
23421,
14700,
330,
66481,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
35949,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
35949,
909,
15407,
1595,
34713,
63,
446,
35949,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
24790,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
35949,
33006,
6343,
23421,
14700,
330,
10348,
1,
2456,
29800,
1,
528,
345,
32586,
1,
1495,
345,
1,
11389,
4229,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
2883,
10592,
220,
16,
26,
4815,
887,
1393,
609,
1393,
11389,
4229,
33006,
6343,
23421,
14700,
330,
70895,
1,
2456,
1,
23770,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7690,
10592,
220,
16,
26,
4815,
1550,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
60012,
1,
2456,
1,
10629,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17276,
10592,
220,
16,
26,
4815,
15158,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
20384,
291,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
70895,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15910,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
23770,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
29800,
1,
528,
345,
1,
20454,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
887,
1393,
20454,
33006,
6343,
23421,
14700,
330,
28010,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
10629,
909,
15407,
1595,
60012,
63,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1903,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
10629,
33006,
6343,
23421,
14700,
330,
20633,
1,
2456,
1,
16497,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
16497,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5818,
10592,
220,
16,
26,
4815,
5209,
1393,
2150,
1393,
23859,
14987,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
14412,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
64381,
909,
15407,
1595,
20454,
63,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
9681,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
64381,
33006,
6343,
23421,
14700,
330,
23001,
36115,
1,
2456,
1,
21703,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
1,
2470,
3659,
79825,
82,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
21703,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
11333,
36115,
10592,
220,
16,
26,
4815,
14414,
1393,
2150,
1393,
23859,
14987,
1393,
2470,
3659,
79825,
82,
1393,
2470,
3659,
98107,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
18688,
1,
2456,
1,
44715,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
528,
345,
1,
42240,
488,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7061,
10592,
220,
16,
26,
4815,
9923,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
2470,
3659,
98107,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
26650,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
44715,
1,
528,
345,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
44715,
909,
15407,
1595,
18688,
63,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5439,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
44715,
33006,
6343,
14711,
16225,
198,
4438,
1690,
9698,
1550,
330,
72025,
8233,
42648,
472,
330,
1180,
304,
1603,
220,
6393,
17,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
24945,
320,
60186,
259,
17,
6195,
220,
883,
4393,
62787,
5871,
259,
18,
13369,
12360,
5871,
259,
16,
6328,
259,
18,
13,
3864,
220,
284,
220,
259,
16,
13,
3864,
13369,
5818,
5871,
259,
17,
6328,
259,
17,
49171,
220,
284,
220,
259,
18,
749,
21703,
5401,
259,
16,
2710,
220,
284,
220,
330,
39,
31761,
8233,
42648,
472,
1,
3651,
259,
17,
26642,
14987,
220,
366,
220,
220,
6393,
17,
37094,
5525,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
24945,
320,
60186,
259,
17,
6195,
220,
883,
4393,
62787,
5871,
259,
18,
13369,
12360,
5871,
259,
16,
6328,
259,
18,
13,
3864,
220,
284,
220,
259,
16,
13,
3864,
13369,
5818,
5871,
259,
17,
6328,
259,
17,
49171,
220,
284,
220,
259,
18,
749,
21703,
5401,
259,
16,
2710,
220,
284,
220,
330,
39,
31761,
8233,
42648,
472,
1,
3651,
259,
17,
26642,
14987,
220,
366,
220,
220,
6393,
17,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
### Question
How many movies did " Humphrey Bogart " act in before 1942 ?
|
[query_database(**{'query': 'SELECT COUNT ( DISTINCT t2.title ) FROM CAST AS t3 JOIN actor AS t1 ON t3.aid = t1.aid JOIN movie AS t2 ON t2.mid = t3.msid WHERE t1.name = "Humphrey Bogart" AND t2.release_year < 1942;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
|
1,515 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
5739,
1,
2456,
1,
3864,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
12360,
10592,
220,
16,
26,
4815,
12576,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
15859,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
21200,
1,
528,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7065,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
21200,
33006,
6343,
23421,
14700,
330,
3914,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
3864,
1,
528,
345,
1,
5898,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
5739,
63,
446,
3864,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
6445,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
3864,
1393,
5898,
33006,
6343,
23421,
14700,
330,
34713,
1,
2456,
1,
35949,
1,
528,
345,
1,
34713,
1,
1495,
345,
6682,
1401,
446,
35949,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17779,
10592,
220,
16,
26,
4815,
46963,
1393,
34713,
33006,
6343,
23421,
14700,
330,
66481,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
35949,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
35949,
909,
15407,
1595,
34713,
63,
446,
35949,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
24790,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
35949,
33006,
6343,
23421,
14700,
330,
10348,
1,
2456,
29800,
1,
528,
345,
32586,
1,
1495,
345,
1,
11389,
4229,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
2883,
10592,
220,
16,
26,
4815,
887,
1393,
609,
1393,
11389,
4229,
33006,
6343,
23421,
14700,
330,
70895,
1,
2456,
1,
23770,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7690,
10592,
220,
16,
26,
4815,
1550,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
60012,
1,
2456,
1,
10629,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17276,
10592,
220,
16,
26,
4815,
15158,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
20384,
291,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
70895,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15910,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
23770,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
29800,
1,
528,
345,
1,
20454,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
887,
1393,
20454,
33006,
6343,
23421,
14700,
330,
28010,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
10629,
909,
15407,
1595,
60012,
63,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1903,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
10629,
33006,
6343,
23421,
14700,
330,
20633,
1,
2456,
1,
16497,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
16497,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5818,
10592,
220,
16,
26,
4815,
5209,
1393,
2150,
1393,
23859,
14987,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
14412,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
64381,
909,
15407,
1595,
20454,
63,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
9681,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
64381,
33006,
6343,
23421,
14700,
330,
23001,
36115,
1,
2456,
1,
21703,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
1,
2470,
3659,
79825,
82,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
21703,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
11333,
36115,
10592,
220,
16,
26,
4815,
14414,
1393,
2150,
1393,
23859,
14987,
1393,
2470,
3659,
79825,
82,
1393,
2470,
3659,
98107,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
18688,
1,
2456,
1,
44715,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
528,
345,
1,
42240,
488,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7061,
10592,
220,
16,
26,
4815,
9923,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
2470,
3659,
98107,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
26650,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
44715,
1,
528,
345,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
44715,
909,
15407,
1595,
18688,
63,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5439,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
44715,
33006,
6343,
14711,
16225,
198,
4438,
1690,
9698,
1550,
330,
91151,
24912,
96464,
330,
2167,
1306,
220,
679,
15,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
24945,
320,
60186,
259,
18,
6195,
220,
883,
4393,
7690,
5871,
259,
17,
13369,
15910,
3795,
5871,
259,
16,
6328,
259,
17,
49054,
220,
284,
220,
259,
16,
49054,
13369,
5818,
5871,
259,
18,
6328,
259,
18,
49171,
220,
284,
220,
259,
16,
749,
21703,
5401,
259,
17,
2710,
220,
284,
220,
330,
2232,
44509,
24912,
96464,
1,
3651,
259,
18,
26642,
14987,
220,
871,
220,
220,
679,
15,
37094,
5525,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
24945,
320,
60186,
259,
18,
6195,
220,
883,
4393,
7690,
5871,
259,
17,
13369,
15910,
3795,
5871,
259,
16,
6328,
259,
17,
49054,
220,
284,
220,
259,
16,
49054,
13369,
5818,
5871,
259,
18,
6328,
259,
18,
49171,
220,
284,
220,
259,
16,
749,
21703,
5401,
259,
17,
2710,
220,
284,
220,
330,
2232,
44509,
24912,
96464,
1,
3651,
259,
18,
26642,
14987,
220,
871,
220,
220,
679,
15,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
### Question
How many movies did " Quentin Tarantino " direct after 2010 ?
|
[query_database(**{'query': 'SELECT COUNT ( DISTINCT t3.title ) FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.name = "Quentin Tarantino" AND t3.release_year > 2010;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
|
1,519 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
5739,
1,
2456,
1,
3864,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
12360,
10592,
220,
16,
26,
4815,
12576,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
15859,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
21200,
1,
528,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7065,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
21200,
33006,
6343,
23421,
14700,
330,
3914,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
3864,
1,
528,
345,
1,
5898,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
5739,
63,
446,
3864,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
6445,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
3864,
1393,
5898,
33006,
6343,
23421,
14700,
330,
34713,
1,
2456,
1,
35949,
1,
528,
345,
1,
34713,
1,
1495,
345,
6682,
1401,
446,
35949,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17779,
10592,
220,
16,
26,
4815,
46963,
1393,
34713,
33006,
6343,
23421,
14700,
330,
66481,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
35949,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
35949,
909,
15407,
1595,
34713,
63,
446,
35949,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
24790,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
35949,
33006,
6343,
23421,
14700,
330,
10348,
1,
2456,
29800,
1,
528,
345,
32586,
1,
1495,
345,
1,
11389,
4229,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
2883,
10592,
220,
16,
26,
4815,
887,
1393,
609,
1393,
11389,
4229,
33006,
6343,
23421,
14700,
330,
70895,
1,
2456,
1,
23770,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7690,
10592,
220,
16,
26,
4815,
1550,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
60012,
1,
2456,
1,
10629,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17276,
10592,
220,
16,
26,
4815,
15158,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
20384,
291,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
70895,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15910,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
23770,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
29800,
1,
528,
345,
1,
20454,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
887,
1393,
20454,
33006,
6343,
23421,
14700,
330,
28010,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
10629,
909,
15407,
1595,
60012,
63,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1903,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
10629,
33006,
6343,
23421,
14700,
330,
20633,
1,
2456,
1,
16497,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
16497,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5818,
10592,
220,
16,
26,
4815,
5209,
1393,
2150,
1393,
23859,
14987,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
14412,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
64381,
909,
15407,
1595,
20454,
63,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
9681,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
64381,
33006,
6343,
23421,
14700,
330,
23001,
36115,
1,
2456,
1,
21703,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
1,
2470,
3659,
79825,
82,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
21703,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
11333,
36115,
10592,
220,
16,
26,
4815,
14414,
1393,
2150,
1393,
23859,
14987,
1393,
2470,
3659,
79825,
82,
1393,
2470,
3659,
98107,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
18688,
1,
2456,
1,
44715,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
528,
345,
1,
42240,
488,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7061,
10592,
220,
16,
26,
4815,
9923,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
2470,
3659,
98107,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
26650,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
44715,
1,
528,
345,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
44715,
909,
15407,
1595,
18688,
63,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5439,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
44715,
33006,
6343,
14711,
16225,
198,
3990,
279,
1396,
315,
20142,
505,
10471,
889,
6476,
304,
330,
11641,
622,
2227,
52178,
330,
9698,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
24945,
320,
60186,
259,
16,
2710,
220,
883,
4393,
62787,
5871,
259,
19,
13369,
12360,
5871,
259,
16,
6328,
259,
19,
13,
3864,
220,
284,
220,
259,
16,
13,
3864,
13369,
5818,
5871,
259,
20,
6328,
259,
20,
49171,
220,
284,
220,
259,
19,
749,
21703,
13369,
15910,
3795,
5871,
259,
17,
6328,
259,
20,
49171,
220,
284,
220,
259,
17,
749,
21703,
13369,
7690,
5871,
259,
18,
6328,
259,
18,
49054,
220,
284,
220,
259,
17,
49054,
5401,
259,
16,
1276,
1697,
488,
220,
284,
220,
330,
62819,
1,
3651,
259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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
24945,
320,
60186,
259,
16,
2710,
220,
883,
4393,
62787,
5871,
259,
19,
13369,
12360,
5871,
259,
16,
6328,
259,
19,
13,
3864,
220,
284,
220,
259,
16,
13,
3864,
13369,
5818,
5871,
259,
20,
6328,
259,
20,
49171,
220,
284,
220,
259,
19,
749,
21703,
13369,
15910,
3795,
5871,
259,
17,
6328,
259,
20,
49171,
220,
284,
220,
259,
17,
749,
21703,
13369,
7690,
5871,
259,
18,
6328,
259,
18,
49054,
220,
284,
220,
259,
17,
49054,
5401,
259,
16,
1276,
1697,
488,
220,
284,
220,
330,
62819,
1,
3651,
259,
18,
2710,
220,
284,
220,
330,
37734,
622,
2227,
52178,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
### Question
find the number of actors from Iran who played in " Jim Jarmusch " movies
|
[query_database(**{'query': 'SELECT COUNT ( DISTINCT t1.name ) FROM CAST AS t4 JOIN actor AS t1 ON t4.aid = t1.aid JOIN movie AS t5 ON t5.mid = t4.msid JOIN directed_by AS t2 ON t5.mid = t2.msid JOIN director AS t3 ON t3.did = t2.did WHERE t1.nationality = "Iran" AND t3.name = "Jim Jarmusch";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
|
1,523 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
5739,
1,
2456,
1,
3864,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
12360,
10592,
220,
16,
26,
4815,
12576,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
15859,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
21200,
1,
528,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7065,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
21200,
33006,
6343,
23421,
14700,
330,
3914,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
3864,
1,
528,
345,
1,
5898,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
5739,
63,
446,
3864,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
6445,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
3864,
1393,
5898,
33006,
6343,
23421,
14700,
330,
34713,
1,
2456,
1,
35949,
1,
528,
345,
1,
34713,
1,
1495,
345,
6682,
1401,
446,
35949,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17779,
10592,
220,
16,
26,
4815,
46963,
1393,
34713,
33006,
6343,
23421,
14700,
330,
66481,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
35949,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
35949,
909,
15407,
1595,
34713,
63,
446,
35949,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
24790,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
35949,
33006,
6343,
23421,
14700,
330,
10348,
1,
2456,
29800,
1,
528,
345,
32586,
1,
1495,
345,
1,
11389,
4229,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
2883,
10592,
220,
16,
26,
4815,
887,
1393,
609,
1393,
11389,
4229,
33006,
6343,
23421,
14700,
330,
70895,
1,
2456,
1,
23770,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7690,
10592,
220,
16,
26,
4815,
1550,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
60012,
1,
2456,
1,
10629,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17276,
10592,
220,
16,
26,
4815,
15158,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
20384,
291,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
70895,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15910,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
23770,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
29800,
1,
528,
345,
1,
20454,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
887,
1393,
20454,
33006,
6343,
23421,
14700,
330,
28010,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
10629,
909,
15407,
1595,
60012,
63,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1903,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
10629,
33006,
6343,
23421,
14700,
330,
20633,
1,
2456,
1,
16497,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
16497,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5818,
10592,
220,
16,
26,
4815,
5209,
1393,
2150,
1393,
23859,
14987,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
14412,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
64381,
909,
15407,
1595,
20454,
63,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
9681,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
64381,
33006,
6343,
23421,
14700,
330,
23001,
36115,
1,
2456,
1,
21703,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
1,
2470,
3659,
79825,
82,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
21703,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
11333,
36115,
10592,
220,
16,
26,
4815,
14414,
1393,
2150,
1393,
23859,
14987,
1393,
2470,
3659,
79825,
82,
1393,
2470,
3659,
98107,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
18688,
1,
2456,
1,
44715,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
528,
345,
1,
42240,
488,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7061,
10592,
220,
16,
26,
4815,
9923,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
2470,
3659,
98107,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
26650,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
44715,
1,
528,
345,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
44715,
909,
15407,
1595,
18688,
63,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5439,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
44715,
33006,
6343,
14711,
16225,
198,
10086,
682,
9698,
16850,
2225,
330,
76059,
800,
299,
451,
330,
323,
330,
18984,
4997,
2402,
330,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
19,
6195,
4393,
62787,
5871,
259,
20,
13369,
12360,
5871,
259,
16,
6328,
259,
20,
13,
3864,
220,
284,
220,
259,
16,
13,
3864,
13369,
5818,
5871,
259,
19,
6328,
259,
19,
49171,
220,
284,
220,
259,
20,
749,
21703,
13369,
62787,
5871,
259,
18,
6328,
259,
19,
49171,
220,
284,
220,
259,
18,
749,
21703,
13369,
12360,
5871,
259,
17,
6328,
259,
18,
13,
3864,
220,
284,
220,
259,
17,
13,
3864,
5401,
259,
16,
2710,
220,
284,
220,
330,
63862,
1094,
800,
299,
451,
1,
3651,
259,
17,
2710,
220,
284,
220,
330,
54013,
4997,
2402,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
19,
6195,
4393,
62787,
5871,
259,
20,
13369,
12360,
5871,
259,
16,
6328,
259,
20,
13,
3864,
220,
284,
220,
259,
16,
13,
3864,
13369,
5818,
5871,
259,
19,
6328,
259,
19,
49171,
220,
284,
220,
259,
20,
749,
21703,
13369,
62787,
5871,
259,
18,
6328,
259,
19,
49171,
220,
284,
220,
259,
18,
749,
21703,
13369,
12360,
5871,
259,
17,
6328,
259,
18,
13,
3864,
220,
284,
220,
259,
17,
13,
3864,
5401,
259,
16,
2710,
220,
284,
220,
330,
63862,
1094,
800,
299,
451,
1,
3651,
259,
17,
2710,
220,
284,
220,
330,
54013,
4997,
2402,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
### Question
Find all movies featuring both " Woody Strode " and " Jason Robards "
|
[query_database(**{'query': 'SELECT t4.title FROM CAST AS t5 JOIN actor AS t1 ON t5.aid = t1.aid JOIN movie AS t4 ON t4.mid = t5.msid JOIN CAST AS t3 ON t4.mid = t3.msid JOIN actor AS t2 ON t3.aid = t2.aid WHERE t1.name = "Woody Strode" AND t2.name = "Jason Robards";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
|
1,527 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
5739,
1,
2456,
1,
3864,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
12360,
10592,
220,
16,
26,
4815,
12576,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
15859,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
21200,
1,
528,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7065,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
21200,
33006,
6343,
23421,
14700,
330,
3914,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
3864,
1,
528,
345,
1,
5898,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
5739,
63,
446,
3864,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
6445,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
3864,
1393,
5898,
33006,
6343,
23421,
14700,
330,
34713,
1,
2456,
1,
35949,
1,
528,
345,
1,
34713,
1,
1495,
345,
6682,
1401,
446,
35949,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17779,
10592,
220,
16,
26,
4815,
46963,
1393,
34713,
33006,
6343,
23421,
14700,
330,
66481,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
35949,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
35949,
909,
15407,
1595,
34713,
63,
446,
35949,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
24790,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
35949,
33006,
6343,
23421,
14700,
330,
10348,
1,
2456,
29800,
1,
528,
345,
32586,
1,
1495,
345,
1,
11389,
4229,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
2883,
10592,
220,
16,
26,
4815,
887,
1393,
609,
1393,
11389,
4229,
33006,
6343,
23421,
14700,
330,
70895,
1,
2456,
1,
23770,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7690,
10592,
220,
16,
26,
4815,
1550,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
60012,
1,
2456,
1,
10629,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17276,
10592,
220,
16,
26,
4815,
15158,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
20384,
291,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
70895,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15910,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
23770,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
29800,
1,
528,
345,
1,
20454,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
887,
1393,
20454,
33006,
6343,
23421,
14700,
330,
28010,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
10629,
909,
15407,
1595,
60012,
63,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1903,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
10629,
33006,
6343,
23421,
14700,
330,
20633,
1,
2456,
1,
16497,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
16497,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5818,
10592,
220,
16,
26,
4815,
5209,
1393,
2150,
1393,
23859,
14987,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
14412,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
64381,
909,
15407,
1595,
20454,
63,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
9681,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
64381,
33006,
6343,
23421,
14700,
330,
23001,
36115,
1,
2456,
1,
21703,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
1,
2470,
3659,
79825,
82,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
21703,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
11333,
36115,
10592,
220,
16,
26,
4815,
14414,
1393,
2150,
1393,
23859,
14987,
1393,
2470,
3659,
79825,
82,
1393,
2470,
3659,
98107,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
18688,
1,
2456,
1,
44715,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
528,
345,
1,
42240,
488,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7061,
10592,
220,
16,
26,
4815,
9923,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
2470,
3659,
98107,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
26650,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
44715,
1,
528,
345,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
44715,
909,
15407,
1595,
18688,
63,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5439,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
44715,
33006,
6343,
14711,
16225,
198,
10086,
279,
5818,
902,
374,
21771,
304,
279,
1455,
1396,
315,
36744,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
18,
6195,
4393,
17779,
5871,
259,
17,
13369,
24790,
5871,
259,
16,
6328,
259,
17,
1326,
307,
220,
284,
220,
259,
16,
1326,
307,
13369,
5818,
5871,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
18,
6195,
4393,
17779,
5871,
259,
17,
13369,
24790,
5871,
259,
16,
6328,
259,
17,
1326,
307,
220,
284,
220,
259,
16,
1326,
307,
13369,
5818,
5871,
259,
18,
6328,
259,
18,
49171,
220,
284,
220,
259,
16,
749,
21703,
27968,
7866,
259,
18,
6195,
15888,
7866,
24945,
320,
60186,
259,
17,
85967,
220,
883,
16477,
10592,
220,
16,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
### Question
Find the movie which is classified in the most number of genres
|
[query_database(**{'query': 'SELECT t3.title FROM genre AS t2 JOIN classification AS t1 ON t2.gid = t1.gid JOIN movie AS t3 ON t3.mid = t1.msid GROUP BY t3.title ORDER BY COUNT ( DISTINCT t2.genre ) DESC LIMIT 1;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
|
1,531 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
5739,
1,
2456,
1,
3864,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
3864,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
12360,
10592,
220,
16,
26,
4815,
12576,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
15859,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
21200,
1,
528,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7065,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
21200,
33006,
6343,
23421,
14700,
330,
3914,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
3864,
1,
528,
345,
1,
5898,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
3864,
909,
15407,
1595,
5739,
63,
446,
3864,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
6445,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
3864,
1393,
5898,
33006,
6343,
23421,
14700,
330,
34713,
1,
2456,
1,
35949,
1,
528,
345,
1,
34713,
1,
1495,
345,
6682,
1401,
446,
35949,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17779,
10592,
220,
16,
26,
4815,
46963,
1393,
34713,
33006,
6343,
23421,
14700,
330,
66481,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
35949,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
35949,
909,
15407,
1595,
34713,
63,
446,
35949,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
24790,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
35949,
33006,
6343,
23421,
14700,
330,
10348,
1,
2456,
29800,
1,
528,
345,
32586,
1,
1495,
345,
1,
11389,
4229,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
2883,
10592,
220,
16,
26,
4815,
887,
1393,
609,
1393,
11389,
4229,
33006,
6343,
23421,
14700,
330,
70895,
1,
2456,
1,
23770,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7690,
10592,
220,
16,
26,
4815,
1550,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
60012,
1,
2456,
1,
10629,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
1495,
345,
1,
42240,
488,
1,
1495,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
17276,
10592,
220,
16,
26,
4815,
15158,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
20384,
291,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
23770,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
23770,
909,
15407,
1595,
70895,
63,
446,
23770,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15910,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
23770,
33006,
6343,
23421,
14700,
330,
20454,
1,
2456,
29800,
1,
528,
345,
1,
20454,
1,
1495,
345,
6682,
1401,
446,
307,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16570,
10592,
220,
16,
26,
4815,
887,
1393,
20454,
33006,
6343,
23421,
14700,
330,
28010,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
10629,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
10629,
909,
15407,
1595,
60012,
63,
446,
10629,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1903,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
10629,
33006,
6343,
23421,
14700,
330,
20633,
1,
2456,
1,
16497,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
16497,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5818,
10592,
220,
16,
26,
4815,
5209,
1393,
2150,
1393,
23859,
14987,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
14412,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
64011,
307,
1,
528,
345,
6682,
1401,
446,
307,
4561,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
64381,
909,
15407,
1595,
20454,
63,
446,
64381,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
9681,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
64381,
33006,
6343,
23421,
14700,
330,
23001,
36115,
1,
2456,
1,
21703,
1,
528,
345,
83827,
1,
1495,
345,
1,
23859,
14987,
1,
528,
345,
1,
2470,
3659,
79825,
82,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
83827,
62,
13637,
1,
1495,
345,
1,
49506,
1,
1495,
345,
6682,
1401,
446,
21703,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
11333,
36115,
10592,
220,
16,
26,
4815,
14414,
1393,
2150,
1393,
23859,
14987,
1393,
2470,
3659,
79825,
82,
1393,
2470,
3659,
98107,
1393,
2150,
62,
13637,
1393,
49506,
33006,
6343,
23421,
14700,
330,
18688,
1,
2456,
1,
44715,
1,
528,
345,
1,
13265,
1,
1495,
345,
32586,
1,
528,
345,
1,
42240,
488,
1,
528,
345,
1,
2470,
3659,
98107,
1,
528,
345,
1,
28813,
26019,
1,
1495,
345,
1,
28813,
14987,
1,
528,
345,
6682,
1401,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
7061,
10592,
220,
16,
26,
4815,
9923,
1393,
13265,
1393,
609,
1393,
42240,
488,
1393,
2470,
3659,
98107,
1393,
28813,
26019,
1393,
28813,
14987,
33006,
6343,
23421,
14700,
330,
26650,
3795,
1,
2456,
29800,
1,
528,
345,
1,
1026,
307,
1,
528,
345,
1,
44715,
1,
528,
345,
29543,
1401,
446,
1026,
307,
909,
15407,
1595,
15859,
63,
446,
1026,
307,
4561,
29543,
1401,
446,
44715,
909,
15407,
1595,
18688,
63,
446,
44715,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
5439,
3795,
10592,
220,
16,
26,
4815,
887,
1393,
1026,
307,
1393,
44715,
33006,
6343,
14711,
16225,
198,
3923,
374,
279,
5652,
5818,
555,
330,
11641,
622,
2227,
52178,
330,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
18,
6195,
4393,
7690,
5871,
259,
17,
13369,
15910,
3795,
5871,
259,
16,
6328,
259,
17,
49054,
220,
284,
220,
259,
16,
49054,
13369,
5818,
5871,
259,
18,
6328,
259,
18,
49171,
220,
284,
220,
259,
16,
749,
21703,
5401,
259,
17,
2710,
220,
284,
220,
330,
37734,
622,
2227,
52178,
1,
15888,
7866,
259,
18,
26642,
14987,
16477,
10592,
220,
16,
37094,
5525,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
18,
6195,
4393,
7690,
5871,
259,
17,
13369,
15910,
3795,
5871,
259,
16,
6328,
259,
17,
49054,
220,
284,
220,
259,
16,
49054,
13369,
5818,
5871,
259,
18,
6328,
259,
18,
49171,
220,
284,
220,
259,
16,
749,
21703,
5401,
259,
17,
2710,
220,
284,
220,
330,
37734,
622,
2227,
52178,
1,
15888,
7866,
259,
18,
26642,
14987,
16477,
10592,
220,
16,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
### Question
What is the latest movie by " Jim Jarmusch "
|
[query_database(**{'query': 'SELECT t3.title FROM director AS t2 JOIN directed_by AS t1 ON t2.did = t1.did JOIN movie AS t3 ON t3.mid = t1.msid WHERE t2.name = "Jim Jarmusch" ORDER BY t3.release_year DESC LIMIT 1;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "actor" (
"aid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("aid")
)
/*
1 example row:
SELECT * FROM actor LIMIT 1;
aid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "copyright" (
"id" int,
"msid" int,
"cid" int,
primary key("id")
)
/*
1 example row:
SELECT * FROM copyright LIMIT 1;
id ||msid ||cid
*/
CREATE TABLE "cast" (
"id" int,
"msid" int,
"aid" int,
"role" int,
primary key("id"),
foreign key("aid") references `actor`("aid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM cast LIMIT 1;
id ||msid ||aid ||role
*/
CREATE TABLE "genre" (
"gid" int,
"genre" text,
primary key("gid")
)
/*
1 example row:
SELECT * FROM genre LIMIT 1;
gid ||genre
*/
CREATE TABLE "classification" (
"id" int,
"msid" int,
"gid" int,
primary key("id"),
foreign key("gid") references `genre`("gid"),
foreign key("msid") references `copyright`("msid")
)
/*
1 example row:
SELECT * FROM classification LIMIT 1;
id ||msid ||gid
*/
CREATE TABLE "company" (
"id" int,
"name" text,
"country_code" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM company LIMIT 1;
id ||name ||country_code
*/
CREATE TABLE "director" (
"did" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("did")
)
/*
1 example row:
SELECT * FROM director LIMIT 1;
did ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "producer" (
"pid" int,
"gender" text,
"name" text,
"nationality" text,
"birth_city" text,
"birth_year" int,
primary key("pid")
)
/*
1 example row:
SELECT * FROM producer LIMIT 1;
pid ||gender ||name ||nationality ||birth_city ||birth_year
*/
CREATE TABLE "directed_by" (
"id" int,
"msid" int,
"did" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("did") references `director`("did")
)
/*
1 example row:
SELECT * FROM directed_by LIMIT 1;
id ||msid ||did
*/
CREATE TABLE "keyword" (
"id" int,
"keyword" text,
primary key("id")
)
/*
1 example row:
SELECT * FROM keyword LIMIT 1;
id ||keyword
*/
CREATE TABLE "made_by" (
"id" int,
"msid" int,
"pid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("pid") references `producer`("pid")
)
/*
1 example row:
SELECT * FROM made_by LIMIT 1;
id ||msid ||pid
*/
CREATE TABLE "movie" (
"mid" int,
"title" text,
"release_year" int,
"title_aka" text,
"budget" text,
primary key("mid")
)
/*
1 example row:
SELECT * FROM movie LIMIT 1;
mid ||title ||release_year ||title_aka ||budget
*/
CREATE TABLE "tags" (
"id" int,
"msid" int,
"kid" int,
primary key("id"),
foreign key("msid") references `copyright`("msid"),
foreign key("kid") references `keyword`("kid")
)
/*
1 example row:
SELECT * FROM tags LIMIT 1;
id ||msid ||kid
*/
CREATE TABLE "tv_series" (
"sid" int,
"title" text,
"release_year" int,
"num_of_seasons" int,
"num_of_episodes" int,
"title_aka" text,
"budget" text,
primary key("sid")
)
/*
1 example row:
SELECT * FROM tv_series LIMIT 1;
sid ||title ||release_year ||num_of_seasons ||num_of_episodes ||title_aka ||budget
*/
CREATE TABLE "writer" (
"wid" int,
"gender" text,
"name" int,
"nationality" int,
"num_of_episodes" int,
"birth_city" text,
"birth_year" int,
primary key("wid")
)
/*
1 example row:
SELECT * FROM writer LIMIT 1;
wid ||gender ||name ||nationality ||num_of_episodes ||birth_city ||birth_year
*/
CREATE TABLE "written_by" (
"id" int,
"msid" int,
"wid" int,
foreign key("msid") references `copyright`("msid"),
foreign key("wid") references `writer`("wid")
)
/*
1 example row:
SELECT * FROM written_by LIMIT 1;
id ||msid ||wid
*/
|
1,535 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
38,
6903,
41084,
1341,
1,
2456,
47416,
3414,
4813,
1,
1495,
345,
1,
39243,
56,
1,
1495,
345,
1,
78531,
1,
1495,
345,
6682,
1401,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
46139,
10592,
220,
16,
26,
4815,
47652,
4813,
1393,
39243,
56,
1393,
78531,
33006,
6343,
23421,
14700,
330,
39407,
32,
1539,
2891,
1,
2456,
1,
926,
1,
528,
345,
1,
7687,
1,
1495,
345,
1,
3873,
2114,
4283,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
1,
49,
34657,
1,
1972,
345,
6682,
1401,
446,
926,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10960,
10592,
220,
16,
26,
4815,
3110,
1393,
7687,
1393,
3873,
2114,
4283,
1393,
34,
3414,
4813,
1393,
49,
34657,
33006,
6343,
23421,
14700,
330,
35324,
1,
2456,
1,
39407,
32,
1539,
2891,
3533,
1,
528,
345,
1,
97494,
19925,
1,
528,
345,
1,
790,
57021,
4813,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
6682,
1401,
446,
39407,
32,
1539,
2891,
3533,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
29543,
1401,
3573,
39407,
32,
1539,
2891,
3533,
909,
15407,
1595,
39407,
32,
1539,
2891,
63,
446,
39407,
32,
1539,
2891,
3533,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3813,
10592,
220,
16,
26,
4815,
26487,
32,
1539,
2891,
3533,
1393,
97494,
19925,
1393,
790,
57021,
4813,
1393,
34,
3414,
4813,
33006,
6343,
14711,
16225,
198,
5269,
1690,
57487,
15926,
527,
1070,
304,
279,
23542,
3158,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
24945,
320,
353,
883,
4393,
10960,
5871,
259,
16,
13369,
46139,
5871,
259,
17,
6328,
259,
16,
27473,
1292,
220,
284,
220,
259,
17,
27473,
1292,
5401,
259,
17,
44076,
220,
284,
220,
330,
47364,
3158,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
331,
7496,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
24945,
320,
353,
883,
4393,
10960,
5871,
259,
16,
13369,
46139,
5871,
259,
17,
6328,
259,
16,
27473,
1292,
220,
284,
220,
259,
17,
27473,
1292,
5401,
259,
17,
44076,
220,
284,
220,
330,
47364,
3158,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
331,
7496,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
### Question
how many chinese restaurants are there in the bay area ?
|
[query_database(**{'query': 'SELECT COUNT ( * ) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.region = "bay area" AND t1.food_type = "chinese";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
|
1,538 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
38,
6903,
41084,
1341,
1,
2456,
47416,
3414,
4813,
1,
1495,
345,
1,
39243,
56,
1,
1495,
345,
1,
78531,
1,
1495,
345,
6682,
1401,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
46139,
10592,
220,
16,
26,
4815,
47652,
4813,
1393,
39243,
56,
1393,
78531,
33006,
6343,
23421,
14700,
330,
39407,
32,
1539,
2891,
1,
2456,
1,
926,
1,
528,
345,
1,
7687,
1,
1495,
345,
1,
3873,
2114,
4283,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
1,
49,
34657,
1,
1972,
345,
6682,
1401,
446,
926,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10960,
10592,
220,
16,
26,
4815,
3110,
1393,
7687,
1393,
3873,
2114,
4283,
1393,
34,
3414,
4813,
1393,
49,
34657,
33006,
6343,
23421,
14700,
330,
35324,
1,
2456,
1,
39407,
32,
1539,
2891,
3533,
1,
528,
345,
1,
97494,
19925,
1,
528,
345,
1,
790,
57021,
4813,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
6682,
1401,
446,
39407,
32,
1539,
2891,
3533,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
29543,
1401,
3573,
39407,
32,
1539,
2891,
3533,
909,
15407,
1595,
39407,
32,
1539,
2891,
63,
446,
39407,
32,
1539,
2891,
3533,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3813,
10592,
220,
16,
26,
4815,
26487,
32,
1539,
2891,
3533,
1393,
97494,
19925,
1393,
790,
57021,
4813,
1393,
34,
3414,
4813,
33006,
6343,
14711,
16225,
198,
5269,
1690,
7634,
369,
57487,
527,
1070,
304,
279,
23542,
3158,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
24945,
320,
353,
883,
4393,
10960,
5871,
259,
16,
13369,
46139,
5871,
259,
17,
6328,
259,
16,
27473,
1292,
220,
284,
220,
259,
17,
27473,
1292,
5401,
259,
17,
44076,
220,
284,
220,
330,
47364,
3158,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
331,
7496,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
24945,
320,
353,
883,
4393,
10960,
5871,
259,
16,
13369,
46139,
5871,
259,
17,
6328,
259,
16,
27473,
1292,
220,
284,
220,
259,
17,
27473,
1292,
5401,
259,
17,
44076,
220,
284,
220,
330,
47364,
3158,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
331,
7496,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
### Question
how many places for chinese are there in the bay area ?
|
[query_database(**{'query': 'SELECT COUNT ( * ) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.region = "bay area" AND t1.food_type = "chinese";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
|
1,542 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
38,
6903,
41084,
1341,
1,
2456,
47416,
3414,
4813,
1,
1495,
345,
1,
39243,
56,
1,
1495,
345,
1,
78531,
1,
1495,
345,
6682,
1401,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
46139,
10592,
220,
16,
26,
4815,
47652,
4813,
1393,
39243,
56,
1393,
78531,
33006,
6343,
23421,
14700,
330,
39407,
32,
1539,
2891,
1,
2456,
1,
926,
1,
528,
345,
1,
7687,
1,
1495,
345,
1,
3873,
2114,
4283,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
1,
49,
34657,
1,
1972,
345,
6682,
1401,
446,
926,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10960,
10592,
220,
16,
26,
4815,
3110,
1393,
7687,
1393,
3873,
2114,
4283,
1393,
34,
3414,
4813,
1393,
49,
34657,
33006,
6343,
23421,
14700,
330,
35324,
1,
2456,
1,
39407,
32,
1539,
2891,
3533,
1,
528,
345,
1,
97494,
19925,
1,
528,
345,
1,
790,
57021,
4813,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
6682,
1401,
446,
39407,
32,
1539,
2891,
3533,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
29543,
1401,
3573,
39407,
32,
1539,
2891,
3533,
909,
15407,
1595,
39407,
32,
1539,
2891,
63,
446,
39407,
32,
1539,
2891,
3533,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3813,
10592,
220,
16,
26,
4815,
26487,
32,
1539,
2891,
3533,
1393,
97494,
19925,
1393,
790,
57021,
4813,
1393,
34,
3414,
4813,
33006,
6343,
14711,
16225,
198,
3923,
374,
279,
1888,
42293,
304,
8528,
44579,
9652,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
34182,
44579,
9652,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
69,
6793,
1,
3651,
259,
16,
49759,
220,
284,
220,
320,
19638,
8498,
320,
259,
16,
49759,
883,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
34182,
44579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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
34182,
44579,
9652,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
69,
6793,
1,
3651,
259,
16,
49759,
220,
284,
220,
320,
19638,
8498,
320,
259,
16,
49759,
883,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
34182,
44579,
9652,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
69,
6793,
1,
7048,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
### Question
What is the best french in san francisco ?
|
[query_database(**{'query': 'SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t1.food_type = "french" AND t1.rating = ( SELECT MAX ( t1.rating ) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t1.food_type = "french" );'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
|
1,546 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
38,
6903,
41084,
1341,
1,
2456,
47416,
3414,
4813,
1,
1495,
345,
1,
39243,
56,
1,
1495,
345,
1,
78531,
1,
1495,
345,
6682,
1401,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
46139,
10592,
220,
16,
26,
4815,
47652,
4813,
1393,
39243,
56,
1393,
78531,
33006,
6343,
23421,
14700,
330,
39407,
32,
1539,
2891,
1,
2456,
1,
926,
1,
528,
345,
1,
7687,
1,
1495,
345,
1,
3873,
2114,
4283,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
1,
49,
34657,
1,
1972,
345,
6682,
1401,
446,
926,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10960,
10592,
220,
16,
26,
4815,
3110,
1393,
7687,
1393,
3873,
2114,
4283,
1393,
34,
3414,
4813,
1393,
49,
34657,
33006,
6343,
23421,
14700,
330,
35324,
1,
2456,
1,
39407,
32,
1539,
2891,
3533,
1,
528,
345,
1,
97494,
19925,
1,
528,
345,
1,
790,
57021,
4813,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
6682,
1401,
446,
39407,
32,
1539,
2891,
3533,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
29543,
1401,
3573,
39407,
32,
1539,
2891,
3533,
909,
15407,
1595,
39407,
32,
1539,
2891,
63,
446,
39407,
32,
1539,
2891,
3533,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3813,
10592,
220,
16,
26,
4815,
26487,
32,
1539,
2891,
3533,
1393,
97494,
19925,
1393,
790,
57021,
4813,
1393,
34,
3414,
4813,
33006,
6343,
14711,
16225,
198,
36227,
757,
279,
1888,
42293,
304,
8528,
44579,
9652,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
34182,
44579,
9652,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
69,
6793,
1,
3651,
259,
16,
49759,
220,
284,
220,
320,
19638,
8498,
320,
259,
16,
49759,
883,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
34182,
44579,
9652,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
69,
6793,
1,
7048,
66360,
60,
128009
] |
[
1,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,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
34182,
44579,
9652,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
69,
6793,
1,
3651,
259,
16,
49759,
220,
284,
220,
320,
19638,
8498,
320,
259,
16,
49759,
883,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
34182,
44579,
9652,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
69,
6793,
1,
7048,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
### Question
Give me the best french in san francisco ?
|
[query_database(**{'query': 'SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t1.food_type = "french" AND t1.rating = ( SELECT MAX ( t1.rating ) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t1.food_type = "french" );'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
|
1,550 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
38,
6903,
41084,
1341,
1,
2456,
47416,
3414,
4813,
1,
1495,
345,
1,
39243,
56,
1,
1495,
345,
1,
78531,
1,
1495,
345,
6682,
1401,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
46139,
10592,
220,
16,
26,
4815,
47652,
4813,
1393,
39243,
56,
1393,
78531,
33006,
6343,
23421,
14700,
330,
39407,
32,
1539,
2891,
1,
2456,
1,
926,
1,
528,
345,
1,
7687,
1,
1495,
345,
1,
3873,
2114,
4283,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
1,
49,
34657,
1,
1972,
345,
6682,
1401,
446,
926,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10960,
10592,
220,
16,
26,
4815,
3110,
1393,
7687,
1393,
3873,
2114,
4283,
1393,
34,
3414,
4813,
1393,
49,
34657,
33006,
6343,
23421,
14700,
330,
35324,
1,
2456,
1,
39407,
32,
1539,
2891,
3533,
1,
528,
345,
1,
97494,
19925,
1,
528,
345,
1,
790,
57021,
4813,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
6682,
1401,
446,
39407,
32,
1539,
2891,
3533,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
29543,
1401,
3573,
39407,
32,
1539,
2891,
3533,
909,
15407,
1595,
39407,
32,
1539,
2891,
63,
446,
39407,
32,
1539,
2891,
3533,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3813,
10592,
220,
16,
26,
4815,
26487,
32,
1539,
2891,
3533,
1393,
97494,
19925,
1393,
790,
57021,
4813,
1393,
34,
3414,
4813,
33006,
6343,
14711,
16225,
198,
3923,
374,
279,
1888,
10960,
304,
8528,
44579,
9652,
369,
42293,
3691,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
34182,
44579,
9652,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
69,
6793,
1,
3651,
259,
16,
49759,
220,
284,
220,
320,
19638,
8498,
320,
259,
16,
49759,
883,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
34182,
44579,
9652,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
69,
6793,
1,
7048,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
34182,
44579,
9652,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
69,
6793,
1,
3651,
259,
16,
49759,
220,
284,
220,
320,
19638,
8498,
320,
259,
16,
49759,
883,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
34182,
44579,
9652,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
69,
6793,
1,
7048,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
### Question
What is the best restaurant in san francisco for french food ?
|
[query_database(**{'query': 'SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t1.food_type = "french" AND t1.rating = ( SELECT MAX ( t1.rating ) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t1.food_type = "french" );'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
|
1,554 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
38,
6903,
41084,
1341,
1,
2456,
47416,
3414,
4813,
1,
1495,
345,
1,
39243,
56,
1,
1495,
345,
1,
78531,
1,
1495,
345,
6682,
1401,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
46139,
10592,
220,
16,
26,
4815,
47652,
4813,
1393,
39243,
56,
1393,
78531,
33006,
6343,
23421,
14700,
330,
39407,
32,
1539,
2891,
1,
2456,
1,
926,
1,
528,
345,
1,
7687,
1,
1495,
345,
1,
3873,
2114,
4283,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
1,
49,
34657,
1,
1972,
345,
6682,
1401,
446,
926,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10960,
10592,
220,
16,
26,
4815,
3110,
1393,
7687,
1393,
3873,
2114,
4283,
1393,
34,
3414,
4813,
1393,
49,
34657,
33006,
6343,
23421,
14700,
330,
35324,
1,
2456,
1,
39407,
32,
1539,
2891,
3533,
1,
528,
345,
1,
97494,
19925,
1,
528,
345,
1,
790,
57021,
4813,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
6682,
1401,
446,
39407,
32,
1539,
2891,
3533,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
29543,
1401,
3573,
39407,
32,
1539,
2891,
3533,
909,
15407,
1595,
39407,
32,
1539,
2891,
63,
446,
39407,
32,
1539,
2891,
3533,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3813,
10592,
220,
16,
26,
4815,
26487,
32,
1539,
2891,
3533,
1393,
97494,
19925,
1393,
790,
57021,
4813,
1393,
34,
3414,
4813,
33006,
6343,
14711,
16225,
198,
47530,
757,
1063,
1695,
15926,
389,
293,
774,
301,
13218,
23527,
304,
293,
774,
301,
13218,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
83144,
301,
13218,
1,
3651,
259,
17,
74327,
1292,
220,
284,
220,
330,
83144,
301,
13218,
23527,
1,
3651,
259,
16,
49759,
220,
871,
220,
220,
17,
13,
20,
37094,
5525,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
83144,
301,
13218,
1,
3651,
259,
17,
74327,
1292,
220,
284,
220,
330,
83144,
301,
13218,
23527,
1,
3651,
259,
16,
49759,
220,
871,
220,
220,
17,
13,
20,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
### Question
give me some good restaurants on bethel island rd in bethel island ?
|
[query_database(**{'query': 'SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "bethel island" AND t2.street_name = "bethel island rd" AND t1.rating > 2.5;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
|
1,558 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
38,
6903,
41084,
1341,
1,
2456,
47416,
3414,
4813,
1,
1495,
345,
1,
39243,
56,
1,
1495,
345,
1,
78531,
1,
1495,
345,
6682,
1401,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
46139,
10592,
220,
16,
26,
4815,
47652,
4813,
1393,
39243,
56,
1393,
78531,
33006,
6343,
23421,
14700,
330,
39407,
32,
1539,
2891,
1,
2456,
1,
926,
1,
528,
345,
1,
7687,
1,
1495,
345,
1,
3873,
2114,
4283,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
1,
49,
34657,
1,
1972,
345,
6682,
1401,
446,
926,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10960,
10592,
220,
16,
26,
4815,
3110,
1393,
7687,
1393,
3873,
2114,
4283,
1393,
34,
3414,
4813,
1393,
49,
34657,
33006,
6343,
23421,
14700,
330,
35324,
1,
2456,
1,
39407,
32,
1539,
2891,
3533,
1,
528,
345,
1,
97494,
19925,
1,
528,
345,
1,
790,
57021,
4813,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
6682,
1401,
446,
39407,
32,
1539,
2891,
3533,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
29543,
1401,
3573,
39407,
32,
1539,
2891,
3533,
909,
15407,
1595,
39407,
32,
1539,
2891,
63,
446,
39407,
32,
1539,
2891,
3533,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3813,
10592,
220,
16,
26,
4815,
26487,
32,
1539,
2891,
3533,
1393,
97494,
19925,
1393,
790,
57021,
4813,
1393,
34,
3414,
4813,
33006,
6343,
14711,
16225,
198,
47530,
757,
264,
10960,
304,
453,
99171,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,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100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
278,
99171,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
### Question
give me a restaurant in alameda ?
|
[query_database(**{'query': 'SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "alameda";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
|
1,561 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
38,
6903,
41084,
1341,
1,
2456,
47416,
3414,
4813,
1,
1495,
345,
1,
39243,
56,
1,
1495,
345,
1,
78531,
1,
1495,
345,
6682,
1401,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
46139,
10592,
220,
16,
26,
4815,
47652,
4813,
1393,
39243,
56,
1393,
78531,
33006,
6343,
23421,
14700,
330,
39407,
32,
1539,
2891,
1,
2456,
1,
926,
1,
528,
345,
1,
7687,
1,
1495,
345,
1,
3873,
2114,
4283,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
1,
49,
34657,
1,
1972,
345,
6682,
1401,
446,
926,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10960,
10592,
220,
16,
26,
4815,
3110,
1393,
7687,
1393,
3873,
2114,
4283,
1393,
34,
3414,
4813,
1393,
49,
34657,
33006,
6343,
23421,
14700,
330,
35324,
1,
2456,
1,
39407,
32,
1539,
2891,
3533,
1,
528,
345,
1,
97494,
19925,
1,
528,
345,
1,
790,
57021,
4813,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
6682,
1401,
446,
39407,
32,
1539,
2891,
3533,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
29543,
1401,
3573,
39407,
32,
1539,
2891,
3533,
909,
15407,
1595,
39407,
32,
1539,
2891,
63,
446,
39407,
32,
1539,
2891,
3533,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3813,
10592,
220,
16,
26,
4815,
26487,
32,
1539,
2891,
3533,
1393,
97494,
19925,
1393,
790,
57021,
4813,
1393,
34,
3414,
4813,
33006,
6343,
14711,
16225,
198,
47530,
757,
1063,
15926,
304,
453,
99171,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
278,
99171,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
278,
99171,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
### Question
give me some restaurants in alameda ?
|
[query_database(**{'query': 'SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "alameda";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
|
1,565 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
38,
6903,
41084,
1341,
1,
2456,
47416,
3414,
4813,
1,
1495,
345,
1,
39243,
56,
1,
1495,
345,
1,
78531,
1,
1495,
345,
6682,
1401,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
46139,
10592,
220,
16,
26,
4815,
47652,
4813,
1393,
39243,
56,
1393,
78531,
33006,
6343,
23421,
14700,
330,
39407,
32,
1539,
2891,
1,
2456,
1,
926,
1,
528,
345,
1,
7687,
1,
1495,
345,
1,
3873,
2114,
4283,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
1,
49,
34657,
1,
1972,
345,
6682,
1401,
446,
926,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10960,
10592,
220,
16,
26,
4815,
3110,
1393,
7687,
1393,
3873,
2114,
4283,
1393,
34,
3414,
4813,
1393,
49,
34657,
33006,
6343,
23421,
14700,
330,
35324,
1,
2456,
1,
39407,
32,
1539,
2891,
3533,
1,
528,
345,
1,
97494,
19925,
1,
528,
345,
1,
790,
57021,
4813,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
6682,
1401,
446,
39407,
32,
1539,
2891,
3533,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
29543,
1401,
3573,
39407,
32,
1539,
2891,
3533,
909,
15407,
1595,
39407,
32,
1539,
2891,
63,
446,
39407,
32,
1539,
2891,
3533,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3813,
10592,
220,
16,
26,
4815,
26487,
32,
1539,
2891,
3533,
1393,
97494,
19925,
1393,
790,
57021,
4813,
1393,
34,
3414,
4813,
33006,
6343,
14711,
16225,
198,
5269,
1690,
42293,
15926,
527,
1070,
304,
11091,
78,
24180,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
24945,
320,
353,
883,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
79,
12812,
24180,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
69,
6793,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
24945,
320,
353,
883,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
79,
12812,
24180,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
69,
6793,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
### Question
how many french restaurants are there in palo alto ?
|
[query_database(**{'query': 'SELECT COUNT ( * ) FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "palo alto" AND t1.food_type = "french";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
|
1,569 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
38,
6903,
41084,
1341,
1,
2456,
47416,
3414,
4813,
1,
1495,
345,
1,
39243,
56,
1,
1495,
345,
1,
78531,
1,
1495,
345,
6682,
1401,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
46139,
10592,
220,
16,
26,
4815,
47652,
4813,
1393,
39243,
56,
1393,
78531,
33006,
6343,
23421,
14700,
330,
39407,
32,
1539,
2891,
1,
2456,
1,
926,
1,
528,
345,
1,
7687,
1,
1495,
345,
1,
3873,
2114,
4283,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
1,
49,
34657,
1,
1972,
345,
6682,
1401,
446,
926,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10960,
10592,
220,
16,
26,
4815,
3110,
1393,
7687,
1393,
3873,
2114,
4283,
1393,
34,
3414,
4813,
1393,
49,
34657,
33006,
6343,
23421,
14700,
330,
35324,
1,
2456,
1,
39407,
32,
1539,
2891,
3533,
1,
528,
345,
1,
97494,
19925,
1,
528,
345,
1,
790,
57021,
4813,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
6682,
1401,
446,
39407,
32,
1539,
2891,
3533,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
29543,
1401,
3573,
39407,
32,
1539,
2891,
3533,
909,
15407,
1595,
39407,
32,
1539,
2891,
63,
446,
39407,
32,
1539,
2891,
3533,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3813,
10592,
220,
16,
26,
4815,
26487,
32,
1539,
2891,
3533,
1393,
97494,
19925,
1393,
790,
57021,
4813,
1393,
34,
3414,
4813,
33006,
6343,
14711,
16225,
198,
2940,
649,
602,
8343,
42293,
3691,
304,
16700,
1684,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
16966,
467,
1684,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
69,
6793,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
16966,
467,
1684,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
69,
6793,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
### Question
where can i eat french food in mountain view ?
|
[query_database(**{'query': 'SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "mountain view" AND t1.food_type = "french";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
|
1,574 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
38,
6903,
41084,
1341,
1,
2456,
47416,
3414,
4813,
1,
1495,
345,
1,
39243,
56,
1,
1495,
345,
1,
78531,
1,
1495,
345,
6682,
1401,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
46139,
10592,
220,
16,
26,
4815,
47652,
4813,
1393,
39243,
56,
1393,
78531,
33006,
6343,
23421,
14700,
330,
39407,
32,
1539,
2891,
1,
2456,
1,
926,
1,
528,
345,
1,
7687,
1,
1495,
345,
1,
3873,
2114,
4283,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
1,
49,
34657,
1,
1972,
345,
6682,
1401,
446,
926,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10960,
10592,
220,
16,
26,
4815,
3110,
1393,
7687,
1393,
3873,
2114,
4283,
1393,
34,
3414,
4813,
1393,
49,
34657,
33006,
6343,
23421,
14700,
330,
35324,
1,
2456,
1,
39407,
32,
1539,
2891,
3533,
1,
528,
345,
1,
97494,
19925,
1,
528,
345,
1,
790,
57021,
4813,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
6682,
1401,
446,
39407,
32,
1539,
2891,
3533,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
29543,
1401,
3573,
39407,
32,
1539,
2891,
3533,
909,
15407,
1595,
39407,
32,
1539,
2891,
63,
446,
39407,
32,
1539,
2891,
3533,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3813,
10592,
220,
16,
26,
4815,
26487,
32,
1539,
2891,
3533,
1393,
97494,
19925,
1393,
790,
57021,
4813,
1393,
34,
3414,
4813,
33006,
6343,
14711,
16225,
198,
47530,
757,
1063,
1695,
15926,
304,
453,
99171,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
278,
99171,
1,
3651,
259,
16,
49759,
220,
871,
220,
220,
17,
13,
20,
37094,
5525,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
278,
99171,
1,
3651,
259,
16,
49759,
220,
871,
220,
220,
17,
13,
20,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
### Question
give me some good restaurants in alameda ?
|
[query_database(**{'query': 'SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "alameda" AND t1.rating > 2.5;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
|
1,578 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
38,
6903,
41084,
1341,
1,
2456,
47416,
3414,
4813,
1,
1495,
345,
1,
39243,
56,
1,
1495,
345,
1,
78531,
1,
1495,
345,
6682,
1401,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
46139,
10592,
220,
16,
26,
4815,
47652,
4813,
1393,
39243,
56,
1393,
78531,
33006,
6343,
23421,
14700,
330,
39407,
32,
1539,
2891,
1,
2456,
1,
926,
1,
528,
345,
1,
7687,
1,
1495,
345,
1,
3873,
2114,
4283,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
1,
49,
34657,
1,
1972,
345,
6682,
1401,
446,
926,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10960,
10592,
220,
16,
26,
4815,
3110,
1393,
7687,
1393,
3873,
2114,
4283,
1393,
34,
3414,
4813,
1393,
49,
34657,
33006,
6343,
23421,
14700,
330,
35324,
1,
2456,
1,
39407,
32,
1539,
2891,
3533,
1,
528,
345,
1,
97494,
19925,
1,
528,
345,
1,
790,
57021,
4813,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
6682,
1401,
446,
39407,
32,
1539,
2891,
3533,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
29543,
1401,
3573,
39407,
32,
1539,
2891,
3533,
909,
15407,
1595,
39407,
32,
1539,
2891,
63,
446,
39407,
32,
1539,
2891,
3533,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3813,
10592,
220,
16,
26,
4815,
26487,
32,
1539,
2891,
3533,
1393,
97494,
19925,
1393,
790,
57021,
4813,
1393,
34,
3414,
4813,
33006,
6343,
14711,
16225,
198,
12840,
527,
1063,
1695,
7634,
369,
52412,
292,
389,
1048,
5776,
276,
304,
8528,
44579,
9652,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
34182,
44579,
9652,
1,
3651,
259,
17,
74327,
1292,
220,
284,
220,
330,
73143,
29718,
1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
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
34182,
44579,
9652,
1,
3651,
259,
17,
74327,
1292,
220,
284,
220,
330,
73143,
29718,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
277,
69391,
1,
3651,
259,
16,
49759,
220,
871,
220,
220,
17,
13,
20,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
### Question
what are some good places for arabic on buchanan in san francisco ?
|
[query_database(**{'query': 'SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t2.street_name = "buchanan" AND t1.food_type = "arabic" AND t1.rating > 2.5;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
|
1,581 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
38,
6903,
41084,
1341,
1,
2456,
47416,
3414,
4813,
1,
1495,
345,
1,
39243,
56,
1,
1495,
345,
1,
78531,
1,
1495,
345,
6682,
1401,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
46139,
10592,
220,
16,
26,
4815,
47652,
4813,
1393,
39243,
56,
1393,
78531,
33006,
6343,
23421,
14700,
330,
39407,
32,
1539,
2891,
1,
2456,
1,
926,
1,
528,
345,
1,
7687,
1,
1495,
345,
1,
3873,
2114,
4283,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
1,
49,
34657,
1,
1972,
345,
6682,
1401,
446,
926,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10960,
10592,
220,
16,
26,
4815,
3110,
1393,
7687,
1393,
3873,
2114,
4283,
1393,
34,
3414,
4813,
1393,
49,
34657,
33006,
6343,
23421,
14700,
330,
35324,
1,
2456,
1,
39407,
32,
1539,
2891,
3533,
1,
528,
345,
1,
97494,
19925,
1,
528,
345,
1,
790,
57021,
4813,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
6682,
1401,
446,
39407,
32,
1539,
2891,
3533,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
29543,
1401,
3573,
39407,
32,
1539,
2891,
3533,
909,
15407,
1595,
39407,
32,
1539,
2891,
63,
446,
39407,
32,
1539,
2891,
3533,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3813,
10592,
220,
16,
26,
4815,
26487,
32,
1539,
2891,
3533,
1393,
97494,
19925,
1393,
790,
57021,
4813,
1393,
34,
3414,
4813,
33006,
6343,
14711,
16225,
198,
47530,
757,
264,
1695,
2035,
389,
1048,
5776,
276,
304,
8528,
44579,
9652,
369,
52412,
292,
3691,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
34182,
44579,
9652,
1,
3651,
259,
17,
74327,
1292,
220,
284,
220,
330,
73143,
29718,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
277,
69391,
1,
3651,
259,
16,
49759,
220,
871,
220,
220,
17,
13,
20,
37094,
5525,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
34182,
44579,
9652,
1,
3651,
259,
17,
74327,
1292,
220,
284,
220,
330,
73143,
29718,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
277,
69391,
1,
3651,
259,
16,
49759,
220,
871,
220,
220,
17,
13,
20,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
### Question
give me a good place on buchanan in san francisco for arabic food ?
|
[query_database(**{'query': 'SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t2.street_name = "buchanan" AND t1.food_type = "arabic" AND t1.rating > 2.5;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
|
1,586 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
38,
6903,
41084,
1341,
1,
2456,
47416,
3414,
4813,
1,
1495,
345,
1,
39243,
56,
1,
1495,
345,
1,
78531,
1,
1495,
345,
6682,
1401,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
46139,
10592,
220,
16,
26,
4815,
47652,
4813,
1393,
39243,
56,
1393,
78531,
33006,
6343,
23421,
14700,
330,
39407,
32,
1539,
2891,
1,
2456,
1,
926,
1,
528,
345,
1,
7687,
1,
1495,
345,
1,
3873,
2114,
4283,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
1,
49,
34657,
1,
1972,
345,
6682,
1401,
446,
926,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10960,
10592,
220,
16,
26,
4815,
3110,
1393,
7687,
1393,
3873,
2114,
4283,
1393,
34,
3414,
4813,
1393,
49,
34657,
33006,
6343,
23421,
14700,
330,
35324,
1,
2456,
1,
39407,
32,
1539,
2891,
3533,
1,
528,
345,
1,
97494,
19925,
1,
528,
345,
1,
790,
57021,
4813,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
6682,
1401,
446,
39407,
32,
1539,
2891,
3533,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
29543,
1401,
3573,
39407,
32,
1539,
2891,
3533,
909,
15407,
1595,
39407,
32,
1539,
2891,
63,
446,
39407,
32,
1539,
2891,
3533,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3813,
10592,
220,
16,
26,
4815,
26487,
32,
1539,
2891,
3533,
1393,
97494,
19925,
1393,
790,
57021,
4813,
1393,
34,
3414,
4813,
33006,
6343,
14711,
16225,
198,
47530,
757,
264,
10960,
389,
1048,
5776,
276,
304,
8528,
44579,
9652,
430,
17482,
1695,
52412,
292,
3691,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
34182,
44579,
9652,
1,
3651,
259,
17,
74327,
1292,
220,
284,
220,
330,
73143,
29718,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
277,
69391,
1,
3651,
259,
16,
49759,
220,
871,
220,
220,
17,
13,
20,
37094,
5525,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
34182,
44579,
9652,
1,
3651,
259,
17,
74327,
1292,
220,
284,
220,
330,
73143,
29718,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
277,
69391,
1,
3651,
259,
16,
49759,
220,
871,
220,
220,
17,
13,
20,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
### Question
give me a restaurant on buchanan in san francisco that serves good arabic food ?
|
[query_database(**{'query': 'SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t2.street_name = "buchanan" AND t1.food_type = "arabic" AND t1.rating > 2.5;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
|
1,590 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
38,
6903,
41084,
1341,
1,
2456,
47416,
3414,
4813,
1,
1495,
345,
1,
39243,
56,
1,
1495,
345,
1,
78531,
1,
1495,
345,
6682,
1401,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
46139,
10592,
220,
16,
26,
4815,
47652,
4813,
1393,
39243,
56,
1393,
78531,
33006,
6343,
23421,
14700,
330,
39407,
32,
1539,
2891,
1,
2456,
1,
926,
1,
528,
345,
1,
7687,
1,
1495,
345,
1,
3873,
2114,
4283,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
1,
49,
34657,
1,
1972,
345,
6682,
1401,
446,
926,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10960,
10592,
220,
16,
26,
4815,
3110,
1393,
7687,
1393,
3873,
2114,
4283,
1393,
34,
3414,
4813,
1393,
49,
34657,
33006,
6343,
23421,
14700,
330,
35324,
1,
2456,
1,
39407,
32,
1539,
2891,
3533,
1,
528,
345,
1,
97494,
19925,
1,
528,
345,
1,
790,
57021,
4813,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
6682,
1401,
446,
39407,
32,
1539,
2891,
3533,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
29543,
1401,
3573,
39407,
32,
1539,
2891,
3533,
909,
15407,
1595,
39407,
32,
1539,
2891,
63,
446,
39407,
32,
1539,
2891,
3533,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3813,
10592,
220,
16,
26,
4815,
26487,
32,
1539,
2891,
3533,
1393,
97494,
19925,
1393,
790,
57021,
4813,
1393,
34,
3414,
4813,
33006,
6343,
14711,
16225,
198,
47530,
757,
1063,
1695,
7634,
369,
52412,
292,
389,
1048,
5776,
276,
304,
8528,
44579,
9652,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
34182,
44579,
9652,
1,
3651,
259,
17,
74327,
1292,
220,
284,
220,
330,
73143,
29718,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
277,
69391,
1,
3651,
259,
16,
49759,
220,
871,
220,
220,
17,
13,
20,
37094,
5525,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
34182,
44579,
9652,
1,
3651,
259,
17,
74327,
1292,
220,
284,
220,
330,
73143,
29718,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
277,
69391,
1,
3651,
259,
16,
49759,
220,
871,
220,
220,
17,
13,
20,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
### Question
give me some good places for arabic on buchanan in san francisco ?
|
[query_database(**{'query': 'SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t2.street_name = "buchanan" AND t1.food_type = "arabic" AND t1.rating > 2.5;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
|
1,592 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
38,
6903,
41084,
1341,
1,
2456,
47416,
3414,
4813,
1,
1495,
345,
1,
39243,
56,
1,
1495,
345,
1,
78531,
1,
1495,
345,
6682,
1401,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
46139,
10592,
220,
16,
26,
4815,
47652,
4813,
1393,
39243,
56,
1393,
78531,
33006,
6343,
23421,
14700,
330,
39407,
32,
1539,
2891,
1,
2456,
1,
926,
1,
528,
345,
1,
7687,
1,
1495,
345,
1,
3873,
2114,
4283,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
1,
49,
34657,
1,
1972,
345,
6682,
1401,
446,
926,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10960,
10592,
220,
16,
26,
4815,
3110,
1393,
7687,
1393,
3873,
2114,
4283,
1393,
34,
3414,
4813,
1393,
49,
34657,
33006,
6343,
23421,
14700,
330,
35324,
1,
2456,
1,
39407,
32,
1539,
2891,
3533,
1,
528,
345,
1,
97494,
19925,
1,
528,
345,
1,
790,
57021,
4813,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
6682,
1401,
446,
39407,
32,
1539,
2891,
3533,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
29543,
1401,
3573,
39407,
32,
1539,
2891,
3533,
909,
15407,
1595,
39407,
32,
1539,
2891,
63,
446,
39407,
32,
1539,
2891,
3533,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3813,
10592,
220,
16,
26,
4815,
26487,
32,
1539,
2891,
3533,
1393,
97494,
19925,
1393,
790,
57021,
4813,
1393,
34,
3414,
4813,
33006,
6343,
14711,
16225,
198,
2940,
374,
264,
1695,
52412,
292,
389,
1048,
5776,
276,
304,
8528,
44579,
9652,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
34182,
44579,
9652,
1,
3651,
259,
17,
74327,
1292,
220,
284,
220,
330,
73143,
29718,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
277,
69391,
1,
3651,
259,
16,
49759,
220,
871,
220,
220,
17,
13,
20,
37094,
5525,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
34182,
44579,
9652,
1,
3651,
259,
17,
74327,
1292,
220,
284,
220,
330,
73143,
29718,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
277,
69391,
1,
3651,
259,
16,
49759,
220,
871,
220,
220,
17,
13,
20,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
### Question
where is a good arabic on buchanan in san francisco ?
|
[query_database(**{'query': 'SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t2.street_name = "buchanan" AND t1.food_type = "arabic" AND t1.rating > 2.5;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
|
1,596 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
38,
6903,
41084,
1341,
1,
2456,
47416,
3414,
4813,
1,
1495,
345,
1,
39243,
56,
1,
1495,
345,
1,
78531,
1,
1495,
345,
6682,
1401,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
46139,
10592,
220,
16,
26,
4815,
47652,
4813,
1393,
39243,
56,
1393,
78531,
33006,
6343,
23421,
14700,
330,
39407,
32,
1539,
2891,
1,
2456,
1,
926,
1,
528,
345,
1,
7687,
1,
1495,
345,
1,
3873,
2114,
4283,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
1,
49,
34657,
1,
1972,
345,
6682,
1401,
446,
926,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10960,
10592,
220,
16,
26,
4815,
3110,
1393,
7687,
1393,
3873,
2114,
4283,
1393,
34,
3414,
4813,
1393,
49,
34657,
33006,
6343,
23421,
14700,
330,
35324,
1,
2456,
1,
39407,
32,
1539,
2891,
3533,
1,
528,
345,
1,
97494,
19925,
1,
528,
345,
1,
790,
57021,
4813,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
6682,
1401,
446,
39407,
32,
1539,
2891,
3533,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
29543,
1401,
3573,
39407,
32,
1539,
2891,
3533,
909,
15407,
1595,
39407,
32,
1539,
2891,
63,
446,
39407,
32,
1539,
2891,
3533,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3813,
10592,
220,
16,
26,
4815,
26487,
32,
1539,
2891,
3533,
1393,
97494,
19925,
1393,
790,
57021,
4813,
1393,
34,
3414,
4813,
33006,
6343,
14711,
16225,
198,
47530,
757,
1063,
1695,
52412,
1233,
389,
1048,
5776,
276,
304,
8528,
44579,
9652,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
34182,
44579,
9652,
1,
3651,
259,
17,
74327,
1292,
220,
284,
220,
330,
73143,
29718,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
277,
69391,
1,
3651,
259,
16,
49759,
220,
871,
220,
220,
17,
13,
20,
37094,
5525,
60,
128009
] |
[
1,
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,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
34182,
44579,
9652,
1,
3651,
259,
17,
74327,
1292,
220,
284,
220,
330,
73143,
29718,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
277,
69391,
1,
3651,
259,
16,
49759,
220,
871,
220,
220,
17,
13,
20,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
### Question
give me some good arabics on buchanan in san francisco ?
|
[query_database(**{'query': 'SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t2.street_name = "buchanan" AND t1.food_type = "arabic" AND t1.rating > 2.5;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
|
1,600 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
38,
6903,
41084,
1341,
1,
2456,
47416,
3414,
4813,
1,
1495,
345,
1,
39243,
56,
1,
1495,
345,
1,
78531,
1,
1495,
345,
6682,
1401,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
46139,
10592,
220,
16,
26,
4815,
47652,
4813,
1393,
39243,
56,
1393,
78531,
33006,
6343,
23421,
14700,
330,
39407,
32,
1539,
2891,
1,
2456,
1,
926,
1,
528,
345,
1,
7687,
1,
1495,
345,
1,
3873,
2114,
4283,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
1,
49,
34657,
1,
1972,
345,
6682,
1401,
446,
926,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10960,
10592,
220,
16,
26,
4815,
3110,
1393,
7687,
1393,
3873,
2114,
4283,
1393,
34,
3414,
4813,
1393,
49,
34657,
33006,
6343,
23421,
14700,
330,
35324,
1,
2456,
1,
39407,
32,
1539,
2891,
3533,
1,
528,
345,
1,
97494,
19925,
1,
528,
345,
1,
790,
57021,
4813,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
6682,
1401,
446,
39407,
32,
1539,
2891,
3533,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
29543,
1401,
3573,
39407,
32,
1539,
2891,
3533,
909,
15407,
1595,
39407,
32,
1539,
2891,
63,
446,
39407,
32,
1539,
2891,
3533,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3813,
10592,
220,
16,
26,
4815,
26487,
32,
1539,
2891,
3533,
1393,
97494,
19925,
1393,
790,
57021,
4813,
1393,
34,
3414,
4813,
33006,
6343,
14711,
16225,
198,
2940,
649,
584,
1505,
264,
10960,
389,
293,
774,
301,
13218,
23527,
304,
293,
774,
301,
13218,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
83144,
301,
13218,
1,
3651,
259,
17,
74327,
1292,
220,
284,
220,
330,
83144,
301,
13218,
23527,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
83144,
301,
13218,
1,
3651,
259,
17,
74327,
1292,
220,
284,
220,
330,
83144,
301,
13218,
23527,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
### Question
where can we find a restaurant on bethel island rd in bethel island ?
|
[query_database(**{'query': 'SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "bethel island" AND t2.street_name = "bethel island rd";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
|
1,604 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
38,
6903,
41084,
1341,
1,
2456,
47416,
3414,
4813,
1,
1495,
345,
1,
39243,
56,
1,
1495,
345,
1,
78531,
1,
1495,
345,
6682,
1401,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
46139,
10592,
220,
16,
26,
4815,
47652,
4813,
1393,
39243,
56,
1393,
78531,
33006,
6343,
23421,
14700,
330,
39407,
32,
1539,
2891,
1,
2456,
1,
926,
1,
528,
345,
1,
7687,
1,
1495,
345,
1,
3873,
2114,
4283,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
1,
49,
34657,
1,
1972,
345,
6682,
1401,
446,
926,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10960,
10592,
220,
16,
26,
4815,
3110,
1393,
7687,
1393,
3873,
2114,
4283,
1393,
34,
3414,
4813,
1393,
49,
34657,
33006,
6343,
23421,
14700,
330,
35324,
1,
2456,
1,
39407,
32,
1539,
2891,
3533,
1,
528,
345,
1,
97494,
19925,
1,
528,
345,
1,
790,
57021,
4813,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
6682,
1401,
446,
39407,
32,
1539,
2891,
3533,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
29543,
1401,
3573,
39407,
32,
1539,
2891,
3533,
909,
15407,
1595,
39407,
32,
1539,
2891,
63,
446,
39407,
32,
1539,
2891,
3533,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3813,
10592,
220,
16,
26,
4815,
26487,
32,
1539,
2891,
3533,
1393,
97494,
19925,
1393,
790,
57021,
4813,
1393,
34,
3414,
4813,
33006,
6343,
14711,
16225,
198,
12840,
374,
279,
1888,
10960,
304,
23542,
3158,
369,
39542,
3691,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
18,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
46139,
5871,
259,
17,
6328,
259,
16,
27473,
1292,
220,
284,
220,
259,
17,
27473,
1292,
13369,
66683,
5871,
259,
18,
6328,
259,
16,
1801,
220,
284,
220,
259,
18,
88149,
851,
5401,
259,
17,
44076,
220,
284,
220,
330,
47364,
3158,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
78818,
1,
3651,
259,
16,
49759,
220,
284,
220,
320,
19638,
8498,
320,
259,
16,
49759,
883,
4393,
10960,
5871,
259,
16,
13369,
46139,
5871,
259,
17,
6328,
259,
16,
27473,
1292,
220,
284,
220,
259,
17,
27473,
1292,
5401,
259,
17,
44076,
220,
284,
220,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
18,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
46139,
5871,
259,
17,
6328,
259,
16,
27473,
1292,
220,
284,
220,
259,
17,
27473,
1292,
13369,
66683,
5871,
259,
18,
6328,
259,
16,
1801,
220,
284,
220,
259,
18,
88149,
851,
5401,
259,
17,
44076,
220,
284,
220,
330,
47364,
3158,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
78818,
1,
3651,
259,
16,
49759,
220,
284,
220,
320,
19638,
8498,
320,
259,
16,
49759,
883,
4393,
10960,
5871,
259,
16,
13369,
46139,
5871,
259,
17,
6328,
259,
16,
27473,
1292,
220,
284,
220,
259,
17,
27473,
1292,
5401,
259,
17,
44076,
220,
284,
220,
330,
47364,
3158,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
78818,
1,
7048,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
### Question
what is the best restaurant in bay area for american food ?
|
[query_database(**{'query': 'SELECT t3.house_number , t1.name FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name JOIN LOCATION AS t3 ON t1.id = t3.restaurant_id WHERE t2.region = "bay area" AND t1.food_type = "american" AND t1.rating = ( SELECT MAX ( t1.rating ) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.region = "bay area" AND t1.food_type = "american" );'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
|
1,608 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
38,
6903,
41084,
1341,
1,
2456,
47416,
3414,
4813,
1,
1495,
345,
1,
39243,
56,
1,
1495,
345,
1,
78531,
1,
1495,
345,
6682,
1401,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
46139,
10592,
220,
16,
26,
4815,
47652,
4813,
1393,
39243,
56,
1393,
78531,
33006,
6343,
23421,
14700,
330,
39407,
32,
1539,
2891,
1,
2456,
1,
926,
1,
528,
345,
1,
7687,
1,
1495,
345,
1,
3873,
2114,
4283,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
1,
49,
34657,
1,
1972,
345,
6682,
1401,
446,
926,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10960,
10592,
220,
16,
26,
4815,
3110,
1393,
7687,
1393,
3873,
2114,
4283,
1393,
34,
3414,
4813,
1393,
49,
34657,
33006,
6343,
23421,
14700,
330,
35324,
1,
2456,
1,
39407,
32,
1539,
2891,
3533,
1,
528,
345,
1,
97494,
19925,
1,
528,
345,
1,
790,
57021,
4813,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
6682,
1401,
446,
39407,
32,
1539,
2891,
3533,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
29543,
1401,
3573,
39407,
32,
1539,
2891,
3533,
909,
15407,
1595,
39407,
32,
1539,
2891,
63,
446,
39407,
32,
1539,
2891,
3533,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3813,
10592,
220,
16,
26,
4815,
26487,
32,
1539,
2891,
3533,
1393,
97494,
19925,
1393,
790,
57021,
4813,
1393,
34,
3414,
4813,
33006,
6343,
14711,
16225,
198,
47530,
757,
279,
1888,
10960,
304,
279,
23542,
3158,
369,
39542,
3691,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
18,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
46139,
5871,
259,
17,
6328,
259,
16,
27473,
1292,
220,
284,
220,
259,
17,
27473,
1292,
13369,
66683,
5871,
259,
18,
6328,
259,
16,
1801,
220,
284,
220,
259,
18,
88149,
851,
5401,
259,
17,
44076,
220,
284,
220,
330,
47364,
3158,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
78818,
1,
3651,
259,
16,
49759,
220,
284,
220,
320,
19638,
8498,
320,
259,
16,
49759,
883,
4393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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
18,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
46139,
5871,
259,
17,
6328,
259,
16,
27473,
1292,
220,
284,
220,
259,
17,
27473,
1292,
13369,
66683,
5871,
259,
18,
6328,
259,
16,
1801,
220,
284,
220,
259,
18,
88149,
851,
5401,
259,
17,
44076,
220,
284,
220,
330,
47364,
3158,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
78818,
1,
3651,
259,
16,
49759,
220,
284,
220,
320,
19638,
8498,
320,
259,
16,
49759,
883,
4393,
10960,
5871,
259,
16,
13369,
46139,
5871,
259,
17,
6328,
259,
16,
27473,
1292,
220,
284,
220,
259,
17,
27473,
1292,
5401,
259,
17,
44076,
220,
284,
220,
330,
47364,
3158,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
78818,
1,
7048,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
### Question
give me the best restaurant in the bay area for american food ?
|
[query_database(**{'query': 'SELECT t3.house_number , t1.name FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name JOIN LOCATION AS t3 ON t1.id = t3.restaurant_id WHERE t2.region = "bay area" AND t1.food_type = "american" AND t1.rating = ( SELECT MAX ( t1.rating ) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.region = "bay area" AND t1.food_type = "american" );'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
|
1,612 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
38,
6903,
41084,
1341,
1,
2456,
47416,
3414,
4813,
1,
1495,
345,
1,
39243,
56,
1,
1495,
345,
1,
78531,
1,
1495,
345,
6682,
1401,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
46139,
10592,
220,
16,
26,
4815,
47652,
4813,
1393,
39243,
56,
1393,
78531,
33006,
6343,
23421,
14700,
330,
39407,
32,
1539,
2891,
1,
2456,
1,
926,
1,
528,
345,
1,
7687,
1,
1495,
345,
1,
3873,
2114,
4283,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
1,
49,
34657,
1,
1972,
345,
6682,
1401,
446,
926,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10960,
10592,
220,
16,
26,
4815,
3110,
1393,
7687,
1393,
3873,
2114,
4283,
1393,
34,
3414,
4813,
1393,
49,
34657,
33006,
6343,
23421,
14700,
330,
35324,
1,
2456,
1,
39407,
32,
1539,
2891,
3533,
1,
528,
345,
1,
97494,
19925,
1,
528,
345,
1,
790,
57021,
4813,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
6682,
1401,
446,
39407,
32,
1539,
2891,
3533,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
29543,
1401,
3573,
39407,
32,
1539,
2891,
3533,
909,
15407,
1595,
39407,
32,
1539,
2891,
63,
446,
39407,
32,
1539,
2891,
3533,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3813,
10592,
220,
16,
26,
4815,
26487,
32,
1539,
2891,
3533,
1393,
97494,
19925,
1393,
790,
57021,
4813,
1393,
34,
3414,
4813,
33006,
6343,
14711,
16225,
198,
47530,
757,
279,
1888,
39542,
304,
279,
23542,
3158,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
18,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
46139,
5871,
259,
17,
6328,
259,
16,
27473,
1292,
220,
284,
220,
259,
17,
27473,
1292,
13369,
66683,
5871,
259,
18,
6328,
259,
16,
1801,
220,
284,
220,
259,
18,
88149,
851,
5401,
259,
17,
44076,
220,
284,
220,
330,
47364,
3158,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
78818,
1,
3651,
259,
16,
49759,
220,
284,
220,
320,
19638,
8498,
320,
259,
16,
49759,
883,
4393,
10960,
5871,
259,
16,
13369,
46139,
5871,
259,
17,
6328,
259,
16,
27473,
1292,
220,
284,
220,
259,
17,
27473,
1292,
5401,
259,
17,
44076,
220,
284,
220,
330,
47364,
3158,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
78818,
1,
7048,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
18,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
46139,
5871,
259,
17,
6328,
259,
16,
27473,
1292,
220,
284,
220,
259,
17,
27473,
1292,
13369,
66683,
5871,
259,
18,
6328,
259,
16,
1801,
220,
284,
220,
259,
18,
88149,
851,
5401,
259,
17,
44076,
220,
284,
220,
330,
47364,
3158,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
78818,
1,
3651,
259,
16,
49759,
220,
284,
220,
320,
19638,
8498,
320,
259,
16,
49759,
883,
4393,
10960,
5871,
259,
16,
13369,
46139,
5871,
259,
17,
6328,
259,
16,
27473,
1292,
220,
284,
220,
259,
17,
27473,
1292,
5401,
259,
17,
44076,
220,
284,
220,
330,
47364,
3158,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
78818,
1,
7048,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
### Question
give me the best american in the bay area ?
|
[query_database(**{'query': 'SELECT t3.house_number , t1.name FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name JOIN LOCATION AS t3 ON t1.id = t3.restaurant_id WHERE t2.region = "bay area" AND t1.food_type = "american" AND t1.rating = ( SELECT MAX ( t1.rating ) FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name WHERE t2.region = "bay area" AND t1.food_type = "american" );'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
|
1,616 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
38,
6903,
41084,
1341,
1,
2456,
47416,
3414,
4813,
1,
1495,
345,
1,
39243,
56,
1,
1495,
345,
1,
78531,
1,
1495,
345,
6682,
1401,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
46139,
10592,
220,
16,
26,
4815,
47652,
4813,
1393,
39243,
56,
1393,
78531,
33006,
6343,
23421,
14700,
330,
39407,
32,
1539,
2891,
1,
2456,
1,
926,
1,
528,
345,
1,
7687,
1,
1495,
345,
1,
3873,
2114,
4283,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
1,
49,
34657,
1,
1972,
345,
6682,
1401,
446,
926,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10960,
10592,
220,
16,
26,
4815,
3110,
1393,
7687,
1393,
3873,
2114,
4283,
1393,
34,
3414,
4813,
1393,
49,
34657,
33006,
6343,
23421,
14700,
330,
35324,
1,
2456,
1,
39407,
32,
1539,
2891,
3533,
1,
528,
345,
1,
97494,
19925,
1,
528,
345,
1,
790,
57021,
4813,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
6682,
1401,
446,
39407,
32,
1539,
2891,
3533,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
29543,
1401,
3573,
39407,
32,
1539,
2891,
3533,
909,
15407,
1595,
39407,
32,
1539,
2891,
63,
446,
39407,
32,
1539,
2891,
3533,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3813,
10592,
220,
16,
26,
4815,
26487,
32,
1539,
2891,
3533,
1393,
97494,
19925,
1393,
790,
57021,
4813,
1393,
34,
3414,
4813,
33006,
6343,
14711,
16225,
198,
47530,
757,
264,
1695,
10960,
304,
279,
379,
84113,
323,
40774,
22553,
3158,
369,
42293,
3691,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
18,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
46139,
5871,
259,
17,
6328,
259,
16,
27473,
1292,
220,
284,
220,
259,
17,
27473,
1292,
13369,
66683,
5871,
259,
18,
6328,
259,
16,
1801,
220,
284,
220,
259,
18,
88149,
851,
5401,
259,
17,
44076,
220,
284,
220,
330,
88,
84113,
323,
40774,
22553,
3158,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
69,
6793,
1,
3651,
259,
16,
49759,
220,
871,
220,
220,
17,
13,
20,
37094,
5525,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
18,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
46139,
5871,
259,
17,
6328,
259,
16,
27473,
1292,
220,
284,
220,
259,
17,
27473,
1292,
13369,
66683,
5871,
259,
18,
6328,
259,
16,
1801,
220,
284,
220,
259,
18,
88149,
851,
5401,
259,
17,
44076,
220,
284,
220,
330,
88,
84113,
323,
40774,
22553,
3158,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
69,
6793,
1,
3651,
259,
16,
49759,
220,
871,
220,
220,
17,
13,
20,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
### Question
give me a good restaurant in the yosemite and mono lake area for french food ?
|
[query_database(**{'query': 'SELECT t3.house_number , t1.name FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name JOIN LOCATION AS t3 ON t1.id = t3.restaurant_id WHERE t2.region = "yosemite and mono lake area" AND t1.food_type = "french" AND t1.rating > 2.5;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
|
1,620 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
38,
6903,
41084,
1341,
1,
2456,
47416,
3414,
4813,
1,
1495,
345,
1,
39243,
56,
1,
1495,
345,
1,
78531,
1,
1495,
345,
6682,
1401,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
46139,
10592,
220,
16,
26,
4815,
47652,
4813,
1393,
39243,
56,
1393,
78531,
33006,
6343,
23421,
14700,
330,
39407,
32,
1539,
2891,
1,
2456,
1,
926,
1,
528,
345,
1,
7687,
1,
1495,
345,
1,
3873,
2114,
4283,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
1,
49,
34657,
1,
1972,
345,
6682,
1401,
446,
926,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10960,
10592,
220,
16,
26,
4815,
3110,
1393,
7687,
1393,
3873,
2114,
4283,
1393,
34,
3414,
4813,
1393,
49,
34657,
33006,
6343,
23421,
14700,
330,
35324,
1,
2456,
1,
39407,
32,
1539,
2891,
3533,
1,
528,
345,
1,
97494,
19925,
1,
528,
345,
1,
790,
57021,
4813,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
6682,
1401,
446,
39407,
32,
1539,
2891,
3533,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
29543,
1401,
3573,
39407,
32,
1539,
2891,
3533,
909,
15407,
1595,
39407,
32,
1539,
2891,
63,
446,
39407,
32,
1539,
2891,
3533,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3813,
10592,
220,
16,
26,
4815,
26487,
32,
1539,
2891,
3533,
1393,
97494,
19925,
1393,
790,
57021,
4813,
1393,
34,
3414,
4813,
33006,
6343,
14711,
16225,
198,
47530,
757,
264,
1695,
2035,
304,
279,
379,
84113,
323,
40774,
22553,
3158,
369,
42293,
3691,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
18,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
46139,
5871,
259,
17,
6328,
259,
16,
27473,
1292,
220,
284,
220,
259,
17,
27473,
1292,
13369,
66683,
5871,
259,
18,
6328,
259,
16,
1801,
220,
284,
220,
259,
18,
88149,
851,
5401,
259,
17,
44076,
220,
284,
220,
330,
88,
84113,
323,
40774,
22553,
3158,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
69,
6793,
1,
3651,
259,
16,
49759,
220,
871,
220,
220,
17,
13,
20,
37094,
5525,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
18,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
46139,
5871,
259,
17,
6328,
259,
16,
27473,
1292,
220,
284,
220,
259,
17,
27473,
1292,
13369,
66683,
5871,
259,
18,
6328,
259,
16,
1801,
220,
284,
220,
259,
18,
88149,
851,
5401,
259,
17,
44076,
220,
284,
220,
330,
88,
84113,
323,
40774,
22553,
3158,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
69,
6793,
1,
3651,
259,
16,
49759,
220,
871,
220,
220,
17,
13,
20,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
### Question
give me a good place in the yosemite and mono lake area for french food ?
|
[query_database(**{'query': 'SELECT t3.house_number , t1.name FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name JOIN LOCATION AS t3 ON t1.id = t3.restaurant_id WHERE t2.region = "yosemite and mono lake area" AND t1.food_type = "french" AND t1.rating > 2.5;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
|
1,624 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
38,
6903,
41084,
1341,
1,
2456,
47416,
3414,
4813,
1,
1495,
345,
1,
39243,
56,
1,
1495,
345,
1,
78531,
1,
1495,
345,
6682,
1401,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
46139,
10592,
220,
16,
26,
4815,
47652,
4813,
1393,
39243,
56,
1393,
78531,
33006,
6343,
23421,
14700,
330,
39407,
32,
1539,
2891,
1,
2456,
1,
926,
1,
528,
345,
1,
7687,
1,
1495,
345,
1,
3873,
2114,
4283,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
1,
49,
34657,
1,
1972,
345,
6682,
1401,
446,
926,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10960,
10592,
220,
16,
26,
4815,
3110,
1393,
7687,
1393,
3873,
2114,
4283,
1393,
34,
3414,
4813,
1393,
49,
34657,
33006,
6343,
23421,
14700,
330,
35324,
1,
2456,
1,
39407,
32,
1539,
2891,
3533,
1,
528,
345,
1,
97494,
19925,
1,
528,
345,
1,
790,
57021,
4813,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
6682,
1401,
446,
39407,
32,
1539,
2891,
3533,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
29543,
1401,
3573,
39407,
32,
1539,
2891,
3533,
909,
15407,
1595,
39407,
32,
1539,
2891,
63,
446,
39407,
32,
1539,
2891,
3533,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3813,
10592,
220,
16,
26,
4815,
26487,
32,
1539,
2891,
3533,
1393,
97494,
19925,
1393,
790,
57021,
4813,
1393,
34,
3414,
4813,
33006,
6343,
14711,
16225,
198,
2940,
649,
602,
8343,
1063,
1695,
42293,
3691,
304,
279,
379,
84113,
323,
40774,
22553,
3158,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
18,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
46139,
5871,
259,
17,
6328,
259,
16,
27473,
1292,
220,
284,
220,
259,
17,
27473,
1292,
13369,
66683,
5871,
259,
18,
6328,
259,
16,
1801,
220,
284,
220,
259,
18,
88149,
851,
5401,
259,
17,
44076,
220,
284,
220,
330,
88,
84113,
323,
40774,
22553,
3158,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
69,
6793,
1,
3651,
259,
16,
49759,
220,
871,
220,
220,
17,
13,
20,
37094,
5525,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
18,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
46139,
5871,
259,
17,
6328,
259,
16,
27473,
1292,
220,
284,
220,
259,
17,
27473,
1292,
13369,
66683,
5871,
259,
18,
6328,
259,
16,
1801,
220,
284,
220,
259,
18,
88149,
851,
5401,
259,
17,
44076,
220,
284,
220,
330,
88,
84113,
323,
40774,
22553,
3158,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
69,
6793,
1,
3651,
259,
16,
49759,
220,
871,
220,
220,
17,
13,
20,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
### Question
where can i eat some good french food in the yosemite and mono lake area ?
|
[query_database(**{'query': 'SELECT t3.house_number , t1.name FROM restaurant AS t1 JOIN geographic AS t2 ON t1.city_name = t2.city_name JOIN LOCATION AS t3 ON t1.id = t3.restaurant_id WHERE t2.region = "yosemite and mono lake area" AND t1.food_type = "french" AND t1.rating > 2.5;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
|
1,628 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
38,
6903,
41084,
1341,
1,
2456,
47416,
3414,
4813,
1,
1495,
345,
1,
39243,
56,
1,
1495,
345,
1,
78531,
1,
1495,
345,
6682,
1401,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
46139,
10592,
220,
16,
26,
4815,
47652,
4813,
1393,
39243,
56,
1393,
78531,
33006,
6343,
23421,
14700,
330,
39407,
32,
1539,
2891,
1,
2456,
1,
926,
1,
528,
345,
1,
7687,
1,
1495,
345,
1,
3873,
2114,
4283,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
1,
49,
34657,
1,
1972,
345,
6682,
1401,
446,
926,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10960,
10592,
220,
16,
26,
4815,
3110,
1393,
7687,
1393,
3873,
2114,
4283,
1393,
34,
3414,
4813,
1393,
49,
34657,
33006,
6343,
23421,
14700,
330,
35324,
1,
2456,
1,
39407,
32,
1539,
2891,
3533,
1,
528,
345,
1,
97494,
19925,
1,
528,
345,
1,
790,
57021,
4813,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
6682,
1401,
446,
39407,
32,
1539,
2891,
3533,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
29543,
1401,
3573,
39407,
32,
1539,
2891,
3533,
909,
15407,
1595,
39407,
32,
1539,
2891,
63,
446,
39407,
32,
1539,
2891,
3533,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3813,
10592,
220,
16,
26,
4815,
26487,
32,
1539,
2891,
3533,
1393,
97494,
19925,
1393,
790,
57021,
4813,
1393,
34,
3414,
4813,
33006,
6343,
14711,
16225,
198,
3528,
757,
264,
1695,
52412,
292,
10960,
304,
16700,
1684,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
16966,
467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-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
16966,
467,
1684,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
277,
69391,
1,
3651,
259,
16,
49759,
220,
871,
220,
220,
17,
13,
20,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
### Question
show me a good arabic restaurant in mountain view ?
|
[query_database(**{'query': 'SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "mountain view" AND t1.food_type = "arabic" AND t1.rating > 2.5;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
|
1,632 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
38,
6903,
41084,
1341,
1,
2456,
47416,
3414,
4813,
1,
1495,
345,
1,
39243,
56,
1,
1495,
345,
1,
78531,
1,
1495,
345,
6682,
1401,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
46139,
10592,
220,
16,
26,
4815,
47652,
4813,
1393,
39243,
56,
1393,
78531,
33006,
6343,
23421,
14700,
330,
39407,
32,
1539,
2891,
1,
2456,
1,
926,
1,
528,
345,
1,
7687,
1,
1495,
345,
1,
3873,
2114,
4283,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
1,
49,
34657,
1,
1972,
345,
6682,
1401,
446,
926,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10960,
10592,
220,
16,
26,
4815,
3110,
1393,
7687,
1393,
3873,
2114,
4283,
1393,
34,
3414,
4813,
1393,
49,
34657,
33006,
6343,
23421,
14700,
330,
35324,
1,
2456,
1,
39407,
32,
1539,
2891,
3533,
1,
528,
345,
1,
97494,
19925,
1,
528,
345,
1,
790,
57021,
4813,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
6682,
1401,
446,
39407,
32,
1539,
2891,
3533,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
29543,
1401,
3573,
39407,
32,
1539,
2891,
3533,
909,
15407,
1595,
39407,
32,
1539,
2891,
63,
446,
39407,
32,
1539,
2891,
3533,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3813,
10592,
220,
16,
26,
4815,
26487,
32,
1539,
2891,
3533,
1393,
97494,
19925,
1393,
790,
57021,
4813,
1393,
34,
3414,
4813,
33006,
6343,
14711,
16225,
198,
2940,
527,
1063,
1695,
52412,
1233,
304,
16700,
1684,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
16966,
467,
1684,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
277,
69391,
1,
3651,
259,
16,
49759,
220,
871,
220,
220,
17,
13,
20,
37094,
5525,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
16966,
467,
1684,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
277,
69391,
1,
3651,
259,
16,
49759,
220,
871,
220,
220,
17,
13,
20,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
### Question
where are some good arabics in mountain view ?
|
[query_database(**{'query': 'SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "mountain view" AND t1.food_type = "arabic" AND t1.rating > 2.5;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
|
1,636 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
38,
6903,
41084,
1341,
1,
2456,
47416,
3414,
4813,
1,
1495,
345,
1,
39243,
56,
1,
1495,
345,
1,
78531,
1,
1495,
345,
6682,
1401,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
46139,
10592,
220,
16,
26,
4815,
47652,
4813,
1393,
39243,
56,
1393,
78531,
33006,
6343,
23421,
14700,
330,
39407,
32,
1539,
2891,
1,
2456,
1,
926,
1,
528,
345,
1,
7687,
1,
1495,
345,
1,
3873,
2114,
4283,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
1,
49,
34657,
1,
1972,
345,
6682,
1401,
446,
926,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10960,
10592,
220,
16,
26,
4815,
3110,
1393,
7687,
1393,
3873,
2114,
4283,
1393,
34,
3414,
4813,
1393,
49,
34657,
33006,
6343,
23421,
14700,
330,
35324,
1,
2456,
1,
39407,
32,
1539,
2891,
3533,
1,
528,
345,
1,
97494,
19925,
1,
528,
345,
1,
790,
57021,
4813,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
6682,
1401,
446,
39407,
32,
1539,
2891,
3533,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
29543,
1401,
3573,
39407,
32,
1539,
2891,
3533,
909,
15407,
1595,
39407,
32,
1539,
2891,
63,
446,
39407,
32,
1539,
2891,
3533,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3813,
10592,
220,
16,
26,
4815,
26487,
32,
1539,
2891,
3533,
1393,
97494,
19925,
1393,
790,
57021,
4813,
1393,
34,
3414,
4813,
33006,
6343,
14711,
16225,
198,
2940,
649,
602,
8343,
1063,
1695,
52412,
292,
3691,
304,
16700,
1684,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
16966,
467,
1684,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
277,
69391,
1,
3651,
259,
16,
49759,
220,
871,
220,
220,
17,
13,
20,
37094,
5525,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
16966,
467,
1684,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
277,
69391,
1,
3651,
259,
16,
49759,
220,
871,
220,
220,
17,
13,
20,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
### Question
where can i eat some good arabic food in mountain view ?
|
[query_database(**{'query': 'SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "mountain view" AND t1.food_type = "arabic" AND t1.rating > 2.5;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
|
1,640 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
38,
6903,
41084,
1341,
1,
2456,
47416,
3414,
4813,
1,
1495,
345,
1,
39243,
56,
1,
1495,
345,
1,
78531,
1,
1495,
345,
6682,
1401,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
46139,
10592,
220,
16,
26,
4815,
47652,
4813,
1393,
39243,
56,
1393,
78531,
33006,
6343,
23421,
14700,
330,
39407,
32,
1539,
2891,
1,
2456,
1,
926,
1,
528,
345,
1,
7687,
1,
1495,
345,
1,
3873,
2114,
4283,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
1,
49,
34657,
1,
1972,
345,
6682,
1401,
446,
926,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10960,
10592,
220,
16,
26,
4815,
3110,
1393,
7687,
1393,
3873,
2114,
4283,
1393,
34,
3414,
4813,
1393,
49,
34657,
33006,
6343,
23421,
14700,
330,
35324,
1,
2456,
1,
39407,
32,
1539,
2891,
3533,
1,
528,
345,
1,
97494,
19925,
1,
528,
345,
1,
790,
57021,
4813,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
6682,
1401,
446,
39407,
32,
1539,
2891,
3533,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
29543,
1401,
3573,
39407,
32,
1539,
2891,
3533,
909,
15407,
1595,
39407,
32,
1539,
2891,
63,
446,
39407,
32,
1539,
2891,
3533,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3813,
10592,
220,
16,
26,
4815,
26487,
32,
1539,
2891,
3533,
1393,
97494,
19925,
1393,
790,
57021,
4813,
1393,
34,
3414,
4813,
33006,
6343,
14711,
16225,
198,
47530,
757,
1063,
1695,
52412,
292,
15926,
304,
16700,
1684,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
16966,
467,
1684,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
277,
69391,
1,
3651,
259,
16,
49759,
220,
871,
220,
220,
17,
13,
20,
37094,
5525,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
16966,
467,
1684,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
277,
69391,
1,
3651,
259,
16,
49759,
220,
871,
220,
220,
17,
13,
20,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
### Question
give me some good arabic restaurants in mountain view ?
|
[query_database(**{'query': 'SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "mountain view" AND t1.food_type = "arabic" AND t1.rating > 2.5;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
|
1,643 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
38,
6903,
41084,
1341,
1,
2456,
47416,
3414,
4813,
1,
1495,
345,
1,
39243,
56,
1,
1495,
345,
1,
78531,
1,
1495,
345,
6682,
1401,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
46139,
10592,
220,
16,
26,
4815,
47652,
4813,
1393,
39243,
56,
1393,
78531,
33006,
6343,
23421,
14700,
330,
39407,
32,
1539,
2891,
1,
2456,
1,
926,
1,
528,
345,
1,
7687,
1,
1495,
345,
1,
3873,
2114,
4283,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
1,
49,
34657,
1,
1972,
345,
6682,
1401,
446,
926,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10960,
10592,
220,
16,
26,
4815,
3110,
1393,
7687,
1393,
3873,
2114,
4283,
1393,
34,
3414,
4813,
1393,
49,
34657,
33006,
6343,
23421,
14700,
330,
35324,
1,
2456,
1,
39407,
32,
1539,
2891,
3533,
1,
528,
345,
1,
97494,
19925,
1,
528,
345,
1,
790,
57021,
4813,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
6682,
1401,
446,
39407,
32,
1539,
2891,
3533,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
29543,
1401,
3573,
39407,
32,
1539,
2891,
3533,
909,
15407,
1595,
39407,
32,
1539,
2891,
63,
446,
39407,
32,
1539,
2891,
3533,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3813,
10592,
220,
16,
26,
4815,
26487,
32,
1539,
2891,
3533,
1393,
97494,
19925,
1393,
790,
57021,
4813,
1393,
34,
3414,
4813,
33006,
6343,
14711,
16225,
198,
47530,
757,
264,
1695,
10960,
304,
16700,
1684,
369,
52412,
292,
3691,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
16966,
467,
1684,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
277,
69391,
1,
3651,
259,
16,
49759,
220,
871,
220,
220,
17,
13,
20,
37094,
5525,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
16966,
467,
1684,
1,
3651,
259,
16,
58319,
1857,
220,
284,
220,
330,
277,
69391,
1,
3651,
259,
16,
49759,
220,
871,
220,
220,
17,
13,
20,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
### Question
give me a good restaurant in mountain view for arabic food ?
|
[query_database(**{'query': 'SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "mountain view" AND t1.food_type = "arabic" AND t1.rating > 2.5;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
|
1,648 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
38,
6903,
41084,
1341,
1,
2456,
47416,
3414,
4813,
1,
1495,
345,
1,
39243,
56,
1,
1495,
345,
1,
78531,
1,
1495,
345,
6682,
1401,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
46139,
10592,
220,
16,
26,
4815,
47652,
4813,
1393,
39243,
56,
1393,
78531,
33006,
6343,
23421,
14700,
330,
39407,
32,
1539,
2891,
1,
2456,
1,
926,
1,
528,
345,
1,
7687,
1,
1495,
345,
1,
3873,
2114,
4283,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
1,
49,
34657,
1,
1972,
345,
6682,
1401,
446,
926,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10960,
10592,
220,
16,
26,
4815,
3110,
1393,
7687,
1393,
3873,
2114,
4283,
1393,
34,
3414,
4813,
1393,
49,
34657,
33006,
6343,
23421,
14700,
330,
35324,
1,
2456,
1,
39407,
32,
1539,
2891,
3533,
1,
528,
345,
1,
97494,
19925,
1,
528,
345,
1,
790,
57021,
4813,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
6682,
1401,
446,
39407,
32,
1539,
2891,
3533,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
29543,
1401,
3573,
39407,
32,
1539,
2891,
3533,
909,
15407,
1595,
39407,
32,
1539,
2891,
63,
446,
39407,
32,
1539,
2891,
3533,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3813,
10592,
220,
16,
26,
4815,
26487,
32,
1539,
2891,
3533,
1393,
97494,
19925,
1393,
790,
57021,
4813,
1393,
34,
3414,
4813,
33006,
6343,
14711,
16225,
198,
2940,
649,
602,
1505,
264,
503,
78818,
36105,
304,
8528,
44579,
9652,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
34182,
44579,
9652,
1,
3651,
259,
16,
2710,
220,
284,
220,
330,
73,
78818,
36105,
5233,
66360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-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
10960,
5871,
259,
16,
13369,
66683,
5871,
259,
17,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
17,
27473,
1292,
220,
284,
220,
330,
34182,
44579,
9652,
1,
3651,
259,
16,
2710,
220,
284,
220,
330,
73,
78818,
36105,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
### Question
where can i find a jamerican cuisine in san francisco ?
|
[query_database(**{'query': 'SELECT t2.house_number , t1.name FROM restaurant AS t1 JOIN LOCATION AS t2 ON t1.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND t1.name = "jamerican cuisine";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
|
1,652 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
38,
6903,
41084,
1341,
1,
2456,
47416,
3414,
4813,
1,
1495,
345,
1,
39243,
56,
1,
1495,
345,
1,
78531,
1,
1495,
345,
6682,
1401,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
46139,
10592,
220,
16,
26,
4815,
47652,
4813,
1393,
39243,
56,
1393,
78531,
33006,
6343,
23421,
14700,
330,
39407,
32,
1539,
2891,
1,
2456,
1,
926,
1,
528,
345,
1,
7687,
1,
1495,
345,
1,
3873,
2114,
4283,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
1,
49,
34657,
1,
1972,
345,
6682,
1401,
446,
926,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10960,
10592,
220,
16,
26,
4815,
3110,
1393,
7687,
1393,
3873,
2114,
4283,
1393,
34,
3414,
4813,
1393,
49,
34657,
33006,
6343,
23421,
14700,
330,
35324,
1,
2456,
1,
39407,
32,
1539,
2891,
3533,
1,
528,
345,
1,
97494,
19925,
1,
528,
345,
1,
790,
57021,
4813,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
6682,
1401,
446,
39407,
32,
1539,
2891,
3533,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
29543,
1401,
3573,
39407,
32,
1539,
2891,
3533,
909,
15407,
1595,
39407,
32,
1539,
2891,
63,
446,
39407,
32,
1539,
2891,
3533,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3813,
10592,
220,
16,
26,
4815,
26487,
32,
1539,
2891,
3533,
1393,
97494,
19925,
1393,
790,
57021,
4813,
1393,
34,
3414,
4813,
33006,
6343,
14711,
16225,
198,
47530,
757,
1063,
15926,
304,
279,
23542,
3158,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
66683,
5871,
259,
17,
13369,
10960,
5871,
259,
16,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
16,
27473,
1292,
2006,
320,
19638,
3363,
1292,
4393,
46139,
5401,
5654,
220,
284,
220,
330,
47364,
3158,
1,
7048,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
66683,
5871,
259,
17,
13369,
10960,
5871,
259,
16,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
5401,
259,
16,
27473,
1292,
2006,
320,
19638,
3363,
1292,
4393,
46139,
5401,
5654,
220,
284,
220,
330,
47364,
3158,
1,
7048,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
### Question
give me some restaurants in the bay area ?
|
[query_database(**{'query': 'SELECT t2.house_number , t1.name FROM LOCATION AS t2 JOIN restaurant AS t1 ON t1.id = t2.restaurant_id WHERE t1.city_name IN ( SELECT city_name FROM geographic WHERE region = "bay area" );'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
|
1,657 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
330,
38,
6903,
41084,
1341,
1,
2456,
47416,
3414,
4813,
1,
1495,
345,
1,
39243,
56,
1,
1495,
345,
1,
78531,
1,
1495,
345,
6682,
1401,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
46139,
10592,
220,
16,
26,
4815,
47652,
4813,
1393,
39243,
56,
1393,
78531,
33006,
6343,
23421,
14700,
330,
39407,
32,
1539,
2891,
1,
2456,
1,
926,
1,
528,
345,
1,
7687,
1,
1495,
345,
1,
3873,
2114,
4283,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
1,
49,
34657,
1,
1972,
345,
6682,
1401,
446,
926,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
10960,
10592,
220,
16,
26,
4815,
3110,
1393,
7687,
1393,
3873,
2114,
4283,
1393,
34,
3414,
4813,
1393,
49,
34657,
33006,
6343,
23421,
14700,
330,
35324,
1,
2456,
1,
39407,
32,
1539,
2891,
3533,
1,
528,
345,
1,
97494,
19925,
1,
528,
345,
1,
790,
57021,
4813,
1,
1495,
345,
47416,
3414,
4813,
1,
1495,
345,
6682,
1401,
446,
39407,
32,
1539,
2891,
3533,
4561,
29543,
1401,
3573,
34,
3414,
4813,
909,
15407,
1595,
38,
6903,
41084,
1341,
63,
446,
34,
3414,
4813,
1158,
29543,
1401,
3573,
39407,
32,
1539,
2891,
3533,
909,
15407,
1595,
39407,
32,
1539,
2891,
63,
446,
39407,
32,
1539,
2891,
3533,
1158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3813,
10592,
220,
16,
26,
4815,
26487,
32,
1539,
2891,
3533,
1393,
97494,
19925,
1393,
790,
57021,
4813,
1393,
34,
3414,
4813,
33006,
6343,
14711,
16225,
198,
47530,
757,
1063,
1695,
15926,
304,
279,
23542,
3158,
949,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
66683,
5871,
259,
17,
13369,
10960,
5871,
259,
16,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
220,
5401,
259,
16,
27473,
1292,
2006,
320,
19638,
3363,
1292,
4393,
46139,
5401,
5654,
220,
284,
220,
330,
4030,
15,
1,
883,
3651,
259,
16,
49759,
220,
871,
220,
220,
17,
13,
20,
37094,
5525,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
259,
17,
84479,
5617,
220,
1174,
220,
259,
16,
2710,
4393,
66683,
5871,
259,
17,
13369,
10960,
5871,
259,
16,
6328,
259,
16,
1801,
220,
284,
220,
259,
17,
88149,
851,
220,
5401,
259,
16,
27473,
1292,
2006,
320,
19638,
3363,
1292,
4393,
46139,
5401,
5654,
220,
284,
220,
330,
4030,
15,
1,
883,
3651,
259,
16,
49759,
220,
871,
220,
220,
17,
13,
20,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
### Question
give me some good restaurants in the bay area ?
|
[query_database(**{'query': 'SELECT t2.house_number , t1.name FROM LOCATION AS t2 JOIN restaurant AS t1 ON t1.id = t2.restaurant_id WHERE t1.city_name IN ( SELECT city_name FROM geographic WHERE region = "region0" ) AND t1.rating > 2.5;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
1 example row:
SELECT * FROM geographic LIMIT 1;
CITY_NAME ||COUNTY ||REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
1 example row:
SELECT * FROM restaurant LIMIT 1;
ID ||NAME ||FOOD_TYPE ||CITY_NAME ||RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
1 example row:
SELECT * FROM location LIMIT 1;
RESTAURANT_ID ||HOUSE_NUMBER ||STREET_NAME ||CITY_NAME
*/
|
1 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
1595,
2513,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
66163,
63,
1495,
198,
11,
220,
1595,
70918,
63,
2033,
12221,
1808,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1614,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
45541,
1393,
4903,
1393,
11389,
1292,
1393,
66163,
1393,
70918,
33006,
6343,
23421,
14700,
1595,
9103,
63,
2456,
220,
1595,
9103,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9103,
1292,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3363,
10592,
220,
16,
26,
4815,
3363,
1292,
1393,
45541,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
9649,
3186,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
9649,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9649,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
9649,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3973,
3186,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
9649,
33006,
6343,
23421,
14700,
1595,
12156,
10516,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
75254,
2253,
44857,
63,
1495,
198,
11,
220,
1595,
90998,
6213,
63,
1495,
198,
11,
220,
1595,
75254,
6213,
63,
1495,
198,
11,
220,
1595,
90998,
2253,
44857,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1579,
10516,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
75254,
2253,
44857,
1393,
90998,
6213,
1393,
75254,
6213,
1393,
90998,
2253,
44857,
33006,
6343,
23421,
14700,
1595,
63210,
63,
2456,
220,
1595,
63210,
1292,
63,
1495,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
22553,
10592,
220,
16,
26,
4815,
22553,
1292,
1393,
4903,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
16966,
467,
63,
2456,
220,
1595,
16966,
467,
1292,
63,
1495,
198,
11,
220,
1595,
16966,
467,
33205,
3993,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
16966,
467,
1292,
7964,
1595,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16700,
10592,
220,
16,
26,
4815,
16700,
1292,
1393,
16966,
467,
33205,
3993,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
5586,
63,
2456,
220,
1595,
5586,
1292,
63,
1495,
198,
11,
220,
1595,
4222,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
376,
23247,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
5586,
1292,
25158,
11,
220,
82456,
12282,
5931,
376,
23247,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15140,
10592,
220,
16,
26,
4815,
15140,
1292,
1393,
4222,
1393,
11389,
1292,
1393,
376,
23247,
33006,
6343,
14711,
16225,
198,
12840,
16999,
18238,
3363,
706,
279,
7928,
7187,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
3363,
1292,
4393,
3363,
5401,
7187,
220,
284,
220,
320,
19638,
8498,
320,
7187,
883,
4393,
3363,
5401,
1614,
1292,
220,
284,
220,
330,
23361,
18238,
1,
883,
3651,
1614,
1292,
220,
284,
220,
330,
23361,
18238,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
3363,
1292,
4393,
3363,
5401,
7187,
220,
284,
220,
320,
19638,
8498,
320,
7187,
883,
4393,
3363,
5401,
1614,
1292,
220,
284,
220,
330,
23361,
18238,
1,
883,
3651,
1614,
1292,
220,
284,
220,
330,
23361,
18238,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
### Question
what wyoming city has the largest population
|
[query_database(**{'query': 'SELECT city_name FROM city WHERE population = ( SELECT MAX ( population ) FROM city WHERE state_name = "wyoming" ) AND state_name = "wyoming";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
|
5 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
1595,
2513,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
66163,
63,
1495,
198,
11,
220,
1595,
70918,
63,
2033,
12221,
1808,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1614,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
45541,
1393,
4903,
1393,
11389,
1292,
1393,
66163,
1393,
70918,
33006,
6343,
23421,
14700,
1595,
9103,
63,
2456,
220,
1595,
9103,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9103,
1292,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3363,
10592,
220,
16,
26,
4815,
3363,
1292,
1393,
45541,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
9649,
3186,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
9649,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9649,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
9649,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3973,
3186,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
9649,
33006,
6343,
23421,
14700,
1595,
12156,
10516,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
75254,
2253,
44857,
63,
1495,
198,
11,
220,
1595,
90998,
6213,
63,
1495,
198,
11,
220,
1595,
75254,
6213,
63,
1495,
198,
11,
220,
1595,
90998,
2253,
44857,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1579,
10516,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
75254,
2253,
44857,
1393,
90998,
6213,
1393,
75254,
6213,
1393,
90998,
2253,
44857,
33006,
6343,
23421,
14700,
1595,
63210,
63,
2456,
220,
1595,
63210,
1292,
63,
1495,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
22553,
10592,
220,
16,
26,
4815,
22553,
1292,
1393,
4903,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
16966,
467,
63,
2456,
220,
1595,
16966,
467,
1292,
63,
1495,
198,
11,
220,
1595,
16966,
467,
33205,
3993,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
16966,
467,
1292,
7964,
1595,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16700,
10592,
220,
16,
26,
4815,
16700,
1292,
1393,
16966,
467,
33205,
3993,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
5586,
63,
2456,
220,
1595,
5586,
1292,
63,
1495,
198,
11,
220,
1595,
4222,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
376,
23247,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
5586,
1292,
25158,
11,
220,
82456,
12282,
5931,
376,
23247,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15140,
10592,
220,
16,
26,
4815,
15140,
1292,
1393,
4222,
1393,
11389,
1292,
1393,
376,
23247,
33006,
6343,
14711,
16225,
198,
12840,
9919,
304,
16999,
18238,
617,
279,
8592,
1396,
315,
10495,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
3363,
1292,
4393,
3363,
5401,
7187,
220,
284,
220,
320,
19638,
8498,
320,
7187,
883,
4393,
3363,
5401,
1614,
1292,
220,
284,
220,
330,
23361,
18238,
1,
883,
3651,
1614,
1292,
220,
284,
220,
330,
23361,
18238,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
3363,
1292,
4393,
3363,
5401,
7187,
220,
284,
220,
320,
19638,
8498,
320,
7187,
883,
4393,
3363,
5401,
1614,
1292,
220,
284,
220,
330,
23361,
18238,
1,
883,
3651,
1614,
1292,
220,
284,
220,
330,
23361,
18238,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
### Question
what cities in wyoming have the highest number of citizens
|
[query_database(**{'query': 'SELECT city_name FROM city WHERE population = ( SELECT MAX ( population ) FROM city WHERE state_name = "wyoming" ) AND state_name = "wyoming";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
|
8 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
1595,
2513,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
66163,
63,
1495,
198,
11,
220,
1595,
70918,
63,
2033,
12221,
1808,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1614,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
45541,
1393,
4903,
1393,
11389,
1292,
1393,
66163,
1393,
70918,
33006,
6343,
23421,
14700,
1595,
9103,
63,
2456,
220,
1595,
9103,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9103,
1292,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3363,
10592,
220,
16,
26,
4815,
3363,
1292,
1393,
45541,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
9649,
3186,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
9649,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9649,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
9649,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3973,
3186,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
9649,
33006,
6343,
23421,
14700,
1595,
12156,
10516,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
75254,
2253,
44857,
63,
1495,
198,
11,
220,
1595,
90998,
6213,
63,
1495,
198,
11,
220,
1595,
75254,
6213,
63,
1495,
198,
11,
220,
1595,
90998,
2253,
44857,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1579,
10516,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
75254,
2253,
44857,
1393,
90998,
6213,
1393,
75254,
6213,
1393,
90998,
2253,
44857,
33006,
6343,
23421,
14700,
1595,
63210,
63,
2456,
220,
1595,
63210,
1292,
63,
1495,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
22553,
10592,
220,
16,
26,
4815,
22553,
1292,
1393,
4903,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
16966,
467,
63,
2456,
220,
1595,
16966,
467,
1292,
63,
1495,
198,
11,
220,
1595,
16966,
467,
33205,
3993,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
16966,
467,
1292,
7964,
1595,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16700,
10592,
220,
16,
26,
4815,
16700,
1292,
1393,
16966,
467,
33205,
3993,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
5586,
63,
2456,
220,
1595,
5586,
1292,
63,
1495,
198,
11,
220,
1595,
4222,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
376,
23247,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
5586,
1292,
25158,
11,
220,
82456,
12282,
5931,
376,
23247,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15140,
10592,
220,
16,
26,
4815,
15140,
1292,
1393,
4222,
1393,
11389,
1292,
1393,
376,
23247,
33006,
6343,
14711,
16225,
198,
12840,
374,
279,
7928,
3363,
304,
16999,
18238,
555,
7187,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
3363,
1292,
4393,
3363,
5401,
7187,
220,
284,
220,
320,
19638,
8498,
320,
7187,
883,
4393,
3363,
5401,
1614,
1292,
220,
284,
220,
330,
23361,
18238,
1,
883,
3651,
1614,
1292,
220,
284,
220,
330,
23361,
18238,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
3363,
1292,
4393,
3363,
5401,
7187,
220,
284,
220,
320,
19638,
8498,
320,
7187,
883,
4393,
3363,
5401,
1614,
1292,
220,
284,
220,
330,
23361,
18238,
1,
883,
3651,
1614,
1292,
220,
284,
220,
330,
23361,
18238,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
### Question
what is the largest city in wyoming by population
|
[query_database(**{'query': 'SELECT city_name FROM city WHERE population = ( SELECT MAX ( population ) FROM city WHERE state_name = "wyoming" ) AND state_name = "wyoming";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
|
12 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
1595,
2513,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
66163,
63,
1495,
198,
11,
220,
1595,
70918,
63,
2033,
12221,
1808,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1614,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
45541,
1393,
4903,
1393,
11389,
1292,
1393,
66163,
1393,
70918,
33006,
6343,
23421,
14700,
1595,
9103,
63,
2456,
220,
1595,
9103,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9103,
1292,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3363,
10592,
220,
16,
26,
4815,
3363,
1292,
1393,
45541,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
9649,
3186,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
9649,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9649,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
9649,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3973,
3186,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
9649,
33006,
6343,
23421,
14700,
1595,
12156,
10516,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
75254,
2253,
44857,
63,
1495,
198,
11,
220,
1595,
90998,
6213,
63,
1495,
198,
11,
220,
1595,
75254,
6213,
63,
1495,
198,
11,
220,
1595,
90998,
2253,
44857,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1579,
10516,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
75254,
2253,
44857,
1393,
90998,
6213,
1393,
75254,
6213,
1393,
90998,
2253,
44857,
33006,
6343,
23421,
14700,
1595,
63210,
63,
2456,
220,
1595,
63210,
1292,
63,
1495,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
22553,
10592,
220,
16,
26,
4815,
22553,
1292,
1393,
4903,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
16966,
467,
63,
2456,
220,
1595,
16966,
467,
1292,
63,
1495,
198,
11,
220,
1595,
16966,
467,
33205,
3993,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
16966,
467,
1292,
7964,
1595,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16700,
10592,
220,
16,
26,
4815,
16700,
1292,
1393,
16966,
467,
33205,
3993,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
5586,
63,
2456,
220,
1595,
5586,
1292,
63,
1495,
198,
11,
220,
1595,
4222,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
376,
23247,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
5586,
1292,
25158,
11,
220,
82456,
12282,
5931,
376,
23247,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15140,
10592,
220,
16,
26,
4815,
15140,
1292,
1393,
4222,
1393,
11389,
1292,
1393,
376,
23247,
33006,
6343,
14711,
16225,
198,
5269,
2466,
374,
502,
77476,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
3158,
4393,
1614,
5401,
1614,
1292,
220,
284,
220,
330,
943,
77476,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
3158,
4393,
1614,
5401,
1614,
1292,
220,
284,
220,
330,
943,
77476,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
### Question
how big is new mexico
|
[query_database(**{'query': 'SELECT area FROM state WHERE state_name = "new mexico";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
|
17 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
1595,
2513,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
66163,
63,
1495,
198,
11,
220,
1595,
70918,
63,
2033,
12221,
1808,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1614,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
45541,
1393,
4903,
1393,
11389,
1292,
1393,
66163,
1393,
70918,
33006,
6343,
23421,
14700,
1595,
9103,
63,
2456,
220,
1595,
9103,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9103,
1292,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3363,
10592,
220,
16,
26,
4815,
3363,
1292,
1393,
45541,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
9649,
3186,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
9649,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9649,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
9649,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3973,
3186,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
9649,
33006,
6343,
23421,
14700,
1595,
12156,
10516,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
75254,
2253,
44857,
63,
1495,
198,
11,
220,
1595,
90998,
6213,
63,
1495,
198,
11,
220,
1595,
75254,
6213,
63,
1495,
198,
11,
220,
1595,
90998,
2253,
44857,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1579,
10516,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
75254,
2253,
44857,
1393,
90998,
6213,
1393,
75254,
6213,
1393,
90998,
2253,
44857,
33006,
6343,
23421,
14700,
1595,
63210,
63,
2456,
220,
1595,
63210,
1292,
63,
1495,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
22553,
10592,
220,
16,
26,
4815,
22553,
1292,
1393,
4903,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
16966,
467,
63,
2456,
220,
1595,
16966,
467,
1292,
63,
1495,
198,
11,
220,
1595,
16966,
467,
33205,
3993,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
16966,
467,
1292,
7964,
1595,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16700,
10592,
220,
16,
26,
4815,
16700,
1292,
1393,
16966,
467,
33205,
3993,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
5586,
63,
2456,
220,
1595,
5586,
1292,
63,
1495,
198,
11,
220,
1595,
4222,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
376,
23247,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
5586,
1292,
25158,
11,
220,
82456,
12282,
5931,
376,
23247,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15140,
10592,
220,
16,
26,
4815,
15140,
1292,
1393,
4222,
1393,
11389,
1292,
1393,
376,
23247,
33006,
6343,
14711,
16225,
198,
12840,
374,
279,
3158,
315,
502,
77476,
304,
9518,
41668,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
3158,
4393,
1614,
5401,
1614,
1292,
220,
284,
220,
330,
943,
77476,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
3158,
4393,
1614,
5401,
1614,
1292,
220,
284,
220,
330,
943,
77476,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
### Question
what is the area of new mexico in square kilometers
|
[query_database(**{'query': 'SELECT area FROM state WHERE state_name = "new mexico";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
|
20 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
1595,
2513,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
66163,
63,
1495,
198,
11,
220,
1595,
70918,
63,
2033,
12221,
1808,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1614,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
45541,
1393,
4903,
1393,
11389,
1292,
1393,
66163,
1393,
70918,
33006,
6343,
23421,
14700,
1595,
9103,
63,
2456,
220,
1595,
9103,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9103,
1292,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3363,
10592,
220,
16,
26,
4815,
3363,
1292,
1393,
45541,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
9649,
3186,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
9649,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9649,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
9649,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3973,
3186,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
9649,
33006,
6343,
23421,
14700,
1595,
12156,
10516,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
75254,
2253,
44857,
63,
1495,
198,
11,
220,
1595,
90998,
6213,
63,
1495,
198,
11,
220,
1595,
75254,
6213,
63,
1495,
198,
11,
220,
1595,
90998,
2253,
44857,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1579,
10516,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
75254,
2253,
44857,
1393,
90998,
6213,
1393,
75254,
6213,
1393,
90998,
2253,
44857,
33006,
6343,
23421,
14700,
1595,
63210,
63,
2456,
220,
1595,
63210,
1292,
63,
1495,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
22553,
10592,
220,
16,
26,
4815,
22553,
1292,
1393,
4903,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
16966,
467,
63,
2456,
220,
1595,
16966,
467,
1292,
63,
1495,
198,
11,
220,
1595,
16966,
467,
33205,
3993,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
16966,
467,
1292,
7964,
1595,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16700,
10592,
220,
16,
26,
4815,
16700,
1292,
1393,
16966,
467,
33205,
3993,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
5586,
63,
2456,
220,
1595,
5586,
1292,
63,
1495,
198,
11,
220,
1595,
4222,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
376,
23247,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
5586,
1292,
25158,
11,
220,
82456,
12282,
5931,
376,
23247,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15140,
10592,
220,
16,
26,
4815,
15140,
1292,
1393,
4222,
1393,
11389,
1292,
1393,
376,
23247,
33006,
6343,
14711,
16225,
198,
5269,
1690,
11062,
3974,
304,
79957,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
7187,
4393,
1614,
5401,
1614,
1292,
220,
284,
220,
330,
5531,
6711,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
7187,
4393,
1614,
5401,
1614,
1292,
220,
284,
220,
330,
5531,
6711,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
### Question
how many residents live in california
|
[query_database(**{'query': 'SELECT population FROM state WHERE state_name = "california";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
|
24 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
1595,
2513,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
66163,
63,
1495,
198,
11,
220,
1595,
70918,
63,
2033,
12221,
1808,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1614,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
45541,
1393,
4903,
1393,
11389,
1292,
1393,
66163,
1393,
70918,
33006,
6343,
23421,
14700,
1595,
9103,
63,
2456,
220,
1595,
9103,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9103,
1292,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3363,
10592,
220,
16,
26,
4815,
3363,
1292,
1393,
45541,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
9649,
3186,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
9649,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9649,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
9649,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3973,
3186,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
9649,
33006,
6343,
23421,
14700,
1595,
12156,
10516,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
75254,
2253,
44857,
63,
1495,
198,
11,
220,
1595,
90998,
6213,
63,
1495,
198,
11,
220,
1595,
75254,
6213,
63,
1495,
198,
11,
220,
1595,
90998,
2253,
44857,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1579,
10516,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
75254,
2253,
44857,
1393,
90998,
6213,
1393,
75254,
6213,
1393,
90998,
2253,
44857,
33006,
6343,
23421,
14700,
1595,
63210,
63,
2456,
220,
1595,
63210,
1292,
63,
1495,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
22553,
10592,
220,
16,
26,
4815,
22553,
1292,
1393,
4903,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
16966,
467,
63,
2456,
220,
1595,
16966,
467,
1292,
63,
1495,
198,
11,
220,
1595,
16966,
467,
33205,
3993,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
16966,
467,
1292,
7964,
1595,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16700,
10592,
220,
16,
26,
4815,
16700,
1292,
1393,
16966,
467,
33205,
3993,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
5586,
63,
2456,
220,
1595,
5586,
1292,
63,
1495,
198,
11,
220,
1595,
4222,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
376,
23247,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
5586,
1292,
25158,
11,
220,
82456,
12282,
5931,
376,
23247,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15140,
10592,
220,
16,
26,
4815,
15140,
1292,
1393,
4222,
1393,
11389,
1292,
1393,
376,
23247,
33006,
6343,
14711,
16225,
198,
5269,
1690,
1274,
527,
304,
279,
1614,
315,
79957,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
7187,
4393,
1614,
5401,
1614,
1292,
220,
284,
220,
330,
5531,
6711,
5233,
66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100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
7187,
4393,
1614,
5401,
1614,
1292,
220,
284,
220,
330,
5531,
6711,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
### Question
how many people are in the state of california
|
[query_database(**{'query': 'SELECT population FROM state WHERE state_name = "california";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
|
28 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
1595,
2513,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
66163,
63,
1495,
198,
11,
220,
1595,
70918,
63,
2033,
12221,
1808,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1614,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
45541,
1393,
4903,
1393,
11389,
1292,
1393,
66163,
1393,
70918,
33006,
6343,
23421,
14700,
1595,
9103,
63,
2456,
220,
1595,
9103,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9103,
1292,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3363,
10592,
220,
16,
26,
4815,
3363,
1292,
1393,
45541,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
9649,
3186,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
9649,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9649,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
9649,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3973,
3186,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
9649,
33006,
6343,
23421,
14700,
1595,
12156,
10516,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
75254,
2253,
44857,
63,
1495,
198,
11,
220,
1595,
90998,
6213,
63,
1495,
198,
11,
220,
1595,
75254,
6213,
63,
1495,
198,
11,
220,
1595,
90998,
2253,
44857,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1579,
10516,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
75254,
2253,
44857,
1393,
90998,
6213,
1393,
75254,
6213,
1393,
90998,
2253,
44857,
33006,
6343,
23421,
14700,
1595,
63210,
63,
2456,
220,
1595,
63210,
1292,
63,
1495,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
22553,
10592,
220,
16,
26,
4815,
22553,
1292,
1393,
4903,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
16966,
467,
63,
2456,
220,
1595,
16966,
467,
1292,
63,
1495,
198,
11,
220,
1595,
16966,
467,
33205,
3993,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
16966,
467,
1292,
7964,
1595,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16700,
10592,
220,
16,
26,
4815,
16700,
1292,
1393,
16966,
467,
33205,
3993,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
5586,
63,
2456,
220,
1595,
5586,
1292,
63,
1495,
198,
11,
220,
1595,
4222,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
376,
23247,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
5586,
1292,
25158,
11,
220,
82456,
12282,
5931,
376,
23247,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15140,
10592,
220,
16,
26,
4815,
15140,
1292,
1393,
4222,
1393,
11389,
1292,
1393,
376,
23247,
33006,
6343,
14711,
16225,
198,
5269,
1690,
1274,
4822,
304,
79957,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
7187,
4393,
1614,
5401,
1614,
1292,
220,
284,
220,
330,
5531,
6711,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
7187,
4393,
1614,
5401,
1614,
1292,
220,
284,
220,
330,
5531,
6711,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
### Question
how many people stay in california
|
[query_database(**{'query': 'SELECT population FROM state WHERE state_name = "california";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
|
32 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
1595,
2513,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
66163,
63,
1495,
198,
11,
220,
1595,
70918,
63,
2033,
12221,
1808,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1614,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
45541,
1393,
4903,
1393,
11389,
1292,
1393,
66163,
1393,
70918,
33006,
6343,
23421,
14700,
1595,
9103,
63,
2456,
220,
1595,
9103,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9103,
1292,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3363,
10592,
220,
16,
26,
4815,
3363,
1292,
1393,
45541,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
9649,
3186,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
9649,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9649,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
9649,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3973,
3186,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
9649,
33006,
6343,
23421,
14700,
1595,
12156,
10516,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
75254,
2253,
44857,
63,
1495,
198,
11,
220,
1595,
90998,
6213,
63,
1495,
198,
11,
220,
1595,
75254,
6213,
63,
1495,
198,
11,
220,
1595,
90998,
2253,
44857,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1579,
10516,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
75254,
2253,
44857,
1393,
90998,
6213,
1393,
75254,
6213,
1393,
90998,
2253,
44857,
33006,
6343,
23421,
14700,
1595,
63210,
63,
2456,
220,
1595,
63210,
1292,
63,
1495,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
22553,
10592,
220,
16,
26,
4815,
22553,
1292,
1393,
4903,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
16966,
467,
63,
2456,
220,
1595,
16966,
467,
1292,
63,
1495,
198,
11,
220,
1595,
16966,
467,
33205,
3993,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
16966,
467,
1292,
7964,
1595,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16700,
10592,
220,
16,
26,
4815,
16700,
1292,
1393,
16966,
467,
33205,
3993,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
5586,
63,
2456,
220,
1595,
5586,
1292,
63,
1495,
198,
11,
220,
1595,
4222,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
376,
23247,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
5586,
1292,
25158,
11,
220,
82456,
12282,
5931,
376,
23247,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15140,
10592,
220,
16,
26,
4815,
15140,
1292,
1393,
4222,
1393,
11389,
1292,
1393,
376,
23247,
33006,
6343,
14711,
16225,
198,
12840,
374,
279,
1614,
449,
279,
15821,
7187,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
1614,
1292,
4393,
1614,
5401,
7187,
220,
284,
220,
320,
19638,
17116,
320,
7187,
883,
4393,
1614,
7048,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
1614,
1292,
4393,
1614,
5401,
7187,
220,
284,
220,
320,
19638,
17116,
320,
7187,
883,
4393,
1614,
7048,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
### Question
what is the state with the lowest population
|
[query_database(**{'query': 'SELECT state_name FROM state WHERE population = ( SELECT MIN ( population ) FROM state );'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
|
36 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
1595,
2513,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
66163,
63,
1495,
198,
11,
220,
1595,
70918,
63,
2033,
12221,
1808,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1614,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
45541,
1393,
4903,
1393,
11389,
1292,
1393,
66163,
1393,
70918,
33006,
6343,
23421,
14700,
1595,
9103,
63,
2456,
220,
1595,
9103,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9103,
1292,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3363,
10592,
220,
16,
26,
4815,
3363,
1292,
1393,
45541,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
9649,
3186,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
9649,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9649,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
9649,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3973,
3186,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
9649,
33006,
6343,
23421,
14700,
1595,
12156,
10516,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
75254,
2253,
44857,
63,
1495,
198,
11,
220,
1595,
90998,
6213,
63,
1495,
198,
11,
220,
1595,
75254,
6213,
63,
1495,
198,
11,
220,
1595,
90998,
2253,
44857,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1579,
10516,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
75254,
2253,
44857,
1393,
90998,
6213,
1393,
75254,
6213,
1393,
90998,
2253,
44857,
33006,
6343,
23421,
14700,
1595,
63210,
63,
2456,
220,
1595,
63210,
1292,
63,
1495,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
22553,
10592,
220,
16,
26,
4815,
22553,
1292,
1393,
4903,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
16966,
467,
63,
2456,
220,
1595,
16966,
467,
1292,
63,
1495,
198,
11,
220,
1595,
16966,
467,
33205,
3993,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
16966,
467,
1292,
7964,
1595,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16700,
10592,
220,
16,
26,
4815,
16700,
1292,
1393,
16966,
467,
33205,
3993,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
5586,
63,
2456,
220,
1595,
5586,
1292,
63,
1495,
198,
11,
220,
1595,
4222,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
376,
23247,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
5586,
1292,
25158,
11,
220,
82456,
12282,
5931,
376,
23247,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15140,
10592,
220,
16,
26,
4815,
15140,
1292,
1393,
4222,
1393,
11389,
1292,
1393,
376,
23247,
33006,
6343,
14711,
16225,
198,
12840,
527,
279,
9919,
304,
60348,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
3363,
1292,
4393,
3363,
5401,
1614,
1292,
220,
284,
220,
330,
83,
7619,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
3363,
1292,
4393,
3363,
5401,
1614,
1292,
220,
284,
220,
330,
83,
7619,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
### Question
what are the cities in texas
|
[query_database(**{'query': 'SELECT city_name FROM city WHERE state_name = "texas";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
|
40 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
1595,
2513,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
66163,
63,
1495,
198,
11,
220,
1595,
70918,
63,
2033,
12221,
1808,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1614,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
45541,
1393,
4903,
1393,
11389,
1292,
1393,
66163,
1393,
70918,
33006,
6343,
23421,
14700,
1595,
9103,
63,
2456,
220,
1595,
9103,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9103,
1292,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3363,
10592,
220,
16,
26,
4815,
3363,
1292,
1393,
45541,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
9649,
3186,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
9649,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9649,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
9649,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3973,
3186,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
9649,
33006,
6343,
23421,
14700,
1595,
12156,
10516,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
75254,
2253,
44857,
63,
1495,
198,
11,
220,
1595,
90998,
6213,
63,
1495,
198,
11,
220,
1595,
75254,
6213,
63,
1495,
198,
11,
220,
1595,
90998,
2253,
44857,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1579,
10516,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
75254,
2253,
44857,
1393,
90998,
6213,
1393,
75254,
6213,
1393,
90998,
2253,
44857,
33006,
6343,
23421,
14700,
1595,
63210,
63,
2456,
220,
1595,
63210,
1292,
63,
1495,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
22553,
10592,
220,
16,
26,
4815,
22553,
1292,
1393,
4903,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
16966,
467,
63,
2456,
220,
1595,
16966,
467,
1292,
63,
1495,
198,
11,
220,
1595,
16966,
467,
33205,
3993,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
16966,
467,
1292,
7964,
1595,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16700,
10592,
220,
16,
26,
4815,
16700,
1292,
1393,
16966,
467,
33205,
3993,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
5586,
63,
2456,
220,
1595,
5586,
1292,
63,
1495,
198,
11,
220,
1595,
4222,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
376,
23247,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
5586,
1292,
25158,
11,
220,
82456,
12282,
5931,
376,
23247,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15140,
10592,
220,
16,
26,
4815,
15140,
1292,
1393,
4222,
1393,
11389,
1292,
1393,
376,
23247,
33006,
6343,
14711,
16225,
198,
47530,
757,
279,
44236,
304,
79957,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
22553,
1292,
4393,
22553,
5401,
1614,
1292,
220,
284,
220,
330,
5531,
6711,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
22553,
1292,
4393,
22553,
5401,
1614,
1292,
220,
284,
220,
330,
5531,
6711,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
### Question
give me the lakes in california
|
[query_database(**{'query': 'SELECT lake_name FROM lake WHERE state_name = "california";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
|
44 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
1595,
2513,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
66163,
63,
1495,
198,
11,
220,
1595,
70918,
63,
2033,
12221,
1808,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1614,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
45541,
1393,
4903,
1393,
11389,
1292,
1393,
66163,
1393,
70918,
33006,
6343,
23421,
14700,
1595,
9103,
63,
2456,
220,
1595,
9103,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9103,
1292,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3363,
10592,
220,
16,
26,
4815,
3363,
1292,
1393,
45541,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
9649,
3186,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
9649,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9649,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
9649,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3973,
3186,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
9649,
33006,
6343,
23421,
14700,
1595,
12156,
10516,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
75254,
2253,
44857,
63,
1495,
198,
11,
220,
1595,
90998,
6213,
63,
1495,
198,
11,
220,
1595,
75254,
6213,
63,
1495,
198,
11,
220,
1595,
90998,
2253,
44857,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1579,
10516,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
75254,
2253,
44857,
1393,
90998,
6213,
1393,
75254,
6213,
1393,
90998,
2253,
44857,
33006,
6343,
23421,
14700,
1595,
63210,
63,
2456,
220,
1595,
63210,
1292,
63,
1495,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
22553,
10592,
220,
16,
26,
4815,
22553,
1292,
1393,
4903,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
16966,
467,
63,
2456,
220,
1595,
16966,
467,
1292,
63,
1495,
198,
11,
220,
1595,
16966,
467,
33205,
3993,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
16966,
467,
1292,
7964,
1595,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16700,
10592,
220,
16,
26,
4815,
16700,
1292,
1393,
16966,
467,
33205,
3993,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
5586,
63,
2456,
220,
1595,
5586,
1292,
63,
1495,
198,
11,
220,
1595,
4222,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
376,
23247,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
5586,
1292,
25158,
11,
220,
82456,
12282,
5931,
376,
23247,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15140,
10592,
220,
16,
26,
4815,
15140,
1292,
1393,
4222,
1393,
11389,
1292,
1393,
376,
23247,
33006,
6343,
14711,
16225,
198,
47530,
757,
682,
279,
5415,
315,
34815,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
1614,
1292,
4393,
1614,
37094,
5525,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
1614,
1292,
4393,
1614,
37094,
5525,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
### Question
give me all the states of usa
|
[query_database(**{'query': 'SELECT state_name FROM state;'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
|
48 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
1595,
2513,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
66163,
63,
1495,
198,
11,
220,
1595,
70918,
63,
2033,
12221,
1808,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1614,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
45541,
1393,
4903,
1393,
11389,
1292,
1393,
66163,
1393,
70918,
33006,
6343,
23421,
14700,
1595,
9103,
63,
2456,
220,
1595,
9103,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9103,
1292,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3363,
10592,
220,
16,
26,
4815,
3363,
1292,
1393,
45541,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
9649,
3186,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
9649,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9649,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
9649,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3973,
3186,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
9649,
33006,
6343,
23421,
14700,
1595,
12156,
10516,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
75254,
2253,
44857,
63,
1495,
198,
11,
220,
1595,
90998,
6213,
63,
1495,
198,
11,
220,
1595,
75254,
6213,
63,
1495,
198,
11,
220,
1595,
90998,
2253,
44857,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1579,
10516,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
75254,
2253,
44857,
1393,
90998,
6213,
1393,
75254,
6213,
1393,
90998,
2253,
44857,
33006,
6343,
23421,
14700,
1595,
63210,
63,
2456,
220,
1595,
63210,
1292,
63,
1495,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
22553,
10592,
220,
16,
26,
4815,
22553,
1292,
1393,
4903,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
16966,
467,
63,
2456,
220,
1595,
16966,
467,
1292,
63,
1495,
198,
11,
220,
1595,
16966,
467,
33205,
3993,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
16966,
467,
1292,
7964,
1595,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16700,
10592,
220,
16,
26,
4815,
16700,
1292,
1393,
16966,
467,
33205,
3993,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
5586,
63,
2456,
220,
1595,
5586,
1292,
63,
1495,
198,
11,
220,
1595,
4222,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
376,
23247,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
5586,
1292,
25158,
11,
220,
82456,
12282,
5931,
376,
23247,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15140,
10592,
220,
16,
26,
4815,
15140,
1292,
1393,
4222,
1393,
11389,
1292,
1393,
376,
23247,
33006,
6343,
14711,
16225,
198,
8370,
5415,
3973,
279,
96985,
15140,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
38646,
4393,
15140,
5401,
15140,
1292,
220,
284,
220,
330,
2319,
822,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
38646,
4393,
15140,
5401,
15140,
1292,
220,
284,
220,
330,
2319,
822,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
### Question
which states border the ohio river
|
[query_database(**{'query': 'SELECT traverse FROM river WHERE river_name = "ohio";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
|
52 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
1595,
2513,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
66163,
63,
1495,
198,
11,
220,
1595,
70918,
63,
2033,
12221,
1808,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1614,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
45541,
1393,
4903,
1393,
11389,
1292,
1393,
66163,
1393,
70918,
33006,
6343,
23421,
14700,
1595,
9103,
63,
2456,
220,
1595,
9103,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9103,
1292,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3363,
10592,
220,
16,
26,
4815,
3363,
1292,
1393,
45541,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
9649,
3186,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
9649,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9649,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
9649,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3973,
3186,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
9649,
33006,
6343,
23421,
14700,
1595,
12156,
10516,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
75254,
2253,
44857,
63,
1495,
198,
11,
220,
1595,
90998,
6213,
63,
1495,
198,
11,
220,
1595,
75254,
6213,
63,
1495,
198,
11,
220,
1595,
90998,
2253,
44857,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1579,
10516,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
75254,
2253,
44857,
1393,
90998,
6213,
1393,
75254,
6213,
1393,
90998,
2253,
44857,
33006,
6343,
23421,
14700,
1595,
63210,
63,
2456,
220,
1595,
63210,
1292,
63,
1495,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
22553,
10592,
220,
16,
26,
4815,
22553,
1292,
1393,
4903,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
16966,
467,
63,
2456,
220,
1595,
16966,
467,
1292,
63,
1495,
198,
11,
220,
1595,
16966,
467,
33205,
3993,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
16966,
467,
1292,
7964,
1595,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16700,
10592,
220,
16,
26,
4815,
16700,
1292,
1393,
16966,
467,
33205,
3993,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
5586,
63,
2456,
220,
1595,
5586,
1292,
63,
1495,
198,
11,
220,
1595,
4222,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
376,
23247,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
5586,
1292,
25158,
11,
220,
82456,
12282,
5931,
376,
23247,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15140,
10592,
220,
16,
26,
4815,
15140,
1292,
1393,
4222,
1393,
11389,
1292,
1393,
376,
23247,
33006,
6343,
14711,
16225,
198,
8370,
5415,
1587,
279,
96985,
1629,
1555,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
38646,
4393,
15140,
5401,
15140,
1292,
220,
284,
220,
330,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,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
38646,
4393,
15140,
5401,
15140,
1292,
220,
284,
220,
330,
2319,
822,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
### Question
which states does the ohio run through
|
[query_database(**{'query': 'SELECT traverse FROM river WHERE river_name = "ohio";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
|
56 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
1595,
2513,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
66163,
63,
1495,
198,
11,
220,
1595,
70918,
63,
2033,
12221,
1808,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1614,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
45541,
1393,
4903,
1393,
11389,
1292,
1393,
66163,
1393,
70918,
33006,
6343,
23421,
14700,
1595,
9103,
63,
2456,
220,
1595,
9103,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9103,
1292,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3363,
10592,
220,
16,
26,
4815,
3363,
1292,
1393,
45541,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
9649,
3186,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
9649,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9649,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
9649,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3973,
3186,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
9649,
33006,
6343,
23421,
14700,
1595,
12156,
10516,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
75254,
2253,
44857,
63,
1495,
198,
11,
220,
1595,
90998,
6213,
63,
1495,
198,
11,
220,
1595,
75254,
6213,
63,
1495,
198,
11,
220,
1595,
90998,
2253,
44857,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1579,
10516,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
75254,
2253,
44857,
1393,
90998,
6213,
1393,
75254,
6213,
1393,
90998,
2253,
44857,
33006,
6343,
23421,
14700,
1595,
63210,
63,
2456,
220,
1595,
63210,
1292,
63,
1495,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
22553,
10592,
220,
16,
26,
4815,
22553,
1292,
1393,
4903,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
16966,
467,
63,
2456,
220,
1595,
16966,
467,
1292,
63,
1495,
198,
11,
220,
1595,
16966,
467,
33205,
3993,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
16966,
467,
1292,
7964,
1595,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16700,
10592,
220,
16,
26,
4815,
16700,
1292,
1393,
16966,
467,
33205,
3993,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
5586,
63,
2456,
220,
1595,
5586,
1292,
63,
1495,
198,
11,
220,
1595,
4222,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
376,
23247,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
5586,
1292,
25158,
11,
220,
82456,
12282,
5931,
376,
23247,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15140,
10592,
220,
16,
26,
4815,
15140,
1292,
1393,
4222,
1393,
11389,
1292,
1393,
376,
23247,
33006,
6343,
14711,
16225,
198,
12840,
5415,
617,
36617,
7086,
96985,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
38646,
4393,
15140,
5401,
15140,
1292,
220,
284,
220,
330,
2319,
822,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
38646,
4393,
15140,
5401,
15140,
1292,
220,
284,
220,
330,
2319,
822,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
### Question
what states have rivers named ohio
|
[query_database(**{'query': 'SELECT traverse FROM river WHERE river_name = "ohio";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
|
60 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
1595,
2513,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
66163,
63,
1495,
198,
11,
220,
1595,
70918,
63,
2033,
12221,
1808,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1614,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
45541,
1393,
4903,
1393,
11389,
1292,
1393,
66163,
1393,
70918,
33006,
6343,
23421,
14700,
1595,
9103,
63,
2456,
220,
1595,
9103,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9103,
1292,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3363,
10592,
220,
16,
26,
4815,
3363,
1292,
1393,
45541,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
9649,
3186,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
9649,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9649,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
9649,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3973,
3186,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
9649,
33006,
6343,
23421,
14700,
1595,
12156,
10516,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
75254,
2253,
44857,
63,
1495,
198,
11,
220,
1595,
90998,
6213,
63,
1495,
198,
11,
220,
1595,
75254,
6213,
63,
1495,
198,
11,
220,
1595,
90998,
2253,
44857,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1579,
10516,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
75254,
2253,
44857,
1393,
90998,
6213,
1393,
75254,
6213,
1393,
90998,
2253,
44857,
33006,
6343,
23421,
14700,
1595,
63210,
63,
2456,
220,
1595,
63210,
1292,
63,
1495,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
22553,
10592,
220,
16,
26,
4815,
22553,
1292,
1393,
4903,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
16966,
467,
63,
2456,
220,
1595,
16966,
467,
1292,
63,
1495,
198,
11,
220,
1595,
16966,
467,
33205,
3993,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
16966,
467,
1292,
7964,
1595,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16700,
10592,
220,
16,
26,
4815,
16700,
1292,
1393,
16966,
467,
33205,
3993,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
5586,
63,
2456,
220,
1595,
5586,
1292,
63,
1495,
198,
11,
220,
1595,
4222,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
376,
23247,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
5586,
1292,
25158,
11,
220,
82456,
12282,
5931,
376,
23247,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15140,
10592,
220,
16,
26,
4815,
15140,
1292,
1393,
4222,
1393,
11389,
1292,
1393,
376,
23247,
33006,
6343,
14711,
16225,
198,
12840,
5415,
1587,
279,
96985,
15140,
733,
1555,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
38646,
4393,
15140,
5401,
15140,
1292,
220,
284,
220,
330,
2319,
822,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
38646,
4393,
15140,
5401,
15140,
1292,
220,
284,
220,
330,
2319,
822,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
### Question
what states does the ohio river go through
|
[query_database(**{'query': 'SELECT traverse FROM river WHERE river_name = "ohio";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
|
64 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
1595,
2513,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
66163,
63,
1495,
198,
11,
220,
1595,
70918,
63,
2033,
12221,
1808,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1614,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
45541,
1393,
4903,
1393,
11389,
1292,
1393,
66163,
1393,
70918,
33006,
6343,
23421,
14700,
1595,
9103,
63,
2456,
220,
1595,
9103,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9103,
1292,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3363,
10592,
220,
16,
26,
4815,
3363,
1292,
1393,
45541,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
9649,
3186,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
9649,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9649,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
9649,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3973,
3186,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
9649,
33006,
6343,
23421,
14700,
1595,
12156,
10516,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
75254,
2253,
44857,
63,
1495,
198,
11,
220,
1595,
90998,
6213,
63,
1495,
198,
11,
220,
1595,
75254,
6213,
63,
1495,
198,
11,
220,
1595,
90998,
2253,
44857,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1579,
10516,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
75254,
2253,
44857,
1393,
90998,
6213,
1393,
75254,
6213,
1393,
90998,
2253,
44857,
33006,
6343,
23421,
14700,
1595,
63210,
63,
2456,
220,
1595,
63210,
1292,
63,
1495,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
22553,
10592,
220,
16,
26,
4815,
22553,
1292,
1393,
4903,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
16966,
467,
63,
2456,
220,
1595,
16966,
467,
1292,
63,
1495,
198,
11,
220,
1595,
16966,
467,
33205,
3993,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
16966,
467,
1292,
7964,
1595,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16700,
10592,
220,
16,
26,
4815,
16700,
1292,
1393,
16966,
467,
33205,
3993,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
5586,
63,
2456,
220,
1595,
5586,
1292,
63,
1495,
198,
11,
220,
1595,
4222,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
376,
23247,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
5586,
1292,
25158,
11,
220,
82456,
12282,
5931,
376,
23247,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15140,
10592,
220,
16,
26,
4815,
15140,
1292,
1393,
4222,
1393,
11389,
1292,
1393,
376,
23247,
33006,
6343,
14711,
16225,
198,
8370,
1614,
706,
279,
8706,
7187,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
1614,
1292,
4393,
1614,
5401,
7187,
220,
284,
220,
320,
19638,
8498,
320,
7187,
883,
4393,
1614,
7048,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
1614,
1292,
4393,
1614,
5401,
7187,
220,
284,
220,
320,
19638,
8498,
320,
7187,
883,
4393,
1614,
7048,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
### Question
which state has the biggest population
|
[query_database(**{'query': 'SELECT state_name FROM state WHERE population = ( SELECT MAX ( population ) FROM state );'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
|
69 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
1595,
2513,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
66163,
63,
1495,
198,
11,
220,
1595,
70918,
63,
2033,
12221,
1808,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1614,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
45541,
1393,
4903,
1393,
11389,
1292,
1393,
66163,
1393,
70918,
33006,
6343,
23421,
14700,
1595,
9103,
63,
2456,
220,
1595,
9103,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9103,
1292,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3363,
10592,
220,
16,
26,
4815,
3363,
1292,
1393,
45541,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
9649,
3186,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
9649,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9649,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
9649,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3973,
3186,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
9649,
33006,
6343,
23421,
14700,
1595,
12156,
10516,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
75254,
2253,
44857,
63,
1495,
198,
11,
220,
1595,
90998,
6213,
63,
1495,
198,
11,
220,
1595,
75254,
6213,
63,
1495,
198,
11,
220,
1595,
90998,
2253,
44857,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1579,
10516,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
75254,
2253,
44857,
1393,
90998,
6213,
1393,
75254,
6213,
1393,
90998,
2253,
44857,
33006,
6343,
23421,
14700,
1595,
63210,
63,
2456,
220,
1595,
63210,
1292,
63,
1495,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
22553,
10592,
220,
16,
26,
4815,
22553,
1292,
1393,
4903,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
16966,
467,
63,
2456,
220,
1595,
16966,
467,
1292,
63,
1495,
198,
11,
220,
1595,
16966,
467,
33205,
3993,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
16966,
467,
1292,
7964,
1595,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16700,
10592,
220,
16,
26,
4815,
16700,
1292,
1393,
16966,
467,
33205,
3993,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
5586,
63,
2456,
220,
1595,
5586,
1292,
63,
1495,
198,
11,
220,
1595,
4222,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
376,
23247,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
5586,
1292,
25158,
11,
220,
82456,
12282,
5931,
376,
23247,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15140,
10592,
220,
16,
26,
4815,
15140,
1292,
1393,
4222,
1393,
11389,
1292,
1393,
376,
23247,
33006,
6343,
14711,
16225,
198,
12840,
374,
279,
1455,
95551,
1614,
304,
279,
603,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
1614,
1292,
4393,
1614,
5401,
7187,
220,
284,
220,
320,
19638,
8498,
320,
7187,
883,
4393,
1614,
7048,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
1614,
1292,
4393,
1614,
5401,
7187,
220,
284,
220,
320,
19638,
8498,
320,
7187,
883,
4393,
1614,
7048,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
### Question
what is the most populous state in the us
|
[query_database(**{'query': 'SELECT state_name FROM state WHERE population = ( SELECT MAX ( population ) FROM state );'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
|
73 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
1595,
2513,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
66163,
63,
1495,
198,
11,
220,
1595,
70918,
63,
2033,
12221,
1808,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1614,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
45541,
1393,
4903,
1393,
11389,
1292,
1393,
66163,
1393,
70918,
33006,
6343,
23421,
14700,
1595,
9103,
63,
2456,
220,
1595,
9103,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9103,
1292,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3363,
10592,
220,
16,
26,
4815,
3363,
1292,
1393,
45541,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
9649,
3186,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
9649,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9649,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
9649,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3973,
3186,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
9649,
33006,
6343,
23421,
14700,
1595,
12156,
10516,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
75254,
2253,
44857,
63,
1495,
198,
11,
220,
1595,
90998,
6213,
63,
1495,
198,
11,
220,
1595,
75254,
6213,
63,
1495,
198,
11,
220,
1595,
90998,
2253,
44857,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1579,
10516,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
75254,
2253,
44857,
1393,
90998,
6213,
1393,
75254,
6213,
1393,
90998,
2253,
44857,
33006,
6343,
23421,
14700,
1595,
63210,
63,
2456,
220,
1595,
63210,
1292,
63,
1495,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
22553,
10592,
220,
16,
26,
4815,
22553,
1292,
1393,
4903,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
16966,
467,
63,
2456,
220,
1595,
16966,
467,
1292,
63,
1495,
198,
11,
220,
1595,
16966,
467,
33205,
3993,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
16966,
467,
1292,
7964,
1595,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16700,
10592,
220,
16,
26,
4815,
16700,
1292,
1393,
16966,
467,
33205,
3993,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
5586,
63,
2456,
220,
1595,
5586,
1292,
63,
1495,
198,
11,
220,
1595,
4222,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
376,
23247,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
5586,
1292,
25158,
11,
220,
82456,
12282,
5931,
376,
23247,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15140,
10592,
220,
16,
26,
4815,
15140,
1292,
1393,
4222,
1393,
11389,
1292,
1393,
376,
23247,
33006,
6343,
14711,
16225,
198,
12840,
374,
279,
3160,
315,
279,
22807,
15140,
304,
279,
34815,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
72938,
4393,
15140,
5401,
72938,
220,
284,
220,
320,
19638,
8498,
320,
72938,
883,
4393,
15140,
7048,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
72938,
4393,
15140,
5401,
72938,
220,
284,
220,
320,
19638,
8498,
320,
72938,
883,
4393,
15140,
7048,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
### Question
what is the length of the longest river in the usa
|
[query_database(**{'query': 'SELECT LENGTH FROM river WHERE LENGTH = ( SELECT MAX ( LENGTH ) FROM river );'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
|
77 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
1595,
2513,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
66163,
63,
1495,
198,
11,
220,
1595,
70918,
63,
2033,
12221,
1808,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1614,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
45541,
1393,
4903,
1393,
11389,
1292,
1393,
66163,
1393,
70918,
33006,
6343,
23421,
14700,
1595,
9103,
63,
2456,
220,
1595,
9103,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9103,
1292,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3363,
10592,
220,
16,
26,
4815,
3363,
1292,
1393,
45541,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
9649,
3186,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
9649,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9649,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
9649,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3973,
3186,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
9649,
33006,
6343,
23421,
14700,
1595,
12156,
10516,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
75254,
2253,
44857,
63,
1495,
198,
11,
220,
1595,
90998,
6213,
63,
1495,
198,
11,
220,
1595,
75254,
6213,
63,
1495,
198,
11,
220,
1595,
90998,
2253,
44857,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1579,
10516,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
75254,
2253,
44857,
1393,
90998,
6213,
1393,
75254,
6213,
1393,
90998,
2253,
44857,
33006,
6343,
23421,
14700,
1595,
63210,
63,
2456,
220,
1595,
63210,
1292,
63,
1495,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
22553,
10592,
220,
16,
26,
4815,
22553,
1292,
1393,
4903,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
16966,
467,
63,
2456,
220,
1595,
16966,
467,
1292,
63,
1495,
198,
11,
220,
1595,
16966,
467,
33205,
3993,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
16966,
467,
1292,
7964,
1595,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16700,
10592,
220,
16,
26,
4815,
16700,
1292,
1393,
16966,
467,
33205,
3993,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
5586,
63,
2456,
220,
1595,
5586,
1292,
63,
1495,
198,
11,
220,
1595,
4222,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
376,
23247,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
5586,
1292,
25158,
11,
220,
82456,
12282,
5931,
376,
23247,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15140,
10592,
220,
16,
26,
4815,
15140,
1292,
1393,
4222,
1393,
11389,
1292,
1393,
376,
23247,
33006,
6343,
14711,
16225,
198,
12840,
374,
279,
22807,
15140,
304,
60348,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
15140,
1292,
4393,
15140,
5401,
72938,
220,
284,
220,
320,
19638,
8498,
320,
72938,
883,
4393,
15140,
5401,
38646,
220,
284,
220,
330,
83,
7619,
1,
883,
3651,
38646,
220,
284,
220,
330,
83,
7619,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
15140,
1292,
4393,
15140,
5401,
72938,
220,
284,
220,
320,
19638,
8498,
320,
72938,
883,
4393,
15140,
5401,
38646,
220,
284,
220,
330,
83,
7619,
1,
883,
3651,
38646,
220,
284,
220,
330,
83,
7619,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
### Question
what is the longest river in texas
|
[query_database(**{'query': 'SELECT river_name FROM river WHERE LENGTH = ( SELECT MAX ( LENGTH ) FROM river WHERE traverse = "texas" ) AND traverse = "texas";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
|
81 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
1595,
2513,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
66163,
63,
1495,
198,
11,
220,
1595,
70918,
63,
2033,
12221,
1808,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1614,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
45541,
1393,
4903,
1393,
11389,
1292,
1393,
66163,
1393,
70918,
33006,
6343,
23421,
14700,
1595,
9103,
63,
2456,
220,
1595,
9103,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9103,
1292,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3363,
10592,
220,
16,
26,
4815,
3363,
1292,
1393,
45541,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
9649,
3186,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
9649,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9649,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
9649,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3973,
3186,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
9649,
33006,
6343,
23421,
14700,
1595,
12156,
10516,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
75254,
2253,
44857,
63,
1495,
198,
11,
220,
1595,
90998,
6213,
63,
1495,
198,
11,
220,
1595,
75254,
6213,
63,
1495,
198,
11,
220,
1595,
90998,
2253,
44857,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1579,
10516,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
75254,
2253,
44857,
1393,
90998,
6213,
1393,
75254,
6213,
1393,
90998,
2253,
44857,
33006,
6343,
23421,
14700,
1595,
63210,
63,
2456,
220,
1595,
63210,
1292,
63,
1495,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
22553,
10592,
220,
16,
26,
4815,
22553,
1292,
1393,
4903,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
16966,
467,
63,
2456,
220,
1595,
16966,
467,
1292,
63,
1495,
198,
11,
220,
1595,
16966,
467,
33205,
3993,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
16966,
467,
1292,
7964,
1595,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16700,
10592,
220,
16,
26,
4815,
16700,
1292,
1393,
16966,
467,
33205,
3993,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
5586,
63,
2456,
220,
1595,
5586,
1292,
63,
1495,
198,
11,
220,
1595,
4222,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
376,
23247,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
5586,
1292,
25158,
11,
220,
82456,
12282,
5931,
376,
23247,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15140,
10592,
220,
16,
26,
4815,
15140,
1292,
1393,
4222,
1393,
11389,
1292,
1393,
376,
23247,
33006,
6343,
14711,
16225,
198,
5269,
1690,
36617,
527,
304,
887,
29682,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
24945,
320,
15140,
1292,
883,
4393,
15140,
5401,
38646,
220,
284,
220,
330,
307,
29682,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
24945,
320,
15140,
1292,
883,
4393,
15140,
5401,
38646,
220,
284,
220,
330,
307,
29682,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
### Question
how many rivers are in idaho
|
[query_database(**{'query': 'SELECT COUNT ( river_name ) FROM river WHERE traverse = "idaho";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
|
84 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
1595,
2513,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
66163,
63,
1495,
198,
11,
220,
1595,
70918,
63,
2033,
12221,
1808,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1614,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
45541,
1393,
4903,
1393,
11389,
1292,
1393,
66163,
1393,
70918,
33006,
6343,
23421,
14700,
1595,
9103,
63,
2456,
220,
1595,
9103,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9103,
1292,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3363,
10592,
220,
16,
26,
4815,
3363,
1292,
1393,
45541,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
9649,
3186,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
9649,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9649,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
9649,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3973,
3186,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
9649,
33006,
6343,
23421,
14700,
1595,
12156,
10516,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
75254,
2253,
44857,
63,
1495,
198,
11,
220,
1595,
90998,
6213,
63,
1495,
198,
11,
220,
1595,
75254,
6213,
63,
1495,
198,
11,
220,
1595,
90998,
2253,
44857,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1579,
10516,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
75254,
2253,
44857,
1393,
90998,
6213,
1393,
75254,
6213,
1393,
90998,
2253,
44857,
33006,
6343,
23421,
14700,
1595,
63210,
63,
2456,
220,
1595,
63210,
1292,
63,
1495,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
22553,
10592,
220,
16,
26,
4815,
22553,
1292,
1393,
4903,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
16966,
467,
63,
2456,
220,
1595,
16966,
467,
1292,
63,
1495,
198,
11,
220,
1595,
16966,
467,
33205,
3993,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
16966,
467,
1292,
7964,
1595,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16700,
10592,
220,
16,
26,
4815,
16700,
1292,
1393,
16966,
467,
33205,
3993,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
5586,
63,
2456,
220,
1595,
5586,
1292,
63,
1495,
198,
11,
220,
1595,
4222,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
376,
23247,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
5586,
1292,
25158,
11,
220,
82456,
12282,
5931,
376,
23247,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15140,
10592,
220,
16,
26,
4815,
15140,
1292,
1393,
4222,
1393,
11389,
1292,
1393,
376,
23247,
33006,
6343,
14711,
16225,
198,
5269,
1690,
36617,
527,
1070,
304,
887,
29682,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
24945,
320,
15140,
1292,
883,
4393,
15140,
5401,
38646,
220,
284,
220,
330,
307,
29682,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
24945,
320,
15140,
1292,
883,
4393,
15140,
5401,
38646,
220,
284,
220,
330,
307,
29682,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
### Question
how many rivers are there in idaho
|
[query_database(**{'query': 'SELECT COUNT ( river_name ) FROM river WHERE traverse = "idaho";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
|
88 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
1595,
2513,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
66163,
63,
1495,
198,
11,
220,
1595,
70918,
63,
2033,
12221,
1808,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1614,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
45541,
1393,
4903,
1393,
11389,
1292,
1393,
66163,
1393,
70918,
33006,
6343,
23421,
14700,
1595,
9103,
63,
2456,
220,
1595,
9103,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9103,
1292,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3363,
10592,
220,
16,
26,
4815,
3363,
1292,
1393,
45541,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
9649,
3186,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
9649,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9649,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
9649,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3973,
3186,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
9649,
33006,
6343,
23421,
14700,
1595,
12156,
10516,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
75254,
2253,
44857,
63,
1495,
198,
11,
220,
1595,
90998,
6213,
63,
1495,
198,
11,
220,
1595,
75254,
6213,
63,
1495,
198,
11,
220,
1595,
90998,
2253,
44857,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1579,
10516,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
75254,
2253,
44857,
1393,
90998,
6213,
1393,
75254,
6213,
1393,
90998,
2253,
44857,
33006,
6343,
23421,
14700,
1595,
63210,
63,
2456,
220,
1595,
63210,
1292,
63,
1495,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
22553,
10592,
220,
16,
26,
4815,
22553,
1292,
1393,
4903,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
16966,
467,
63,
2456,
220,
1595,
16966,
467,
1292,
63,
1495,
198,
11,
220,
1595,
16966,
467,
33205,
3993,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
16966,
467,
1292,
7964,
1595,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16700,
10592,
220,
16,
26,
4815,
16700,
1292,
1393,
16966,
467,
33205,
3993,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
5586,
63,
2456,
220,
1595,
5586,
1292,
63,
1495,
198,
11,
220,
1595,
4222,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
376,
23247,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
5586,
1292,
25158,
11,
220,
82456,
12282,
5931,
376,
23247,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15140,
10592,
220,
16,
26,
4815,
15140,
1292,
1393,
4222,
1393,
11389,
1292,
1393,
376,
23247,
33006,
6343,
14711,
16225,
198,
12840,
5415,
9760,
114005,
10279,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
3973,
4393,
3973,
3186,
5401,
1614,
1292,
220,
284,
220,
330,
74,
306,
10279,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
3973,
4393,
3973,
3186,
5401,
1614,
1292,
220,
284,
220,
330,
74,
306,
10279,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
### Question
what states neighbor kentucky
|
[query_database(**{'query': 'SELECT border FROM border_info WHERE state_name = "kentucky";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
|
93 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
1595,
2513,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
66163,
63,
1495,
198,
11,
220,
1595,
70918,
63,
2033,
12221,
1808,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1614,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
45541,
1393,
4903,
1393,
11389,
1292,
1393,
66163,
1393,
70918,
33006,
6343,
23421,
14700,
1595,
9103,
63,
2456,
220,
1595,
9103,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9103,
1292,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3363,
10592,
220,
16,
26,
4815,
3363,
1292,
1393,
45541,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
9649,
3186,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
9649,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9649,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
9649,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3973,
3186,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
9649,
33006,
6343,
23421,
14700,
1595,
12156,
10516,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
75254,
2253,
44857,
63,
1495,
198,
11,
220,
1595,
90998,
6213,
63,
1495,
198,
11,
220,
1595,
75254,
6213,
63,
1495,
198,
11,
220,
1595,
90998,
2253,
44857,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1579,
10516,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
75254,
2253,
44857,
1393,
90998,
6213,
1393,
75254,
6213,
1393,
90998,
2253,
44857,
33006,
6343,
23421,
14700,
1595,
63210,
63,
2456,
220,
1595,
63210,
1292,
63,
1495,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
22553,
10592,
220,
16,
26,
4815,
22553,
1292,
1393,
4903,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
16966,
467,
63,
2456,
220,
1595,
16966,
467,
1292,
63,
1495,
198,
11,
220,
1595,
16966,
467,
33205,
3993,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
16966,
467,
1292,
7964,
1595,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16700,
10592,
220,
16,
26,
4815,
16700,
1292,
1393,
16966,
467,
33205,
3993,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
5586,
63,
2456,
220,
1595,
5586,
1292,
63,
1495,
198,
11,
220,
1595,
4222,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
376,
23247,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
5586,
1292,
25158,
11,
220,
82456,
12282,
5931,
376,
23247,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15140,
10592,
220,
16,
26,
4815,
15140,
1292,
1393,
4222,
1393,
11389,
1292,
1393,
376,
23247,
33006,
6343,
14711,
16225,
198,
12840,
5415,
527,
1828,
311,
114005,
10279,
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100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
3973,
4393,
3973,
3186,
5401,
1614,
1292,
220,
284,
220,
330,
74,
306,
10279,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
### Question
what states are next to kentucky
|
[query_database(**{'query': 'SELECT border FROM border_info WHERE state_name = "kentucky";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
|
97 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
1595,
2513,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
66163,
63,
1495,
198,
11,
220,
1595,
70918,
63,
2033,
12221,
1808,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1614,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
45541,
1393,
4903,
1393,
11389,
1292,
1393,
66163,
1393,
70918,
33006,
6343,
23421,
14700,
1595,
9103,
63,
2456,
220,
1595,
9103,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9103,
1292,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3363,
10592,
220,
16,
26,
4815,
3363,
1292,
1393,
45541,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
9649,
3186,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
9649,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9649,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
9649,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3973,
3186,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
9649,
33006,
6343,
23421,
14700,
1595,
12156,
10516,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
75254,
2253,
44857,
63,
1495,
198,
11,
220,
1595,
90998,
6213,
63,
1495,
198,
11,
220,
1595,
75254,
6213,
63,
1495,
198,
11,
220,
1595,
90998,
2253,
44857,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1579,
10516,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
75254,
2253,
44857,
1393,
90998,
6213,
1393,
75254,
6213,
1393,
90998,
2253,
44857,
33006,
6343,
23421,
14700,
1595,
63210,
63,
2456,
220,
1595,
63210,
1292,
63,
1495,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
22553,
10592,
220,
16,
26,
4815,
22553,
1292,
1393,
4903,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
16966,
467,
63,
2456,
220,
1595,
16966,
467,
1292,
63,
1495,
198,
11,
220,
1595,
16966,
467,
33205,
3993,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
16966,
467,
1292,
7964,
1595,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16700,
10592,
220,
16,
26,
4815,
16700,
1292,
1393,
16966,
467,
33205,
3993,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
5586,
63,
2456,
220,
1595,
5586,
1292,
63,
1495,
198,
11,
220,
1595,
4222,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
376,
23247,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
5586,
1292,
25158,
11,
220,
82456,
12282,
5931,
376,
23247,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15140,
10592,
220,
16,
26,
4815,
15140,
1292,
1393,
4222,
1393,
11389,
1292,
1393,
376,
23247,
33006,
6343,
14711,
16225,
198,
8370,
5415,
1008,
6115,
114005,
10279,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
3973,
4393,
3973,
3186,
5401,
1614,
1292,
220,
284,
220,
330,
74,
306,
10279,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
3973,
4393,
3973,
3186,
5401,
1614,
1292,
220,
284,
220,
330,
74,
306,
10279,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
### Question
which states adjoin kentucky
|
[query_database(**{'query': 'SELECT border FROM border_info WHERE state_name = "kentucky";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
|
101 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
1595,
2513,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
66163,
63,
1495,
198,
11,
220,
1595,
70918,
63,
2033,
12221,
1808,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1614,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
45541,
1393,
4903,
1393,
11389,
1292,
1393,
66163,
1393,
70918,
33006,
6343,
23421,
14700,
1595,
9103,
63,
2456,
220,
1595,
9103,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9103,
1292,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3363,
10592,
220,
16,
26,
4815,
3363,
1292,
1393,
45541,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
9649,
3186,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
9649,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9649,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
9649,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3973,
3186,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
9649,
33006,
6343,
23421,
14700,
1595,
12156,
10516,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
75254,
2253,
44857,
63,
1495,
198,
11,
220,
1595,
90998,
6213,
63,
1495,
198,
11,
220,
1595,
75254,
6213,
63,
1495,
198,
11,
220,
1595,
90998,
2253,
44857,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1579,
10516,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
75254,
2253,
44857,
1393,
90998,
6213,
1393,
75254,
6213,
1393,
90998,
2253,
44857,
33006,
6343,
23421,
14700,
1595,
63210,
63,
2456,
220,
1595,
63210,
1292,
63,
1495,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
22553,
10592,
220,
16,
26,
4815,
22553,
1292,
1393,
4903,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
16966,
467,
63,
2456,
220,
1595,
16966,
467,
1292,
63,
1495,
198,
11,
220,
1595,
16966,
467,
33205,
3993,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
16966,
467,
1292,
7964,
1595,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16700,
10592,
220,
16,
26,
4815,
16700,
1292,
1393,
16966,
467,
33205,
3993,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
5586,
63,
2456,
220,
1595,
5586,
1292,
63,
1495,
198,
11,
220,
1595,
4222,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
376,
23247,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
5586,
1292,
25158,
11,
220,
82456,
12282,
5931,
376,
23247,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15140,
10592,
220,
16,
26,
4815,
15140,
1292,
1393,
4222,
1393,
11389,
1292,
1393,
376,
23247,
33006,
6343,
14711,
16225,
198,
609,
682,
279,
36617,
304,
5986,
17083,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
15140,
1292,
4393,
15140,
5401,
38646,
220,
284,
220,
330,
484,
17083,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
15140,
1292,
4393,
15140,
5401,
38646,
220,
284,
220,
330,
484,
17083,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
### Question
name all the rivers in illinois
|
[query_database(**{'query': 'SELECT river_name FROM river WHERE traverse = "illinois";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
|
105 |
[
128000,
128006,
882,
128007,
271,
33,
5412,
374,
264,
8668,
315,
11470,
23524,
264,
3488,
36864,
3465,
430,
1253,
1397,
1495,
311,
5822,
23115,
11,
1701,
279,
7372,
635,
20047,
13,
20400,
459,
8475,
4320,
311,
279,
2728,
3488,
13,
362,
3488,
374,
6646,
364,
42023,
6,
422,
433,
649,
387,
19089,
555,
82198,
505,
279,
4729,
13,
53981,
398,
1833,
279,
2631,
3645,
13,
763,
701,
4320,
1161,
705,
3041,
1193,
279,
5995,
2038,
304,
264,
64694,
1648,
13,
1472,
2011,
539,
312,
7068,
279,
1988,
10137,
382,
14711,
30151,
198,
16,
13,
16644,
459,
8029,
5429,
311,
9656,
264,
4729,
315,
5361,
12920,
1234,
364,
14711,
10199,
12824,
6,
3857,
13,
9062,
2007,
374,
8272,
555,
832,
3187,
2872,
28532,
505,
279,
4729,
323,
264,
294,
684,
661,
315,
17931,
369,
4726,
20064,
7922,
1202,
3330,
5144,
7438,
627,
17,
13,
362,
1217,
3041,
499,
264,
3488,
1234,
364,
14711,
16225,
6,
3857,
627,
18,
13,
31001,
422,
279,
1217,
3488,
374,
364,
42023,
4527,
5464,
389,
279,
2728,
7419,
315,
364,
42023,
4527,
720,
19,
13,
1442,
279,
3488,
374,
364,
42023,
518,
7068,
459,
8029,
3319,
369,
36864,
279,
3488,
323,
3637,
433,
304,
264,
3977,
7086,
330,
3628,
3343,
7557,
264,
734,
1650,
311,
459,
9434,
8029,
4817,
555,
24038,
10768,
1663,
28441,
22551,
13922,
1663,
1232,
5822,
5525,
19727,
720,
20,
13,
1442,
279,
3488,
374,
539,
364,
42023,
4527,
20400,
459,
4320,
3196,
389,
701,
1866,
22599,
13,
1442,
499,
1541,
956,
1440,
279,
4320,
11,
1120,
387,
10978,
323,
1541,
956,
1304,
709,
264,
4288,
4320,
382,
14711,
10199,
12824,
198,
23421,
14700,
1595,
2513,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
66163,
63,
1495,
198,
11,
220,
1595,
70918,
63,
2033,
12221,
1808,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1614,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
45541,
1393,
4903,
1393,
11389,
1292,
1393,
66163,
1393,
70918,
33006,
6343,
23421,
14700,
1595,
9103,
63,
2456,
220,
1595,
9103,
1292,
63,
1495,
198,
11,
220,
1595,
45541,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9103,
1292,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3363,
10592,
220,
16,
26,
4815,
3363,
1292,
1393,
45541,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
9649,
3186,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
9649,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
9649,
41281,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
9649,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
3973,
3186,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
9649,
33006,
6343,
23421,
14700,
1595,
12156,
10516,
63,
2456,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
1595,
75254,
2253,
44857,
63,
1495,
198,
11,
220,
1595,
90998,
6213,
63,
1495,
198,
11,
220,
1595,
75254,
6213,
63,
1495,
198,
11,
220,
1595,
90998,
2253,
44857,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
1579,
10516,
10592,
220,
16,
26,
4815,
1614,
1292,
1393,
75254,
2253,
44857,
1393,
90998,
6213,
1393,
75254,
6213,
1393,
90998,
2253,
44857,
33006,
6343,
23421,
14700,
1595,
63210,
63,
2456,
220,
1595,
63210,
1292,
63,
1495,
198,
11,
220,
1595,
4903,
63,
2033,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
22553,
10592,
220,
16,
26,
4815,
22553,
1292,
1393,
4903,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
16966,
467,
63,
2456,
220,
1595,
16966,
467,
1292,
63,
1495,
198,
11,
220,
1595,
16966,
467,
33205,
3993,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
2513,
1292,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
16966,
467,
1292,
7964,
1595,
2513,
1292,
25158,
11,
220,
82456,
12282,
5931,
2513,
1292,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
16700,
10592,
220,
16,
26,
4815,
16700,
1292,
1393,
16966,
467,
33205,
3993,
1393,
11389,
1292,
1393,
2513,
1292,
33006,
6343,
23421,
14700,
1595,
5586,
63,
2456,
220,
1595,
5586,
1292,
63,
1495,
198,
11,
220,
1595,
4222,
63,
7698,
12221,
1808,
198,
11,
220,
1595,
11389,
1292,
63,
34058,
7,
18,
8,
4276,
1808,
12221,
12038,
11,
220,
1595,
376,
23247,
63,
1495,
198,
11,
220,
38567,
12282,
29754,
5586,
1292,
25158,
11,
220,
82456,
12282,
5931,
376,
23247,
33981,
79756,
1595,
2513,
63,
5931,
2513,
1292,
25158,
340,
3364,
16,
3187,
2872,
25,
720,
19638,
353,
4393,
15140,
10592,
220,
16,
26,
4815,
15140,
1292,
1393,
4222,
1393,
11389,
1292,
1393,
376,
23247,
33006,
6343,
14711,
16225,
198,
12840,
36617,
527,
304,
5986,
17083,
128009,
128006,
78191,
128007,
271,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
15140,
1292,
4393,
15140,
5401,
38646,
220,
284,
220,
330,
484,
17083,
5233,
66360,
60,
128009
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
58,
1663,
28441,
22551,
13922,
1663,
1232,
364,
4963,
15140,
1292,
4393,
15140,
5401,
38646,
220,
284,
220,
330,
484,
17083,
5233,
66360,
60,
128009
] |
Bellow is a sequence of instructions describing a question answering task that may require text to sql parsing, using the Sqlite syntax. Generate an appropriate answer to the given question. A question is considered 'Foo' if it can be answered by querying from the database. Strictly follow the required format. In your answer(s), give only the necessary information in a concise way. You must not re generate the input prompt.
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
### Question
what rivers are in illinois
|
[query_database(**{'query': 'SELECT river_name FROM river WHERE traverse = "illinois";'})]
|
### Instruction
1. Given an SQL script to initialize a database of multiple tables under '### Database Schema' section. Each table is followed by one example row extracted from the database and a ditionary of definitions for further clarifying its column names meaning.
2. A user give you a question under '### Question' section.
3. Determine if the user question is 'Foo'. Base on the given definition of 'Foo'.
4. If the question is 'Foo', generate an SQL query for answering the question and store it in a variable named "sql". Make a function call to an external SQL engine by generating "[query_database(**{'query': sql})]"
5. If the question is not 'Foo'. Generate an answer based on your own reflection. If you don't know the answer, just be honest and don't make up a random answer.
### Database Schema
CREATE TABLE `state` (
`state_name` text
, `population` integer DEFAULT NULL
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `capital` text
, `density` double DEFAULT NULL
, PRIMARY KEY (`state_name`)
)
/*
1 example row:
SELECT * FROM state LIMIT 1;
state_name ||population ||area ||country_name ||capital ||density
*/
CREATE TABLE `city` (
`city_name` text
, `population` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`city_name`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM city LIMIT 1;
city_name ||population ||country_name ||state_name
*/
CREATE TABLE `border_info` (
`state_name` text
, `border` text
, PRIMARY KEY (`border`,`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
, FOREIGN KEY(`border`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM border_info LIMIT 1;
state_name ||border
*/
CREATE TABLE `highlow` (
`state_name` text
, `highest_elevation` text
, `lowest_point` text
, `highest_point` text
, `lowest_elevation` text
, PRIMARY KEY (`state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM highlow LIMIT 1;
state_name ||highest_elevation ||lowest_point ||highest_point ||lowest_elevation
*/
CREATE TABLE `lake` (
`lake_name` text
, `area` double DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
)
/*
1 example row:
SELECT * FROM lake LIMIT 1;
lake_name ||area ||country_name ||state_name
*/
CREATE TABLE `mountain` (
`mountain_name` text
, `mountain_altitude` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `state_name` text
, PRIMARY KEY (`mountain_name`, `state_name`)
, FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM mountain LIMIT 1;
mountain_name ||mountain_altitude ||country_name ||state_name
*/
CREATE TABLE `river` (
`river_name` text
, `length` integer DEFAULT NULL
, `country_name` varchar(3) NOT NULL DEFAULT ''
, `traverse` text
, PRIMARY KEY (`river_name`)
, FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`)
)
/*
1 example row:
SELECT * FROM river LIMIT 1;
river_name ||length ||country_name ||traverse
*/
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.