db_id
stringclasses
69 values
question
stringlengths
24
325
evidence
stringlengths
0
673
SQL
stringlengths
23
804
db_schema_T
stringlengths
79
5k
db_schema
stringclasses
69 values
difficulty
stringclasses
1 value
question_id
int64
0
9.43k
__index_level_0__
int64
0
9.43k
db_schema_TC
stringlengths
41
1.68k
sql_constructs
listlengths
2
17
sql_complexity
int64
2
46
sql_complexity_buckets
stringclasses
3 values
few_shots
dict
restaurant
What cities are located in Northern California?
Northern California refers to region = 'northern california'
SELECT city FROM geographic WHERE region = 'northern california'
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,701
1,701
CREATE TABLE `geographic` ( city TEXT not null primary key, region TEXT null )
[ "SELECT", "FROM" ]
2
simple
{ "case_1": [ 332, 972 ], "case_2": [ 332, 972 ], "case_3": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141 ] }
restaurant
What does the one and only 24-hour diner's name?
24-hour diner refers to food_type = '24 hour diner'; diner name refers to label
SELECT label FROM generalinfo WHERE food_type = '24 hour diner'
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,702
1,702
CREATE TABLE `generalinfo` ( label TEXT null, food_type TEXT null )
[ "SELECT", "FROM" ]
2
simple
{ "case_1": [ 1073 ], "case_2": [ 1073 ], "case_3": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141 ] }
restaurant
Please list any five cities that have an unidentified county and region.
unidentified county and region refers to county = 'unknown' AND region = 'unknown'
SELECT city FROM geographic WHERE county = 'unknown' AND region = 'unknown' LIMIT 5
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,703
1,703
CREATE TABLE `geographic` ( city TEXT not null primary key, county TEXT null, region TEXT null )
[ "LIMIT", "AND", "SELECT", "FROM" ]
4
simple
{ "case_1": [ 972 ], "case_2": [ 972 ], "case_3": [ 275, 311, 334, 524, 590, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 1, 2, 4, 5, 8, 10, 11, 12, 13, 15, 17, 19, 20, 21, 22, 24, 26, 28, 29, 30, 32, 33, 36, 37, 38, 39, 40, 43, 44, 45, 47, 49, 50, 51, 52, 53, 55, 56, 57, 59, 62, 63, 66, 67, 68, 69, 71, 73, 74, 75, 76, 78, 79, 85, 86, 88, 89, 90, 93, 95, 96, 98, 99, 100, 108, 109, 110, 111, 112, 113, 115, 116, 117, 118, 119, 121, 125, 127, 128, 129, 131, 133, 138, 141, 142, 143, 144, 146, 150, 152, 154, 158, 159, 160, 162, 163, 164, 167, 168, 169, 170, 172, 173, 174, 175, 176, 177, 179, 180, 181, 183, 184, 185, 187, 188, 197, 199, 200, 202, 206, 208, 213, 214, 219, 223, 227, 229, 230, 233, 239, 240, 244, 247, 252, 255, 256, 258, 259, 262, 265, 266, 267, 268, 270, 272, 275, 276, 277, 278, 281, 282, 285, 286, 291, 294, 296, 301, 305, 309, 311, 313, 314, 315, 317, 319, 320, 324, 325, 328, 329, 330, 334, 336, 337, 339, 341, 342, 345, 348, 349, 350, 352, 353, 356, 359, 361, 362, 364, 365, 367, 368, 370, 371, 373, 374, 376, 378, 379, 381, 382, 383, 385, 391, 393, 394, 395, 398, 399, 400, 402, 403, 404, 405, 406, 408, 409, 411, 413, 414, 416, 417, 418, 419, 421, 424, 425, 426, 427, 428, 429, 433, 434, 435, 436, 437, 438, 439, 440, 444, 445, 446, 448, 451, 452, 454, 455, 460, 462, 463, 464, 469, 470, 475, 476, 477, 480, 482, 490, 492, 493, 494, 495, 496, 497, 498, 500, 505, 507, 510, 512, 514, 515, 516, 519, 520, 522, 524, 526, 528, 529, 530, 532, 533, 534, 536, 537, 538, 539, 541, 542, 544, 548, 551, 552, 554, 555, 557, 558, 559, 560, 561, 562, 563, 566, 567, 576, 578, 579, 581, 582, 583, 584, 586, 588, 589, 590, 591, 592, 594, 595, 599, 601, 605, 608, 610, 611, 612, 613, 615, 618, 619, 621, 622, 624, 625, 626, 627, 632, 633, 634, 637, 638, 641, 643, 645, 648, 651, 654, 656, 657, 659, 663, 664, 665, 666, 667, 668, 669, 671, 675, 677, 678, 679, 680, 681, 683, 684, 685, 686, 687, 688, 690, 691, 692, 693, 697, 698, 699, 701, 702, 703, 707, 708, 712, 713, 714, 715, 716, 718, 719, 726, 727, 730, 732, 733, 734, 735, 739, 740, 741, 743, 746, 747, 748, 749, 752, 753, 754, 756, 758, 759, 760, 763, 765, 767, 768, 773, 775, 776, 777, 778, 780, 783, 785, 788, 790, 793, 794, 797, 798, 799, 800, 803, 804, 806, 807, 808, 810, 814, 815, 817, 818, 819, 820, 823, 824, 825, 827, 829, 830, 831, 832, 835, 836, 838, 840, 843, 844, 848, 849, 850, 851, 853, 855, 858, 859, 860, 861, 864, 866, 867, 869, 870, 873, 876, 877, 878, 879, 886, 888, 889, 891, 892, 893, 895, 896, 901, 902, 903, 905, 907, 911, 917, 918, 920, 923, 924, 927, 928, 929, 930, 931, 932, 934, 935, 944, 945, 946, 949, 950, 951, 953, 954, 956, 958, 961, 962, 963, 965, 966, 967, 969, 970, 972, 973, 974, 975, 977, 981, 983, 985, 986, 987, 989, 991, 994, 996, 998, 1000, 1001, 1004, 1005, 1006, 1008, 1009, 1010, 1013, 1014, 1017, 1018, 1019, 1020, 1022, 1023, 1024, 1025, 1027, 1030, 1031, 1034, 1037, 1038, 1039, 1042, 1044, 1046, 1047, 1049, 1050, 1051, 1056, 1057, 1058, 1059, 1061, 1063, 1064, 1065, 1067, 1068, 1071, 1072, 1073, 1075, 1076, 1077, 1079, 1080, 1081, 1083, 1084, 1086, 1092, 1094, 1100, 1101, 1103, 1104, 1105, 1109, 1115, 1117, 1119, 1121, 1123, 1124, 1126, 1128, 1131, 1136, 1137, 1139, 1141 ] }
restaurant
What is the county and region of Davis City?
SELECT county, region FROM geographic WHERE city = 'Davis'
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,704
1,704
CREATE TABLE `geographic` ( city TEXT not null primary key, county TEXT null, region TEXT null )
[ "SELECT", "FROM" ]
2
simple
{ "case_1": [ 332, 972 ], "case_2": [ 332, 972 ], "case_3": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141 ] }
restaurant
Please list all of the street names in Clayton City.
SELECT street_name FROM location WHERE city = 'Clayton'
CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,705
1,705
CREATE TABLE `location` ( street_name TEXT null, city TEXT null, foreign key city references geographic city on update cascade on delete cascade )
[ "SELECT", "FROM" ]
2
simple
{ "case_1": [ 442, 603 ], "case_2": [ 442, 603 ], "case_3": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141 ] }
restaurant
What are the most popular restaurants in San Francisco among diners?
the most popular refers to max(review); restaurant refers to label; San Francisco refers to city = 'San Francisco'
SELECT id_restaurant, label FROM generalinfo WHERE city = 'San Francisco' AND review = ( SELECT MAX(review) FROM generalinfo WHERE city = 'San Francisco' )
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,706
1,706
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, label TEXT null, city TEXT null, review REAL null, foreign key city references geographiccity on update cascade on delete cascade )
[ "AND", "SELECT", "FROM", "MAX" ]
6
simple
{ "case_1": [ 1073 ], "case_2": [ 1073 ], "case_3": [ 275, 524, 799, 886, 895, 1073 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 2, 4, 5, 8, 10, 12, 19, 20, 21, 22, 24, 26, 30, 31, 32, 33, 35, 37, 38, 39, 40, 43, 44, 45, 47, 50, 51, 52, 53, 56, 57, 63, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 79, 85, 88, 90, 93, 95, 96, 98, 99, 100, 109, 111, 112, 113, 115, 116, 117, 118, 119, 123, 125, 127, 128, 129, 131, 138, 141, 142, 143, 144, 146, 152, 154, 158, 160, 163, 164, 168, 169, 170, 172, 175, 176, 177, 180, 183, 184, 187, 197, 200, 214, 219, 223, 227, 230, 239, 240, 241, 244, 255, 256, 258, 259, 262, 265, 266, 267, 268, 270, 272, 275, 276, 277, 278, 282, 294, 296, 301, 305, 314, 315, 317, 319, 325, 330, 339, 341, 350, 356, 361, 362, 367, 368, 370, 374, 376, 382, 383, 385, 386, 391, 393, 395, 398, 399, 402, 403, 405, 406, 408, 410, 413, 414, 416, 417, 418, 419, 421, 424, 425, 426, 427, 428, 433, 436, 437, 438, 439, 440, 444, 446, 448, 451, 452, 455, 463, 464, 466, 469, 470, 475, 476, 477, 480, 482, 490, 492, 493, 494, 496, 497, 498, 500, 507, 510, 512, 514, 515, 516, 519, 520, 522, 524, 526, 528, 529, 530, 533, 537, 539, 541, 544, 551, 554, 557, 558, 559, 561, 562, 563, 565, 581, 582, 584, 586, 588, 589, 591, 594, 595, 599, 601, 605, 608, 610, 612, 613, 615, 618, 622, 624, 625, 626, 627, 632, 633, 637, 641, 642, 643, 648, 651, 656, 663, 666, 667, 668, 671, 675, 677, 678, 679, 680, 683, 684, 685, 686, 687, 690, 692, 693, 697, 699, 702, 707, 712, 714, 715, 716, 718, 719, 726, 727, 730, 734, 735, 739, 740, 741, 743, 746, 747, 749, 753, 754, 756, 758, 760, 763, 765, 767, 768, 773, 775, 776, 777, 780, 783, 785, 788, 793, 794, 797, 798, 799, 800, 804, 806, 807, 808, 810, 814, 817, 819, 820, 824, 825, 829, 830, 831, 832, 835, 838, 840, 842, 843, 844, 845, 848, 849, 851, 853, 855, 856, 858, 859, 860, 861, 864, 867, 870, 873, 877, 878, 879, 886, 888, 892, 895, 896, 902, 903, 905, 907, 917, 920, 923, 924, 928, 930, 931, 932, 935, 944, 945, 949, 953, 954, 956, 958, 961, 965, 969, 974, 984, 985, 986, 991, 996, 998, 1000, 1001, 1008, 1009, 1014, 1017, 1018, 1019, 1020, 1022, 1023, 1026, 1027, 1028, 1031, 1039, 1042, 1044, 1046, 1058, 1059, 1061, 1063, 1064, 1067, 1068, 1071, 1072, 1073, 1079, 1080, 1081, 1084, 1086, 1092, 1100, 1101, 1103, 1104, 1105, 1109, 1115, 1117, 1118, 1119, 1121, 1123, 1126, 1128, 1131, 1136, 1138 ] }
restaurant
How many American food restaurants are unpopular in Carmel?
American Food Restaurant refers to food_type = 'ameraican'; unpopular refers to min(review); Carmel refers to city = 'Carmel'
SELECT COUNT(id_restaurant) FROM generalinfo WHERE food_type = 'american' AND city = 'carmel' AND review = ( SELECT MIN(review) FROM generalinfo WHERE food_type = 'american' AND city = 'carmel' )
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,707
1,707
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, food_type TEXT null, city TEXT null, review REAL null, foreign key city references geographiccity on update cascade on delete cascade )
[ "AND", "SELECT", "MIN", "COUNT", "FROM" ]
9
simple
{ "case_1": [ 1073 ], "case_2": [ 1073 ], "case_3": [ 275, 311, 316, 334, 524, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 4, 5, 6, 8, 9, 10, 11, 12, 13, 15, 16, 19, 20, 21, 22, 24, 25, 26, 27, 28, 30, 32, 33, 35, 36, 37, 38, 39, 40, 43, 44, 45, 47, 50, 51, 52, 53, 55, 56, 57, 61, 62, 63, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 82, 85, 86, 87, 88, 89, 90, 91, 93, 95, 96, 98, 99, 100, 106, 108, 109, 111, 112, 113, 115, 116, 117, 118, 119, 121, 124, 125, 126, 127, 128, 129, 131, 138, 140, 141, 142, 143, 144, 146, 147, 148, 152, 154, 157, 158, 159, 160, 163, 164, 167, 168, 169, 170, 172, 173, 175, 176, 177, 179, 180, 182, 183, 184, 185, 187, 188, 189, 190, 191, 192, 196, 197, 198, 199, 200, 202, 203, 206, 210, 212, 214, 216, 219, 223, 224, 225, 226, 227, 229, 230, 233, 234, 239, 240, 243, 244, 247, 252, 254, 255, 256, 258, 259, 261, 262, 265, 266, 267, 268, 269, 270, 271, 272, 273, 275, 276, 277, 278, 282, 286, 291, 293, 294, 296, 299, 301, 303, 305, 306, 311, 314, 315, 316, 317, 319, 320, 323, 325, 330, 334, 335, 336, 338, 339, 341, 344, 345, 348, 349, 350, 352, 354, 355, 356, 358, 359, 360, 361, 362, 364, 367, 368, 370, 371, 373, 374, 375, 376, 380, 382, 383, 384, 385, 391, 392, 393, 394, 395, 398, 399, 401, 402, 403, 404, 405, 406, 408, 409, 410, 411, 412, 413, 414, 416, 417, 418, 419, 420, 421, 423, 424, 425, 426, 427, 428, 433, 436, 437, 438, 439, 440, 443, 444, 445, 446, 447, 448, 451, 452, 453, 454, 455, 458, 460, 462, 463, 464, 465, 466, 467, 469, 470, 471, 473, 475, 476, 477, 478, 480, 481, 482, 484, 485, 487, 488, 490, 492, 493, 494, 496, 497, 498, 500, 504, 505, 507, 509, 510, 512, 514, 515, 516, 517, 519, 520, 522, 524, 526, 528, 529, 530, 531, 532, 533, 535, 536, 537, 538, 539, 541, 542, 543, 544, 545, 547, 548, 551, 552, 554, 557, 558, 559, 560, 561, 562, 563, 564, 566, 573, 580, 581, 582, 584, 585, 586, 588, 589, 591, 594, 595, 596, 597, 598, 599, 601, 603, 605, 606, 608, 610, 611, 612, 613, 615, 618, 620, 622, 624, 625, 626, 627, 629, 630, 632, 633, 634, 637, 641, 643, 644, 645, 646, 648, 649, 651, 654, 656, 658, 659, 661, 662, 663, 664, 665, 666, 667, 668, 669, 671, 673, 675, 677, 678, 679, 680, 681, 683, 684, 685, 686, 687, 688, 689, 690, 692, 693, 694, 696, 697, 698, 699, 702, 703, 705, 707, 712, 714, 715, 716, 718, 719, 721, 726, 727, 730, 733, 734, 735, 736, 737, 739, 740, 741, 743, 746, 747, 748, 749, 750, 752, 753, 754, 756, 757, 758, 760, 762, 763, 765, 767, 768, 769, 770, 772, 773, 775, 776, 777, 778, 779, 780, 783, 785, 787, 788, 790, 793, 794, 795, 796, 797, 798, 799, 800, 802, 804, 806, 807, 808, 810, 811, 812, 813, 814, 817, 818, 819, 820, 821, 824, 825, 827, 829, 830, 831, 832, 835, 838, 839, 840, 841, 843, 844, 848, 849, 851, 853, 855, 857, 858, 859, 860, 861, 864, 865, 866, 867, 869, 870, 873, 874, 876, 877, 878, 879, 886, 888, 890, 892, 893, 894, 895, 896, 897, 898, 899, 901, 902, 903, 905, 907, 909, 911, 912, 913, 915, 917, 918, 920, 921, 922, 923, 924, 926, 927, 928, 930, 931, 932, 934, 935, 941, 942, 943, 944, 945, 949, 950, 951, 953, 954, 956, 958, 960, 961, 963, 965, 968, 969, 972, 974, 975, 976, 977, 981, 983, 985, 986, 991, 993, 996, 998, 1000, 1001, 1005, 1006, 1008, 1009, 1010, 1011, 1013, 1014, 1015, 1017, 1018, 1019, 1020, 1022, 1023, 1027, 1030, 1031, 1037, 1039, 1040, 1042, 1043, 1044, 1046, 1047, 1050, 1051, 1053, 1055, 1057, 1058, 1059, 1061, 1062, 1063, 1064, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1084, 1085, 1086, 1087, 1090, 1092, 1094, 1096, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1112, 1113, 1115, 1116, 1117, 1119, 1121, 1123, 1124, 1126, 1127, 1128, 1131, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
What is the percentage of restaurants that serve American food in Dublin city?
American food refers to food_type = 'american food'; percentage = divide(count(id_restaurant), count(id_restaurant where food_type = 'american food')) where city = 'dublin' * 100%
SELECT CAST(SUM(IIF(food_type = 'american food', 1, 0)) AS REAL) * 100 / COUNT(id_restaurant) FROM generalinfo WHERE city = 'dublin'
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,708
1,708
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, food_type TEXT null, city TEXT null, foreign key city references geographiccity on update cascade on delete cascade )
[ "AS", "SELECT", "SUM", "CAST", "COUNT", "FROM" ]
6
simple
{ "case_1": [ -1 ], "case_2": [ -1 ], "case_3": [ 311, 316, 334, 597, 669, 799, 886, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 4, 6, 10, 11, 16, 22, 24, 27, 30, 35, 36, 37, 39, 42, 47, 51, 53, 55, 61, 62, 63, 64, 68, 69, 71, 73, 74, 75, 77, 81, 82, 83, 86, 87, 88, 89, 91, 93, 94, 96, 98, 104, 106, 112, 113, 115, 117, 118, 119, 120, 121, 125, 126, 127, 129, 131, 140, 141, 142, 143, 146, 148, 152, 153, 155, 159, 160, 164, 167, 169, 170, 173, 175, 179, 183, 184, 186, 187, 188, 189, 190, 191, 192, 195, 196, 197, 199, 201, 202, 206, 207, 212, 213, 214, 215, 219, 223, 225, 226, 227, 228, 229, 233, 234, 236, 243, 244, 247, 248, 254, 256, 261, 264, 267, 268, 269, 271, 276, 277, 278, 279, 286, 299, 300, 301, 303, 304, 311, 313, 314, 316, 317, 319, 320, 322, 323, 325, 330, 334, 335, 336, 338, 339, 341, 344, 345, 347, 349, 354, 356, 358, 360, 363, 364, 365, 367, 370, 373, 374, 375, 378, 379, 380, 381, 382, 383, 384, 391, 392, 394, 401, 402, 403, 406, 409, 411, 412, 415, 416, 417, 423, 424, 426, 427, 436, 438, 443, 444, 445, 447, 448, 450, 451, 452, 453, 454, 458, 460, 462, 464, 465, 466, 467, 469, 470, 471, 473, 476, 477, 478, 483, 484, 485, 486, 487, 488, 490, 493, 500, 504, 505, 506, 509, 510, 515, 516, 517, 518, 519, 520, 526, 527, 532, 535, 536, 537, 538, 540, 542, 544, 547, 548, 550, 552, 558, 559, 560, 563, 564, 566, 571, 573, 575, 579, 580, 581, 582, 595, 596, 597, 606, 608, 609, 611, 612, 613, 620, 623, 627, 628, 630, 632, 633, 634, 638, 640, 641, 645, 646, 649, 650, 654, 658, 659, 661, 662, 663, 665, 666, 668, 669, 671, 676, 681, 682, 686, 687, 688, 690, 694, 695, 696, 701, 705, 710, 712, 714, 717, 721, 723, 727, 733, 734, 735, 736, 739, 740, 743, 744, 745, 747, 749, 750, 752, 753, 756, 760, 762, 768, 769, 772, 776, 777, 778, 779, 787, 788, 790, 795, 796, 797, 798, 799, 800, 802, 804, 808, 810, 812, 813, 814, 818, 819, 823, 824, 825, 827, 830, 832, 838, 839, 841, 848, 849, 851, 853, 857, 866, 867, 868, 870, 871, 874, 876, 877, 886, 888, 893, 894, 896, 897, 898, 901, 902, 909, 911, 912, 913, 915, 917, 918, 922, 923, 924, 926, 927, 929, 930, 934, 935, 941, 943, 944, 950, 951, 954, 956, 958, 959, 961, 962, 963, 969, 973, 975, 977, 981, 985, 986, 993, 996, 998, 1004, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1022, 1023, 1027, 1031, 1037, 1038, 1042, 1043, 1047, 1050, 1051, 1058, 1062, 1064, 1067, 1068, 1069, 1070, 1071, 1072, 1075, 1078, 1082, 1084, 1086, 1087, 1092, 1094, 1098, 1100, 1101, 1103, 1104, 1106, 1112, 1113, 1119, 1121, 1123, 1124, 1128, 1131, 1133, 1134, 1135, 1137 ] }
restaurant
What is the full address of Albert's Café?
full address = street_num, street_name, city; Albert's Café refers to label = 'Albert's Café'
SELECT T2.street_num, T2.street_name, T1.city FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.label = 'Albert''s Café'
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,709
1,709
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, label TEXT null, city TEXT null, foreign key city references geographiccity on update cascade on delete cascade ) CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key city references geographic city on update cascade on delete cascade, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "AS", "SELECT", "INNER JOIN", "ON", "FROM" ]
6
simple
{ "case_1": [ 217, 275, 524, 590, 799, 895 ], "case_2": [ 217, 275, 524, 590, 799, 886, 895 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 35, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 104, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 192, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 215, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 271, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 286, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 462, 463, 464, 465, 466, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 504, 505, 506, 507, 508, 509, 510, 511, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 526, 527, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 542, 544, 547, 548, 550, 552, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 657, 658, 659, 660, 661, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 786, 787, 788, 790, 792, 793, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 978, 980, 981, 982, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1004, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1074, 1075, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1113, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
What are the restaurants that are located at "19th St. Oakland"?
restaurant refers to label; "19th St. Oakland" refers to street_name = '19th St' AND city = 'Oakland'
SELECT T1.id_restaurant FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'Oakland' AND T2.street_name = '19th St'
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,710
1,710
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, city TEXT null, foreign key city references geographiccity on update cascade on delete cascade ) CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, street_name TEXT null, city TEXT null, foreign key city references geographic city on update cascade on delete cascade, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "AS", "AND", "SELECT", "INNER JOIN", "ON", "FROM" ]
7
simple
{ "case_1": [ 217, 275, 524, 590, 799, 895 ], "case_2": [ 217, 275, 524, 590, 799, 886, 895 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 88, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 264, 265, 266, 267, 268, 269, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 444, 445, 446, 447, 448, 449, 450, 451, 452, 454, 455, 456, 457, 459, 460, 462, 463, 464, 465, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 505, 507, 509, 510, 511, 514, 515, 516, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 544, 547, 548, 550, 552, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1071, 1072, 1074, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
What kind of restaurants can be found at "106 E 25th Ave"?
kind of restaurant refers to food_type; "106 E 25th Ave" refers to street_name = 'e 25th ave'
SELECT T1.food_type FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.street_num = 106 AND T2.street_name = 'e 25th ave'
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,711
1,711
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, food_type TEXT null ) CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "AS", "AND", "SELECT", "INNER JOIN", "ON", "FROM" ]
7
simple
{ "case_1": [ 217, 275, 524, 590, 799, 895 ], "case_2": [ 217, 275, 524, 590, 799, 886, 895 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 88, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 264, 265, 266, 267, 268, 269, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 444, 445, 446, 447, 448, 449, 450, 451, 452, 454, 455, 456, 457, 459, 460, 462, 463, 464, 465, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 505, 507, 509, 510, 511, 514, 515, 516, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 544, 547, 548, 550, 552, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1071, 1072, 1074, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
Please name any three restaurants that have an unidentified region.
restaurant name refers to label; unidentified region refers to region = 'unknown'
SELECT T2.label FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant INNER JOIN geographic AS T3 ON T2.city = T3.city WHERE T3.region = 'unknown' LIMIT 3
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,712
1,712
CREATE TABLE `geographic` ( city TEXT not null primary key, region TEXT null ) CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, label TEXT null, city TEXT null, foreign key city references geographiccity on update cascade on delete cascade ) CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, city TEXT null, foreign key city references geographic city on update cascade on delete cascade, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "AS", "SELECT", "LIMIT", "INNER JOIN", "ON", "FROM" ]
10
simple
{ "case_1": [ -1 ], "case_2": [ -1 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 88, 89, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 264, 265, 266, 267, 268, 269, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 286, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 304, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 368, 369, 370, 373, 374, 375, 376, 378, 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 444, 445, 446, 447, 448, 449, 450, 451, 452, 454, 455, 456, 457, 459, 460, 462, 463, 464, 465, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 505, 507, 509, 511, 514, 515, 516, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 542, 544, 547, 548, 550, 552, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 796, 797, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 999, 1000, 1001, 1003, 1004, 1005, 1006, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1071, 1072, 1074, 1075, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1114, 1115, 1116, 1118, 1119, 1122, 1123, 1124, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
What is the name of the Chinese restaurant that can be found at 104 San Tomas Aquino Road, Campbell?
restaurant name refers to label; Chinese restaurant refers to food_type = 'chinese'; 104 San Tomas Aquino Road Campbell refers to street_num = 104 AND street_name = 'san tomas aquino road' AND city = 'campbell'
SELECT T1.label FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.street_num = 104 AND T1.city = 'campbell' AND T2.street_name = 'san tomas aquino road'
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,713
1,713
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, label TEXT null, city TEXT null, foreign key city references geographiccity on update cascade on delete cascade ) CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key city references geographic city on update cascade on delete cascade, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "AS", "AND", "SELECT", "INNER JOIN", "ON", "FROM" ]
8
simple
{ "case_1": [ 217, 275, 524, 590, 799, 895 ], "case_2": [ 217, 275, 524, 590, 799, 886, 895 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 88, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 264, 265, 266, 267, 268, 269, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 444, 445, 446, 447, 448, 449, 450, 451, 452, 454, 455, 456, 457, 459, 460, 462, 463, 464, 465, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 505, 507, 509, 510, 511, 514, 515, 516, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 544, 547, 548, 550, 552, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1071, 1072, 1074, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
How many Thai restaurants can be found in San Pablo Ave, Albany?
Thai restaurant refers to food_type = 'thai'; San Pablo Ave Albany refers to street_name = 'san pablo ave' AND T1.city = 'albany'
SELECT COUNT(T1.id_restaurant) FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.food_type = 'thai' AND T1.city = 'albany' AND T2.street_name = 'san pablo ave'
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,714
1,714
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, food_type TEXT null, city TEXT null, foreign key city references geographiccity on update cascade on delete cascade ) CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, street_name TEXT null, city TEXT null, foreign key city references geographic city on update cascade on delete cascade, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "AS", "AND", "SELECT", "INNER JOIN", "ON", "COUNT", "FROM" ]
9
simple
{ "case_1": [ 217, 275, 524, 590, 799, 895 ], "case_2": [ 217, 275, 524, 590, 799, 886, 895 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 32, 33, 34, 35, 36, 37, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 109, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 192, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 230, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 259, 260, 261, 262, 264, 265, 266, 267, 268, 269, 271, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 286, 287, 289, 290, 292, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 399, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 462, 463, 464, 465, 466, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 504, 505, 507, 509, 510, 511, 512, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 542, 544, 547, 548, 550, 552, 554, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 618, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 665, 666, 667, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 680, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 692, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 707, 710, 711, 712, 714, 715, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 730, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 817, 818, 819, 820, 822, 823, 824, 825, 827, 828, 829, 830, 831, 832, 833, 834, 835, 837, 838, 839, 841, 843, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 903, 904, 905, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 945, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 965, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1019, 1020, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1074, 1078, 1079, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1113, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1126, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
What is the county and region of Plearn-Thai Cuisine restaurant?
Plearn-Thai Cuisine restaurant refers to label = 'plearn-thai cuisine'
SELECT T1.county, T1.region, T2.label FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.label = 'plearn-thai cuisine'
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,715
1,715
CREATE TABLE `geographic` ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE `generalinfo` ( label TEXT null, city TEXT null, foreign key city references geographiccity on update cascade on delete cascade )
[ "AS", "SELECT", "-", "INNER JOIN", "ON", "FROM" ]
7
simple
{ "case_1": [ 316 ], "case_2": [ 316, 334, 669, 934, 981 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 88, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 264, 265, 266, 267, 268, 269, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 304, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 368, 369, 370, 373, 374, 375, 376, 378, 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 444, 445, 446, 447, 448, 449, 450, 451, 452, 454, 455, 456, 457, 459, 460, 462, 463, 464, 465, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 505, 507, 509, 510, 511, 514, 515, 516, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 544, 547, 548, 550, 552, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 999, 1000, 1001, 1003, 1005, 1006, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1070, 1071, 1072, 1074, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1114, 1115, 1116, 1118, 1119, 1122, 1123, 1124, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
What is the name of the restaurant that is located in El Dorado County, Lake Tahoe region?
restaurant name refers to label
SELECT T2.label FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.region = 'lake tahoe' AND T1.county = 'el dorado county'
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,716
1,716
CREATE TABLE `geographic` ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE `generalinfo` ( label TEXT null, city TEXT null, foreign key city references geographiccity on update cascade on delete cascade )
[ "AS", "AND", "SELECT", "INNER JOIN", "ON", "FROM" ]
7
simple
{ "case_1": [ 316 ], "case_2": [ 316, 334, 669, 934, 981 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 88, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 264, 265, 266, 267, 268, 269, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 444, 445, 446, 447, 448, 449, 450, 451, 452, 454, 455, 456, 457, 459, 460, 462, 463, 464, 465, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 505, 507, 509, 510, 511, 514, 515, 516, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 544, 547, 548, 550, 552, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1071, 1072, 1074, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
Which county and region does the street E. El Camino Real belong to?
street E. El Camino Real refers to street_name = 'E. El Camino Real'
SELECT DISTINCT T2.county, T2.region FROM location AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.street_name = 'E. El Camino Real'
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,717
1,717
CREATE TABLE `geographic` ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE `location` ( street_name TEXT null, city TEXT null, foreign key city references geographic city on update cascade on delete cascade )
[ "AS", "SELECT", "INNER JOIN", "ON", "FROM" ]
6
simple
{ "case_1": [ 597 ], "case_2": [ 311, 597 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 35, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 104, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 192, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 215, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 271, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 286, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 462, 463, 464, 465, 466, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 504, 505, 506, 507, 508, 509, 510, 511, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 526, 527, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 542, 544, 547, 548, 550, 552, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 657, 658, 659, 660, 661, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 786, 787, 788, 790, 792, 793, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 978, 980, 981, 982, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1004, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1074, 1075, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1113, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
What is the name of the least popular Indian restaurant on Shattuck Avenue in Berkeley?
restaurant name refers to label; the least popular refers to min(review); Indian restaurant refers to food_type = 'Indian restaurant'; Shattuck Avenue in Berkeley refers to street_name = 'shattuck ave' and city = 'berkeley'
SELECT T1.id_restaurant FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'berkeley' AND T2.street_name = 'shattuck ave' AND T1.food_type = 'Indian restaurant' ORDER BY T1.review LIMIT 1
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,718
1,718
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, food_type TEXT null, city TEXT null, review REAL null, foreign key city references geographiccity on update cascade on delete cascade ) CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, street_name TEXT null, city TEXT null, foreign key city references geographic city on update cascade on delete cascade, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "AS", "AND", "SELECT", "ORDER BY", "LIMIT", "INNER JOIN", "ON", "FROM" ]
10
simple
{ "case_1": [ 217, 275, 524, 590, 799, 895 ], "case_2": [ 217, 275, 524, 590, 799, 886, 895 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 36, 37, 38, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 88, 89, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 264, 265, 266, 267, 268, 269, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 286, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 304, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 368, 369, 370, 373, 374, 375, 376, 378, 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 444, 445, 446, 448, 449, 450, 451, 452, 454, 455, 456, 457, 459, 460, 462, 463, 464, 465, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 505, 507, 509, 511, 514, 515, 516, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 542, 544, 547, 548, 550, 552, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 796, 797, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 934, 935, 936, 937, 938, 940, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 999, 1000, 1001, 1003, 1004, 1005, 1006, 1010, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1071, 1072, 1074, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1114, 1115, 1116, 1118, 1119, 1122, 1123, 1124, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
What is the percentage of restaurants in the Bay Area region that scored over 4 for the review rating?
scored over 4 refers to review > 4; percentage = divide(count(id_restaurant where region = 'bay area' and review > 4), count(id_restaurant where region = 'Bay Area')) * 100%
SELECT CAST(SUM(IIF(T2.review > 4, 1, 0)) AS REAL) * 100 / COUNT(T2.id_restaurant) FROM geographic AS T1 RIGHT JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.region = 'bay area'
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,719
1,719
CREATE TABLE `geographic` ( city TEXT not null primary key, region TEXT null ) CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, city TEXT null, review REAL null, foreign key city references geographiccity on update cascade on delete cascade )
[ "AS", "SELECT", "SUM", "ON", "CAST", "COUNT", "FROM" ]
9
simple
{ "case_1": [ 316 ], "case_2": [ 316, 334, 669, 934, 981 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 35, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 104, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 173, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 192, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 215, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 264, 265, 266, 267, 268, 269, 271, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 286, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 462, 463, 464, 465, 466, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 504, 505, 506, 507, 509, 510, 511, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 526, 527, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 542, 544, 547, 548, 550, 552, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 661, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1004, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1074, 1075, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1113, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
List every city in San Mateo County.
SELECT city FROM geographic WHERE county = 'san mateo county'
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,720
1,720
CREATE TABLE `geographic` ( city TEXT not null primary key, county TEXT null )
[ "SELECT", "FROM" ]
2
simple
{ "case_1": [ 332, 972 ], "case_2": [ 332, 972 ], "case_3": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141 ] }
restaurant
How many restaurants have more than 4 star reviews?
more than 4 star review refers to review > 4
SELECT COUNT(id_restaurant) AS cnt FROM generalinfo WHERE review > 4
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,721
1,721
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, review REAL null )
[ "COUNT", "AS", "SELECT", "FROM" ]
4
simple
{ "case_1": [ -1 ], "case_2": [ -1 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 104, 105, 106, 107, 108, 109, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 124, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 150, 151, 152, 153, 154, 155, 157, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 173, 175, 176, 177, 178, 179, 180, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 206, 207, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 223, 224, 225, 226, 227, 228, 229, 230, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 252, 254, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 271, 272, 273, 275, 276, 277, 278, 279, 280, 281, 282, 284, 286, 287, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 352, 353, 354, 356, 357, 358, 359, 360, 361, 363, 364, 365, 367, 368, 369, 370, 371, 373, 374, 375, 376, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 399, 401, 402, 403, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 462, 463, 464, 465, 466, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 526, 527, 528, 529, 530, 531, 532, 533, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 547, 548, 550, 552, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 600, 601, 602, 603, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 618, 620, 621, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 710, 711, 712, 714, 715, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 730, 733, 734, 735, 736, 737, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 786, 787, 788, 790, 792, 793, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 817, 818, 819, 820, 821, 822, 823, 824, 825, 827, 828, 829, 830, 831, 832, 833, 834, 835, 837, 838, 839, 841, 843, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 865, 866, 867, 868, 869, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 942, 943, 944, 945, 949, 950, 951, 952, 953, 954, 956, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 980, 981, 982, 983, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1004, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1019, 1020, 1022, 1023, 1025, 1027, 1029, 1030, 1031, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1090, 1091, 1092, 1094, 1095, 1096, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1113, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
Which street has the most restaurants?
street refers to street_name; the most restaurants refers to max(count(street_name))
SELECT street_name FROM location GROUP BY street_name ORDER BY COUNT(street_name) DESC LIMIT 1
CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,722
1,722
CREATE TABLE `location` ( street_name TEXT null )
[ "GROUP BY", "SELECT", "ORDER BY", "LIMIT", "COUNT", "FROM", "DESC" ]
7
simple
{ "case_1": [ -1 ], "case_2": [ -1 ], "case_3": [ 275, 311, 334, 590, 669, 886, 934, 972, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 1, 10, 11, 13, 15, 17, 20, 22, 28, 29, 36, 38, 43, 49, 55, 59, 62, 69, 73, 75, 78, 86, 89, 108, 115, 121, 125, 126, 133, 138, 140, 142, 143, 150, 159, 162, 163, 167, 169, 173, 174, 179, 181, 182, 185, 187, 188, 191, 199, 202, 206, 208, 213, 214, 229, 233, 247, 252, 262, 263, 275, 278, 281, 285, 286, 291, 309, 311, 313, 314, 319, 320, 324, 329, 334, 336, 337, 341, 342, 344, 345, 348, 349, 352, 353, 356, 359, 364, 365, 371, 373, 378, 379, 381, 385, 394, 395, 400, 403, 404, 409, 411, 424, 428, 429, 434, 435, 444, 445, 451, 454, 460, 462, 466, 469, 473, 481, 482, 495, 497, 505, 530, 532, 534, 536, 538, 542, 548, 552, 555, 560, 566, 567, 576, 578, 579, 583, 584, 586, 590, 592, 595, 611, 619, 621, 625, 626, 630, 634, 637, 638, 645, 654, 657, 659, 664, 665, 669, 681, 688, 690, 691, 696, 698, 701, 703, 708, 713, 718, 719, 721, 732, 733, 735, 743, 748, 752, 759, 760, 768, 778, 779, 790, 803, 810, 815, 817, 818, 823, 827, 830, 836, 850, 851, 861, 866, 869, 876, 886, 889, 891, 893, 901, 911, 918, 927, 929, 934, 946, 950, 951, 954, 956, 962, 963, 966, 967, 970, 972, 973, 975, 977, 981, 983, 987, 989, 993, 994, 1004, 1005, 1006, 1010, 1013, 1017, 1024, 1025, 1030, 1034, 1037, 1038, 1043, 1047, 1049, 1050, 1051, 1056, 1057, 1065, 1067, 1068, 1070, 1076, 1077, 1083, 1094, 1106, 1124, 1135, 1137, 1139, 1141 ] }
restaurant
Which chicken restaurant has the highest review?
chicken restaurant refers to food_type = 'chicken'; the highest review refers to max(review)
SELECT label FROM generalinfo WHERE food_type = 'chicken' ORDER BY review DESC LIMIT 1
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,723
1,723
CREATE TABLE `generalinfo` ( label TEXT null, food_type TEXT null, review REAL null )
[ "SELECT", "ORDER BY", "LIMIT", "FROM", "DESC" ]
5
simple
{ "case_1": [ -1 ], "case_2": [ -1 ], "case_3": [ 275, 311, 334, 590, 669, 886, 934, 972, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 1, 10, 11, 13, 15, 17, 20, 28, 29, 36, 38, 43, 49, 55, 59, 62, 69, 73, 75, 78, 86, 89, 108, 110, 121, 125, 133, 138, 150, 159, 162, 163, 167, 173, 174, 179, 181, 185, 187, 188, 199, 200, 202, 206, 208, 213, 229, 233, 239, 247, 252, 262, 263, 275, 278, 281, 285, 286, 291, 309, 311, 313, 314, 319, 320, 324, 328, 329, 334, 336, 337, 341, 342, 345, 348, 349, 352, 353, 356, 359, 364, 365, 371, 373, 378, 379, 381, 385, 394, 395, 400, 403, 404, 409, 411, 428, 429, 434, 435, 444, 445, 451, 454, 460, 462, 469, 482, 495, 497, 505, 530, 532, 534, 536, 538, 542, 548, 552, 555, 560, 566, 567, 576, 578, 579, 583, 584, 586, 590, 592, 595, 611, 619, 621, 625, 626, 634, 637, 638, 645, 654, 657, 659, 664, 665, 669, 681, 688, 690, 691, 698, 701, 703, 708, 713, 719, 732, 733, 735, 748, 752, 759, 760, 768, 778, 790, 803, 810, 815, 818, 823, 827, 830, 836, 850, 851, 861, 866, 869, 876, 886, 889, 891, 893, 901, 911, 918, 927, 929, 934, 946, 950, 951, 953, 954, 956, 962, 963, 966, 967, 970, 972, 973, 975, 977, 981, 983, 987, 989, 994, 1004, 1005, 1006, 1010, 1013, 1017, 1024, 1025, 1030, 1034, 1037, 1038, 1047, 1049, 1050, 1051, 1056, 1057, 1065, 1067, 1068, 1075, 1076, 1077, 1083, 1094, 1124, 1137, 1139, 1141 ] }
restaurant
Which county is El Cerrito from?
El Cerrito refers to city = 'el cerrito'
SELECT county FROM geographic WHERE city = 'el cerrito'
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,724
1,724
CREATE TABLE `geographic` ( city TEXT not null primary key, county TEXT null )
[ "SELECT", "FROM" ]
2
simple
{ "case_1": [ 332, 972 ], "case_2": [ 332, 972 ], "case_3": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141 ] }
restaurant
How many restaurants are on Irving Street?
Irving Street refers to street_name = 'irving'
SELECT COUNT(id_restaurant) FROM location WHERE street_name = 'irving'
CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,725
1,725
CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, street_name TEXT null, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "COUNT", "SELECT", "FROM" ]
3
simple
{ "case_1": [ 442, 603 ], "case_2": [ 442, 603 ], "case_3": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141 ] }
restaurant
Provide a list of restaurants from Marin county.
restaurant refers to label
SELECT T1.label FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.county = 'marin county'
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,726
1,726
CREATE TABLE `geographic` ( city TEXT not null primary key, county TEXT null ) CREATE TABLE `generalinfo` ( label TEXT null, city TEXT null, foreign key city references geographiccity on update cascade on delete cascade )
[ "AS", "SELECT", "INNER JOIN", "ON", "FROM" ]
6
simple
{ "case_1": [ 316 ], "case_2": [ 316, 334, 669, 934, 981 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 35, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 104, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 192, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 215, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 271, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 286, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 462, 463, 464, 465, 466, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 504, 505, 506, 507, 508, 509, 510, 511, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 526, 527, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 542, 544, 547, 548, 550, 552, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 657, 658, 659, 660, 661, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 786, 787, 788, 790, 792, 793, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 978, 980, 981, 982, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1004, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1074, 1075, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1113, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
What is the address of the Peking Duck restaurant?
address refers to street_num, street_name; Peking Duck restaurant refers to label = 'peking duck restaurant'
SELECT T2.street_name FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.label = 'peking duck restaurant'
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,727
1,727
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, label TEXT null ) CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, street_name TEXT null, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "AS", "SELECT", "INNER JOIN", "ON", "FROM" ]
6
simple
{ "case_1": [ 217, 275, 524, 590, 799, 895 ], "case_2": [ 217, 275, 524, 590, 799, 886, 895 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 35, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 104, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 192, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 215, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 271, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 286, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 462, 463, 464, 465, 466, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 504, 505, 506, 507, 508, 509, 510, 511, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 526, 527, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 542, 544, 547, 548, 550, 552, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 657, 658, 659, 660, 661, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 786, 787, 788, 790, 792, 793, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 978, 980, 981, 982, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1004, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1074, 1075, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1113, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
List all the streets with more than 10 restaurants in Alameda county.
street refers to street_name; more than 10 restaurants refers to count(id_restaurant) > 10
SELECT T2.street_name FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city WHERE T1.county = 'alameda county' GROUP BY T2.street_name HAVING COUNT(T2.id_restaurant) > 10
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,728
1,728
CREATE TABLE `geographic` ( city TEXT not null primary key, county TEXT null ) CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, street_name TEXT null, city TEXT null, foreign key city references geographic city on update cascade on delete cascade, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "GROUP BY", "AS", "SELECT", "HAVING", "INNER JOIN", "ON", "COUNT", "FROM" ]
9
simple
{ "case_1": [ 597 ], "case_2": [ 311, 597 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 3, 4, 5, 6, 7, 8, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 88, 89, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 179, 180, 182, 183, 184, 186, 187, 188, 189, 190, 191, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 264, 265, 266, 267, 268, 269, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 286, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 304, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 368, 369, 370, 373, 374, 375, 376, 378, 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 444, 445, 446, 447, 448, 449, 450, 451, 452, 454, 455, 456, 457, 459, 460, 462, 463, 464, 465, 466, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 505, 507, 509, 511, 514, 515, 516, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 542, 544, 547, 548, 550, 552, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 718, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 796, 797, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 817, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 999, 1000, 1001, 1003, 1005, 1006, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1070, 1071, 1072, 1074, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1114, 1115, 1116, 1118, 1119, 1122, 1123, 1124, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
What are the regions with Greek restaurants?
Greek restaurant refers to food_type = 'greek'
SELECT DISTINCT T1.region FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.food_type = 'greek'
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,729
1,729
CREATE TABLE `geographic` ( city TEXT not null primary key, region TEXT null ) CREATE TABLE `generalinfo` ( food_type TEXT null, city TEXT null, foreign key city references geographiccity on update cascade on delete cascade )
[ "AS", "SELECT", "INNER JOIN", "ON", "FROM" ]
6
simple
{ "case_1": [ 316 ], "case_2": [ 316, 334, 669, 934, 981 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 35, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 104, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 192, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 215, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 271, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 286, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 462, 463, 464, 465, 466, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 504, 505, 506, 507, 508, 509, 510, 511, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 526, 527, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 542, 544, 547, 548, 550, 552, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 657, 658, 659, 660, 661, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 786, 787, 788, 790, 792, 793, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 978, 980, 981, 982, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1004, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1074, 1075, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1113, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
List all of the restaurant addresses from an unknown region.
restaurant address refers to street_num, street_name; unknown region refers to region = 'unknown'
SELECT T2.street_name FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city WHERE T1.region = 'unknown'
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,730
1,730
CREATE TABLE `geographic` ( city TEXT not null primary key, region TEXT null ) CREATE TABLE `location` ( street_name TEXT null, city TEXT null, foreign key city references geographic city on update cascade on delete cascade )
[ "AS", "SELECT", "INNER JOIN", "ON", "FROM" ]
6
simple
{ "case_1": [ 597 ], "case_2": [ 311, 597 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 35, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 104, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 192, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 215, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 271, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 286, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 462, 463, 464, 465, 466, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 504, 505, 506, 507, 508, 509, 510, 511, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 526, 527, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 542, 544, 547, 548, 550, 552, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 657, 658, 659, 660, 661, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 786, 787, 788, 790, 792, 793, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 978, 980, 981, 982, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1004, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1074, 1075, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1113, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
What is the review of the restaurant at 8440 Murray Ave?
8440 Murray Ave refers to street_num = 8440 and street_name = 'murray ave'
SELECT T2.review FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.street_name = 'murray ave' AND T1.street_num = 8440
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,731
1,731
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, review REAL null ) CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "AS", "AND", "SELECT", "INNER JOIN", "ON", "FROM" ]
7
simple
{ "case_1": [ 217, 275, 524, 590, 799, 895 ], "case_2": [ 217, 275, 524, 590, 799, 886, 895 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 88, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 264, 265, 266, 267, 268, 269, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 444, 445, 446, 447, 448, 449, 450, 451, 452, 454, 455, 456, 457, 459, 460, 462, 463, 464, 465, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 505, 507, 509, 510, 511, 514, 515, 516, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 544, 547, 548, 550, 552, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1071, 1072, 1074, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
What type of restaurant is most common in Monterey county?
type refers to food_type; most common refers to max(count(food_type))
SELECT T2.food_type FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.county = 'Monterey' GROUP BY T2.food_type ORDER BY COUNT(T2.food_type) DESC LIMIT 1
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,732
1,732
CREATE TABLE `geographic` ( city TEXT not null primary key, county TEXT null ) CREATE TABLE `generalinfo` ( food_type TEXT null, city TEXT null, foreign key city references geographiccity on update cascade on delete cascade )
[ "GROUP BY", "AS", "SELECT", "ORDER BY", "LIMIT", "INNER JOIN", "ON", "DESC", "COUNT", "FROM" ]
11
medium
{ "case_1": [ 334, 669, 934, 981 ], "case_2": [ 316, 334, 669, 934, 981 ], "case_3": [ 275, 311, 316, 334, 590, 597, 669, 799, 886, 934, 972, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 4, 6, 10, 11, 13, 15, 16, 20, 22, 27, 28, 29, 30, 36, 37, 47, 49, 51, 53, 55, 59, 62, 63, 68, 69, 73, 74, 75, 77, 78, 82, 86, 88, 89, 91, 93, 96, 98, 106, 108, 113, 115, 117, 118, 119, 121, 125, 126, 131, 138, 140, 142, 143, 146, 148, 150, 152, 159, 160, 162, 163, 164, 167, 169, 170, 173, 175, 179, 183, 184, 185, 187, 188, 189, 190, 191, 196, 197, 199, 200, 202, 206, 212, 213, 214, 225, 226, 227, 229, 233, 234, 239, 243, 244, 247, 252, 254, 256, 261, 262, 267, 268, 269, 275, 276, 277, 278, 281, 285, 286, 291, 299, 301, 309, 311, 313, 314, 316, 317, 319, 320, 323, 324, 325, 329, 330, 334, 335, 336, 338, 339, 341, 342, 344, 345, 348, 349, 352, 353, 354, 356, 358, 359, 360, 364, 365, 370, 371, 373, 374, 375, 378, 379, 381, 382, 383, 384, 385, 391, 392, 394, 395, 401, 403, 406, 409, 411, 412, 416, 417, 424, 426, 428, 429, 434, 435, 436, 444, 445, 448, 451, 454, 460, 462, 464, 465, 467, 469, 471, 473, 476, 477, 478, 482, 484, 487, 488, 490, 493, 495, 497, 500, 505, 509, 515, 516, 519, 520, 526, 530, 532, 535, 536, 537, 538, 542, 544, 547, 548, 552, 558, 559, 560, 563, 564, 566, 567, 573, 578, 579, 580, 581, 582, 584, 586, 590, 592, 595, 596, 597, 606, 608, 611, 613, 620, 621, 625, 626, 627, 630, 632, 633, 634, 637, 638, 641, 645, 646, 649, 651, 654, 657, 658, 659, 662, 663, 664, 665, 668, 669, 671, 681, 687, 688, 690, 691, 694, 696, 698, 701, 703, 705, 712, 714, 719, 720, 721, 727, 733, 734, 735, 736, 739, 740, 743, 748, 749, 750, 751, 752, 753, 756, 759, 760, 762, 768, 769, 772, 778, 779, 787, 790, 796, 797, 799, 800, 802, 803, 804, 810, 812, 813, 814, 818, 819, 823, 824, 827, 830, 838, 839, 841, 849, 850, 851, 853, 857, 861, 866, 867, 869, 870, 874, 876, 877, 882, 886, 888, 889, 891, 893, 896, 897, 898, 901, 902, 909, 911, 912, 915, 917, 918, 922, 923, 924, 926, 927, 929, 930, 932, 934, 935, 943, 950, 951, 953, 954, 956, 958, 961, 962, 963, 966, 967, 969, 970, 972, 973, 975, 977, 981, 983, 985, 986, 987, 993, 994, 996, 1004, 1005, 1006, 1010, 1013, 1015, 1017, 1022, 1023, 1025, 1030, 1034, 1037, 1038, 1042, 1043, 1047, 1049, 1050, 1051, 1056, 1057, 1058, 1062, 1064, 1065, 1067, 1068, 1071, 1072, 1076, 1077, 1078, 1082, 1084, 1086, 1087, 1091, 1094, 1100, 1101, 1103, 1104, 1106, 1112, 1119, 1123, 1124, 1128, 1131, 1133, 1134, 1135, 1137 ] }
restaurant
Which street in San Francisco has the most burger restaurants?
street refers to street_name; San Francisco refers to city = 'san francisco'; burger restaurant refers to food_type = 'burgers'; the most burger restaurants refers to max(count(street_name where food_type = 'burgers' and city = 'san francisco'))
SELECT T2.street_name FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'san francisco' AND T1.food_type = 'burgers' GROUP BY T2.street_name ORDER BY COUNT(T2.id_restaurant) DESC LIMIT 1
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,733
1,733
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, food_type TEXT null, city TEXT null, foreign key city references geographiccity on update cascade on delete cascade ) CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, street_name TEXT null, city TEXT null, foreign key city references geographic city on update cascade on delete cascade, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "GROUP BY", "AS", "AND", "SELECT", "ORDER BY", "LIMIT", "INNER JOIN", "ON", "DESC", "COUNT", "FROM" ]
12
medium
{ "case_1": [ 886 ], "case_2": [ 275, 524, 590, 799, 886, 895 ], "case_3": [ 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 972, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 4, 5, 6, 8, 10, 11, 12, 13, 15, 16, 19, 20, 21, 22, 24, 26, 27, 28, 29, 30, 33, 36, 37, 38, 39, 44, 45, 47, 49, 51, 52, 53, 55, 57, 59, 62, 63, 66, 68, 69, 71, 73, 74, 75, 76, 77, 78, 82, 85, 86, 88, 89, 90, 91, 93, 95, 96, 98, 99, 106, 108, 111, 112, 113, 115, 116, 117, 118, 119, 121, 125, 126, 127, 128, 129, 131, 138, 140, 141, 142, 143, 144, 146, 148, 150, 152, 154, 158, 159, 160, 162, 163, 164, 167, 169, 170, 172, 173, 175, 176, 177, 179, 180, 183, 184, 185, 187, 188, 189, 190, 191, 196, 197, 199, 200, 202, 206, 212, 213, 214, 219, 225, 226, 227, 229, 233, 234, 239, 240, 243, 244, 247, 252, 254, 256, 258, 261, 262, 265, 266, 267, 268, 269, 272, 275, 276, 277, 278, 281, 282, 285, 286, 291, 296, 299, 301, 309, 311, 313, 314, 315, 316, 317, 319, 320, 323, 324, 325, 329, 330, 334, 335, 336, 338, 339, 341, 342, 344, 345, 348, 349, 352, 353, 354, 356, 358, 359, 360, 361, 364, 365, 368, 370, 371, 373, 374, 375, 376, 378, 379, 381, 382, 383, 384, 385, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 408, 409, 411, 412, 413, 414, 416, 417, 419, 424, 425, 426, 427, 428, 429, 433, 434, 435, 436, 437, 438, 440, 444, 445, 446, 448, 451, 452, 454, 455, 460, 462, 463, 464, 465, 467, 469, 470, 471, 473, 475, 476, 477, 478, 480, 482, 484, 487, 488, 490, 493, 494, 495, 496, 497, 498, 500, 505, 507, 509, 514, 515, 516, 519, 520, 522, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 541, 542, 544, 547, 548, 552, 557, 558, 559, 560, 561, 562, 563, 564, 566, 567, 573, 578, 579, 580, 581, 582, 584, 586, 588, 589, 590, 592, 595, 596, 597, 605, 606, 608, 610, 611, 612, 613, 615, 620, 621, 624, 625, 626, 627, 630, 632, 633, 634, 637, 638, 641, 643, 645, 646, 648, 649, 651, 654, 657, 658, 659, 662, 663, 664, 665, 666, 668, 669, 671, 675, 677, 678, 681, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 696, 697, 698, 699, 701, 702, 703, 705, 712, 714, 715, 719, 720, 721, 726, 727, 733, 734, 735, 736, 739, 740, 741, 743, 746, 747, 748, 749, 750, 751, 752, 753, 754, 756, 758, 759, 760, 762, 763, 765, 767, 768, 769, 772, 773, 775, 776, 777, 778, 779, 780, 783, 787, 788, 790, 793, 796, 797, 799, 800, 802, 803, 804, 806, 807, 808, 810, 812, 813, 814, 818, 819, 823, 824, 825, 827, 829, 830, 832, 835, 838, 839, 841, 844, 848, 849, 850, 851, 853, 857, 858, 859, 860, 861, 866, 867, 869, 870, 873, 874, 876, 877, 878, 879, 882, 886, 888, 889, 891, 892, 893, 895, 896, 897, 898, 901, 902, 905, 907, 909, 911, 912, 915, 917, 918, 922, 923, 924, 926, 927, 928, 929, 930, 931, 932, 934, 935, 943, 944, 949, 950, 951, 953, 954, 956, 958, 961, 962, 963, 966, 967, 969, 970, 972, 973, 974, 975, 977, 981, 983, 985, 986, 987, 991, 993, 994, 996, 1000, 1001, 1004, 1005, 1006, 1010, 1013, 1015, 1017, 1019, 1022, 1023, 1025, 1027, 1030, 1031, 1034, 1037, 1038, 1039, 1042, 1043, 1044, 1046, 1047, 1049, 1050, 1051, 1056, 1057, 1058, 1061, 1062, 1063, 1064, 1065, 1067, 1068, 1071, 1072, 1076, 1077, 1078, 1080, 1082, 1084, 1086, 1087, 1091, 1092, 1094, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1112, 1115, 1119, 1123, 1124, 1128, 1131, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
What is the region of 1149 El Camino Real?
1149 El Camino Real refers to street_num = 1149 and street_name = 'el camino real'
SELECT T2.region FROM location AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.street_num = 1149 AND T1.street_name = 'el camino real'
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,734
1,734
CREATE TABLE `geographic` ( city TEXT not null primary key, region TEXT null ) CREATE TABLE `location` ( street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key city references geographic city on update cascade on delete cascade )
[ "AS", "AND", "SELECT", "INNER JOIN", "ON", "FROM" ]
7
simple
{ "case_1": [ 597 ], "case_2": [ 311, 597 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 88, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 264, 265, 266, 267, 268, 269, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 444, 445, 446, 447, 448, 449, 450, 451, 452, 454, 455, 456, 457, 459, 460, 462, 463, 464, 465, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 505, 507, 509, 510, 511, 514, 515, 516, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 544, 547, 548, 550, 552, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1071, 1072, 1074, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
What is the county of the Sankee restaurant?
Sankee restaurant refers to label = 'sankee'
SELECT T2.county FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.label = 'sankee'
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,735
1,735
CREATE TABLE `geographic` ( city TEXT not null primary key, county TEXT null ) CREATE TABLE `generalinfo` ( label TEXT null, city TEXT null, foreign key city references geographiccity on update cascade on delete cascade )
[ "AS", "SELECT", "INNER JOIN", "ON", "FROM" ]
6
simple
{ "case_1": [ 316 ], "case_2": [ 316, 334, 669, 934, 981 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 35, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 104, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 192, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 215, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 271, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 286, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 462, 463, 464, 465, 466, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 504, 505, 506, 507, 508, 509, 510, 511, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 526, 527, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 542, 544, 547, 548, 550, 552, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 657, 658, 659, 660, 661, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 786, 787, 788, 790, 792, 793, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 978, 980, 981, 982, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1004, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1074, 1075, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1113, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
How many streets with restaurants are there in the Northern California region?
SELECT COUNT(T1.city) FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city WHERE T1.region = 'northern california'
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,736
1,736
CREATE TABLE `geographic` ( city TEXT not null primary key, region TEXT null ) CREATE TABLE `location` ( city TEXT null, foreign key city references geographic city on update cascade on delete cascade )
[ "AS", "SELECT", "INNER JOIN", "ON", "COUNT", "FROM" ]
7
simple
{ "case_1": [ 597 ], "case_2": [ 311, 597 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 35, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 192, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 264, 265, 266, 267, 268, 269, 271, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 286, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 368, 369, 370, 373, 374, 375, 376, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 462, 463, 464, 465, 466, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 504, 505, 507, 509, 510, 511, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 542, 544, 547, 548, 550, 552, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 661, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 999, 1000, 1001, 1003, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1074, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1113, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
List all of the restaurants on Park St.
restaurant refers to label; Park St refers to street_name = 'park st'
SELECT T2.label FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.street_name = 'park st'
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,737
1,737
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, label TEXT null ) CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, street_name TEXT null, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "AS", "SELECT", "INNER JOIN", "ON", "FROM" ]
6
simple
{ "case_1": [ 217, 275, 524, 590, 799, 895 ], "case_2": [ 217, 275, 524, 590, 799, 886, 895 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 35, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 104, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 192, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 215, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 271, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 286, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 462, 463, 464, 465, 466, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 504, 505, 506, 507, 508, 509, 510, 511, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 526, 527, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 542, 544, 547, 548, 550, 552, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 657, 658, 659, 660, 661, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 786, 787, 788, 790, 792, 793, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 978, 980, 981, 982, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1004, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1074, 1075, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1113, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
What percentage of restaurants are from the Bay Area?
Bay Area refers to region = 'bay area'; percentage = divide(count(id_restaurant where region = 'bay area'), count(id_restaurant)) * 100%
SELECT CAST(SUM(IIF(T1.region = 'bay area', 1, 0)) AS REAL) * 100 / COUNT(T2.id_restaurant) FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,738
1,738
CREATE TABLE `geographic` ( city TEXT not null primary key, region TEXT null ) CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, city TEXT null, foreign key city references geographic city on update cascade on delete cascade, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "AS", "SELECT", "SUM", "INNER JOIN", "ON", "CAST", "COUNT", "FROM" ]
10
simple
{ "case_1": [ 597 ], "case_2": [ 311, 597 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 3, 4, 5, 6, 7, 8, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 35, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 192, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 215, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 264, 265, 266, 267, 268, 269, 271, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 304, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 368, 369, 370, 373, 374, 375, 376, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 462, 463, 464, 465, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 504, 505, 507, 509, 510, 511, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 526, 527, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 544, 547, 548, 550, 552, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 661, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1074, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
List all the average reviews of Chinese restaurants for each county from highest to lowest.
Chinese restaurant refers to food_type = 'chinese'; average review refers to divide(sum(review), count(review))
SELECT AVG(T1.review) FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.food_type = 'chinese' GROUP BY T1.id_restaurant ORDER BY AVG(T1.review) DESC
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,739
1,739
CREATE TABLE `geographic` ( city TEXT not null primary key ) CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, food_type TEXT null, city TEXT null, review REAL null, foreign key city references geographiccity on update cascade on delete cascade )
[ "GROUP BY", "AS", "SELECT", "ORDER BY", "INNER JOIN", "ON", "AVG", "DESC", "FROM" ]
11
medium
{ "case_1": [ 334, 669, 934, 981 ], "case_2": [ 316, 334, 669, 934, 981 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 972, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 33, 34, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 80, 81, 82, 83, 84, 85, 86, 88, 89, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 108, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 173, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 252, 254, 256, 257, 258, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 285, 286, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 304, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 352, 353, 354, 356, 357, 358, 359, 360, 361, 363, 364, 365, 368, 369, 370, 371, 373, 374, 375, 376, 378, 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 444, 445, 446, 448, 449, 450, 451, 452, 454, 455, 456, 457, 459, 460, 462, 463, 464, 465, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 505, 507, 509, 511, 514, 515, 516, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 542, 544, 547, 548, 550, 552, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 662, 663, 664, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 710, 711, 712, 714, 715, 717, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 796, 797, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 869, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 934, 935, 936, 937, 938, 940, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 972, 973, 974, 975, 977, 980, 981, 985, 986, 987, 988, 991, 993, 994, 996, 997, 999, 1000, 1001, 1003, 1004, 1005, 1006, 1010, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1030, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1057, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1071, 1072, 1074, 1076, 1077, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1114, 1115, 1116, 1118, 1119, 1122, 1123, 1124, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
List street names in San Francisco city.
SELECT street_name FROM location WHERE city = 'San Francisco'
CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,740
1,740
CREATE TABLE `location` ( street_name TEXT null, city TEXT null, foreign key city references geographic city on update cascade on delete cascade )
[ "SELECT", "FROM" ]
2
simple
{ "case_1": [ 442, 603 ], "case_2": [ 442, 603 ], "case_3": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141 ] }
restaurant
List restaurant ids located in Danville city.
SELECT id_restaurant FROM location WHERE city = 'Danville'
CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,741
1,741
CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, city TEXT null, foreign key city references geographic city on update cascade on delete cascade, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "SELECT", "FROM" ]
2
simple
{ "case_1": [ 442, 603 ], "case_2": [ 442, 603 ], "case_3": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141 ] }
restaurant
How many cities are located in the Bay Area?
the Bay Area refers to region = 'bay area'
SELECT COUNT(city) FROM geographic WHERE region = 'bay area'
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,742
1,742
CREATE TABLE `geographic` ( city TEXT not null primary key, region TEXT null )
[ "COUNT", "SELECT", "FROM" ]
3
simple
{ "case_1": [ 332, 972 ], "case_2": [ 332, 972 ], "case_3": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141 ] }
restaurant
How many labels of the restaurant have an unknown country?
unknown county refers to county = 'unknown'
SELECT COUNT(T1.label) FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.county = 'unknown'
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,743
1,743
CREATE TABLE `geographic` ( city TEXT not null primary key, county TEXT null ) CREATE TABLE `generalinfo` ( label TEXT null, city TEXT null, foreign key city references geographiccity on update cascade on delete cascade )
[ "AS", "SELECT", "INNER JOIN", "ON", "COUNT", "FROM" ]
7
simple
{ "case_1": [ 316 ], "case_2": [ 316, 334, 669, 934, 981 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 35, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 192, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 264, 265, 266, 267, 268, 269, 271, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 286, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 368, 369, 370, 373, 374, 375, 376, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 462, 463, 464, 465, 466, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 504, 505, 507, 509, 510, 511, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 542, 544, 547, 548, 550, 552, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 661, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 999, 1000, 1001, 1003, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1074, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1113, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
Please indicate the street names of restaurants with food type is American.
SELECT T1.street_name FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.food_type = 'American'
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,744
1,744
CREATE TABLE `generalinfo` ( food_type TEXT null, city TEXT null, foreign key city references geographiccity on update cascade on delete cascade ) CREATE TABLE `location` ( street_name TEXT null, city TEXT null, foreign key city references geographic city on update cascade on delete cascade )
[ "AS", "SELECT", "INNER JOIN", "ON", "FROM" ]
6
simple
{ "case_1": [ 217, 275, 524, 590, 799, 895 ], "case_2": [ 217, 275, 524, 590, 799, 886, 895 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 35, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 104, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 192, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 215, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 271, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 286, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 462, 463, 464, 465, 466, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 504, 505, 506, 507, 508, 509, 510, 511, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 526, 527, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 542, 544, 547, 548, 550, 552, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 657, 658, 659, 660, 661, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 786, 787, 788, 790, 792, 793, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 978, 980, 981, 982, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1004, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1074, 1075, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1113, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
Please indicate which labels have the city located in Santa Cruz.
Santa Cruz refers to county = 'Santa Cruz county'
SELECT T1.label FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.county = 'Santa Cruz county'
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,745
1,745
CREATE TABLE `geographic` ( city TEXT not null primary key, county TEXT null ) CREATE TABLE `generalinfo` ( label TEXT null, city TEXT null, foreign key city references geographiccity on update cascade on delete cascade )
[ "AS", "SELECT", "INNER JOIN", "ON", "FROM" ]
6
simple
{ "case_1": [ 316 ], "case_2": [ 316, 334, 669, 934, 981 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 35, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 104, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 192, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 215, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 271, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 286, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 462, 463, 464, 465, 466, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 504, 505, 506, 507, 508, 509, 510, 511, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 526, 527, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 542, 544, 547, 548, 550, 552, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 657, 658, 659, 660, 661, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 786, 787, 788, 790, 792, 793, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 978, 980, 981, 982, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1004, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1074, 1075, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1113, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
Give the review of the restaurant at 430, Broadway.
430 Broadway refers to street_num = 430 and street_name = 'Broadway'
SELECT T1.review FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.street_name = 'Broadway' AND T2.street_num = 430
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,746
1,746
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, review REAL null ) CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "AS", "AND", "SELECT", "INNER JOIN", "ON", "FROM" ]
7
simple
{ "case_1": [ 217, 275, 524, 590, 799, 895 ], "case_2": [ 217, 275, 524, 590, 799, 886, 895 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 88, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 264, 265, 266, 267, 268, 269, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 444, 445, 446, 447, 448, 449, 450, 451, 452, 454, 455, 456, 457, 459, 460, 462, 463, 464, 465, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 505, 507, 509, 510, 511, 514, 515, 516, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 544, 547, 548, 550, 552, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1071, 1072, 1074, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
Indicate the address of the restaurant with the most popular reviews.
address refers to street_num, street_name; the most popular review refers to max(review)
SELECT T2.street_num, T2.street_name FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant ORDER BY T1.review DESC LIMIT 1
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,747
1,747
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, review REAL null ) CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "AS", "SELECT", "ORDER BY", "LIMIT", "INNER JOIN", "ON", "DESC", "FROM" ]
9
simple
{ "case_1": [ 217, 275, 524, 590, 799, 895 ], "case_2": [ 217, 275, 524, 590, 799, 886, 895 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 972, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 33, 34, 36, 37, 38, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 80, 81, 82, 83, 84, 85, 86, 88, 89, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 108, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 173, 174, 175, 176, 177, 179, 180, 181, 183, 184, 185, 186, 187, 188, 189, 190, 191, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 208, 211, 212, 213, 214, 217, 218, 219, 220, 221, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 252, 254, 256, 257, 258, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 285, 286, 287, 289, 290, 291, 292, 295, 296, 297, 298, 299, 300, 301, 302, 304, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 352, 353, 354, 356, 357, 358, 359, 360, 361, 363, 364, 365, 368, 369, 370, 371, 373, 374, 375, 376, 378, 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 444, 445, 446, 448, 449, 450, 451, 452, 454, 455, 456, 457, 459, 460, 462, 463, 464, 465, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 505, 507, 509, 511, 514, 515, 516, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 544, 547, 548, 550, 552, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 619, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 662, 663, 664, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 708, 710, 711, 712, 714, 715, 717, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 732, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 796, 797, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 815, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 836, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 869, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 934, 935, 936, 937, 938, 940, 943, 944, 946, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 972, 973, 974, 975, 977, 980, 981, 983, 985, 986, 987, 988, 991, 993, 994, 996, 997, 999, 1000, 1001, 1003, 1004, 1005, 1006, 1010, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1030, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1057, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1071, 1072, 1074, 1076, 1077, 1078, 1080, 1082, 1083, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1114, 1115, 1116, 1118, 1119, 1122, 1123, 1124, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1139, 1141 ] }
restaurant
Which country has the most restaurants with Italian food?
Italian food refers to food_type = 'Italian'
SELECT T2.county FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.food_type = 'Italian' GROUP BY T2.county ORDER BY COUNT(T1.id_restaurant) DESC LIMIT 1
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,748
1,748
CREATE TABLE `geographic` ( city TEXT not null primary key, county TEXT null ) CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, food_type TEXT null, city TEXT null, foreign key city references geographiccity on update cascade on delete cascade )
[ "GROUP BY", "AS", "SELECT", "ORDER BY", "LIMIT", "INNER JOIN", "ON", "DESC", "COUNT", "FROM" ]
11
medium
{ "case_1": [ 334, 669, 934, 981 ], "case_2": [ 316, 334, 669, 934, 981 ], "case_3": [ 275, 311, 316, 334, 590, 597, 669, 799, 886, 934, 972, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 4, 6, 10, 11, 13, 15, 16, 20, 22, 27, 28, 29, 30, 36, 37, 47, 49, 51, 53, 55, 59, 62, 63, 68, 69, 73, 74, 75, 77, 78, 82, 86, 88, 89, 91, 93, 96, 98, 106, 108, 113, 115, 117, 118, 119, 121, 125, 126, 131, 138, 140, 142, 143, 146, 148, 150, 152, 159, 160, 162, 163, 164, 167, 169, 170, 173, 175, 179, 183, 184, 185, 187, 188, 189, 190, 191, 196, 197, 199, 200, 202, 206, 212, 213, 214, 225, 226, 227, 229, 233, 234, 239, 243, 244, 247, 252, 254, 256, 261, 262, 267, 268, 269, 275, 276, 277, 278, 281, 285, 286, 291, 299, 301, 309, 311, 313, 314, 316, 317, 319, 320, 323, 324, 325, 329, 330, 334, 335, 336, 338, 339, 341, 342, 344, 345, 348, 349, 352, 353, 354, 356, 358, 359, 360, 364, 365, 370, 371, 373, 374, 375, 378, 379, 381, 382, 383, 384, 385, 391, 392, 394, 395, 401, 403, 406, 409, 411, 412, 416, 417, 424, 426, 428, 429, 434, 435, 436, 444, 445, 448, 451, 454, 460, 462, 464, 465, 467, 469, 471, 473, 476, 477, 478, 482, 484, 487, 488, 490, 493, 495, 497, 500, 505, 509, 515, 516, 519, 520, 526, 530, 532, 535, 536, 537, 538, 542, 544, 547, 548, 552, 558, 559, 560, 563, 564, 566, 567, 573, 578, 579, 580, 581, 582, 584, 586, 590, 592, 595, 596, 597, 606, 608, 611, 613, 620, 621, 625, 626, 627, 630, 632, 633, 634, 637, 638, 641, 645, 646, 649, 651, 654, 657, 658, 659, 662, 663, 664, 665, 668, 669, 671, 681, 687, 688, 690, 691, 694, 696, 698, 701, 703, 705, 712, 714, 719, 720, 721, 727, 733, 734, 735, 736, 739, 740, 743, 748, 749, 750, 751, 752, 753, 756, 759, 760, 762, 768, 769, 772, 778, 779, 787, 790, 796, 797, 799, 800, 802, 803, 804, 810, 812, 813, 814, 818, 819, 823, 824, 827, 830, 838, 839, 841, 849, 850, 851, 853, 857, 861, 866, 867, 869, 870, 874, 876, 877, 882, 886, 888, 889, 891, 893, 896, 897, 898, 901, 902, 909, 911, 912, 915, 917, 918, 922, 923, 924, 926, 927, 929, 930, 932, 934, 935, 943, 950, 951, 953, 954, 956, 958, 961, 962, 963, 966, 967, 969, 970, 972, 973, 975, 977, 981, 983, 985, 986, 987, 993, 994, 996, 1004, 1005, 1006, 1010, 1013, 1015, 1017, 1022, 1023, 1025, 1030, 1034, 1037, 1038, 1042, 1043, 1047, 1049, 1050, 1051, 1056, 1057, 1058, 1062, 1064, 1065, 1067, 1068, 1071, 1072, 1076, 1077, 1078, 1082, 1084, 1086, 1087, 1091, 1094, 1100, 1101, 1103, 1104, 1106, 1112, 1119, 1123, 1124, 1128, 1131, 1133, 1134, 1135, 1137 ] }
restaurant
Find the percentage of restaurant in Napa Valley.
Napa Valley refers to region = 'Napa Valley'; percentage = divide(count(id_restaurant where region = 'Napa Valley'), count(id_restaurant)) * 100%
SELECT CAST(SUM(IIF(region = 'Napa Valley', 1, 0)) AS REAL) * 100 / COUNT(region) FROM geographic
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,749
1,749
CREATE TABLE `geographic` ( region TEXT null )
[ "AS", "SELECT", "SUM", "CAST", "COUNT", "FROM" ]
6
simple
{ "case_1": [ -1 ], "case_2": [ -1 ], "case_3": [ 311, 316, 334, 597, 669, 799, 886, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 4, 6, 10, 11, 16, 22, 24, 27, 30, 35, 36, 37, 39, 42, 47, 51, 53, 55, 61, 62, 63, 64, 68, 69, 71, 73, 74, 75, 77, 81, 82, 83, 86, 87, 88, 89, 91, 93, 94, 96, 98, 104, 106, 112, 113, 115, 117, 118, 119, 120, 121, 125, 126, 127, 129, 131, 140, 141, 142, 143, 146, 148, 152, 153, 155, 159, 160, 164, 167, 169, 170, 173, 175, 179, 183, 184, 186, 187, 188, 189, 190, 191, 192, 195, 196, 197, 199, 201, 202, 206, 207, 212, 213, 214, 215, 219, 223, 225, 226, 227, 228, 229, 233, 234, 236, 243, 244, 247, 248, 254, 256, 261, 264, 267, 268, 269, 271, 276, 277, 278, 279, 286, 299, 300, 301, 303, 304, 311, 313, 314, 316, 317, 319, 320, 322, 323, 325, 330, 334, 335, 336, 338, 339, 341, 344, 345, 347, 349, 354, 356, 358, 360, 363, 364, 365, 367, 370, 373, 374, 375, 378, 379, 380, 381, 382, 383, 384, 391, 392, 394, 401, 402, 403, 406, 409, 411, 412, 415, 416, 417, 423, 424, 426, 427, 436, 438, 443, 444, 445, 447, 448, 450, 451, 452, 453, 454, 458, 460, 462, 464, 465, 466, 467, 469, 470, 471, 473, 476, 477, 478, 483, 484, 485, 486, 487, 488, 490, 493, 500, 504, 505, 506, 509, 510, 515, 516, 517, 518, 519, 520, 526, 527, 532, 535, 536, 537, 538, 540, 542, 544, 547, 548, 550, 552, 558, 559, 560, 563, 564, 566, 571, 573, 575, 579, 580, 581, 582, 595, 596, 597, 606, 608, 609, 611, 612, 613, 620, 623, 627, 628, 630, 632, 633, 634, 638, 640, 641, 645, 646, 649, 650, 654, 658, 659, 661, 662, 663, 665, 666, 668, 669, 671, 676, 681, 682, 686, 687, 688, 690, 694, 695, 696, 701, 705, 710, 712, 714, 717, 721, 723, 727, 733, 734, 735, 736, 739, 740, 743, 744, 745, 747, 749, 750, 752, 753, 756, 760, 762, 768, 769, 772, 776, 777, 778, 779, 787, 788, 790, 795, 796, 797, 798, 799, 800, 802, 804, 808, 810, 812, 813, 814, 818, 819, 823, 824, 825, 827, 830, 832, 838, 839, 841, 848, 849, 851, 853, 857, 866, 867, 868, 870, 871, 874, 876, 877, 886, 888, 893, 894, 896, 897, 898, 901, 902, 909, 911, 912, 913, 915, 917, 918, 922, 923, 924, 926, 927, 929, 930, 934, 935, 941, 943, 944, 950, 951, 954, 956, 958, 959, 961, 962, 963, 969, 973, 975, 977, 981, 985, 986, 993, 996, 998, 1004, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1022, 1023, 1027, 1031, 1037, 1038, 1042, 1043, 1047, 1050, 1051, 1058, 1062, 1064, 1067, 1068, 1069, 1070, 1071, 1072, 1075, 1078, 1082, 1084, 1086, 1087, 1092, 1094, 1098, 1100, 1101, 1103, 1104, 1106, 1112, 1113, 1119, 1121, 1123, 1124, 1128, 1131, 1133, 1134, 1135, 1137 ] }
restaurant
How many of the cities are in a Bay Area?
Bay Area refers to region = 'bay area'
SELECT COUNT(city) FROM geographic WHERE region = 'bay area'
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,750
1,750
CREATE TABLE `geographic` ( city TEXT not null primary key, region TEXT null )
[ "COUNT", "SELECT", "FROM" ]
3
simple
{ "case_1": [ 332, 972 ], "case_2": [ 332, 972 ], "case_3": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141 ] }
restaurant
List down the cities with unknown country.
unknown county refers to county = 'unknown'
SELECT city FROM geographic WHERE county = 'unknown'
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,751
1,751
CREATE TABLE `geographic` ( city TEXT not null primary key, county TEXT null )
[ "SELECT", "FROM" ]
2
simple
{ "case_1": [ 332, 972 ], "case_2": [ 332, 972 ], "case_3": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141 ] }
restaurant
What is the city located in Bay Area of Santa Clara?
Bay Area refers to region = 'bay area'; Santa Clara refers to county = 'santa clara county'
SELECT city FROM geographic WHERE region = 'bay area' AND county = 'santa clara county'
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,752
1,752
CREATE TABLE `geographic` ( city TEXT not null primary key, county TEXT null, region TEXT null )
[ "AND", "SELECT", "FROM" ]
3
simple
{ "case_1": [ 332, 972 ], "case_2": [ 332, 972 ], "case_3": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141 ] }
restaurant
List down the restaurant ID of restaurants located in Sunnyvale.
Sunnyvale refers to city = 'sunnyvale'
SELECT id_restaurant FROM location WHERE city = 'sunnyvale'
CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,753
1,753
CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, city TEXT null, foreign key city references geographic city on update cascade on delete cascade, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "SELECT", "FROM" ]
2
simple
{ "case_1": [ 442, 603 ], "case_2": [ 442, 603 ], "case_3": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141 ] }
restaurant
Among the restaurants on street number below 1000, how many of them are in Railroad St.?
street number below 1000 refers to street_num < 1000; Railroad St. refers to street_name = 'railroad'
SELECT COUNT(city) FROM location WHERE street_name = 'railroad' AND street_num < 1000
CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,754
1,754
CREATE TABLE `location` ( street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key city references geographic city on update cascade on delete cascade )
[ "COUNT", "AND", "SELECT", "FROM" ]
4
simple
{ "case_1": [ 603 ], "case_2": [ 603 ], "case_3": [ 275, 311, 316, 334, 524, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 4, 5, 6, 8, 9, 10, 11, 12, 13, 15, 16, 19, 20, 21, 22, 24, 25, 26, 27, 28, 30, 32, 33, 35, 36, 37, 38, 39, 40, 43, 44, 45, 47, 50, 51, 52, 53, 55, 56, 57, 61, 62, 63, 66, 67, 68, 69, 71, 73, 74, 75, 76, 77, 78, 79, 82, 85, 86, 87, 88, 89, 90, 91, 93, 95, 96, 98, 99, 100, 106, 108, 109, 111, 112, 113, 115, 116, 117, 118, 119, 121, 124, 125, 126, 127, 128, 129, 131, 138, 140, 141, 142, 143, 144, 146, 147, 148, 152, 154, 157, 158, 159, 160, 163, 164, 167, 168, 169, 170, 172, 173, 175, 176, 177, 179, 180, 182, 183, 184, 185, 187, 188, 189, 190, 191, 192, 196, 197, 198, 199, 200, 202, 203, 206, 210, 212, 214, 216, 219, 223, 224, 225, 226, 227, 229, 230, 233, 234, 239, 240, 243, 244, 247, 252, 254, 255, 256, 258, 259, 261, 262, 265, 266, 267, 268, 269, 270, 271, 272, 273, 275, 276, 277, 278, 282, 286, 291, 293, 294, 296, 299, 301, 303, 305, 311, 314, 315, 316, 317, 319, 320, 323, 325, 330, 334, 335, 336, 338, 339, 341, 344, 345, 348, 349, 350, 352, 354, 356, 358, 359, 360, 361, 362, 364, 367, 368, 370, 371, 373, 374, 375, 376, 380, 382, 383, 384, 385, 391, 392, 393, 394, 395, 398, 399, 401, 402, 403, 405, 406, 408, 409, 410, 411, 412, 413, 414, 416, 417, 418, 419, 420, 421, 423, 424, 425, 426, 427, 428, 433, 436, 437, 438, 439, 440, 443, 444, 445, 446, 447, 448, 451, 452, 453, 454, 455, 458, 460, 462, 463, 464, 465, 466, 467, 469, 470, 471, 473, 475, 476, 477, 478, 480, 481, 482, 484, 485, 487, 488, 490, 492, 493, 494, 496, 497, 498, 500, 504, 505, 507, 509, 510, 512, 514, 515, 516, 517, 519, 520, 522, 524, 526, 528, 529, 530, 531, 532, 533, 535, 536, 537, 538, 539, 541, 542, 543, 544, 545, 547, 548, 551, 552, 554, 557, 558, 559, 560, 561, 562, 563, 564, 566, 573, 580, 581, 582, 584, 585, 586, 588, 589, 591, 594, 595, 596, 597, 598, 599, 601, 603, 605, 606, 608, 610, 611, 612, 613, 615, 618, 620, 622, 624, 625, 626, 627, 629, 630, 632, 633, 634, 637, 641, 643, 645, 646, 648, 649, 651, 654, 656, 658, 659, 661, 662, 663, 664, 665, 666, 667, 668, 669, 671, 673, 675, 677, 678, 679, 680, 681, 683, 684, 685, 686, 687, 688, 689, 690, 692, 693, 694, 696, 697, 698, 699, 702, 703, 705, 707, 712, 714, 715, 716, 718, 719, 721, 726, 727, 730, 733, 734, 735, 736, 737, 739, 740, 741, 743, 746, 747, 748, 749, 750, 752, 753, 754, 756, 757, 758, 760, 762, 763, 765, 767, 768, 769, 770, 772, 773, 775, 776, 777, 778, 779, 780, 783, 785, 787, 788, 790, 793, 794, 795, 796, 797, 798, 799, 800, 802, 804, 806, 807, 808, 810, 811, 812, 813, 814, 817, 818, 819, 820, 821, 824, 825, 827, 829, 830, 831, 832, 835, 838, 839, 840, 841, 843, 844, 848, 849, 851, 853, 855, 857, 858, 859, 860, 861, 864, 865, 866, 867, 869, 870, 873, 874, 876, 877, 878, 879, 886, 888, 890, 892, 893, 894, 895, 896, 897, 898, 899, 901, 902, 903, 905, 907, 909, 911, 912, 913, 915, 917, 918, 920, 922, 923, 924, 926, 927, 928, 930, 931, 932, 934, 935, 941, 942, 943, 944, 945, 949, 950, 951, 953, 954, 956, 958, 960, 961, 963, 965, 968, 969, 972, 974, 975, 976, 977, 981, 983, 985, 986, 991, 993, 996, 998, 1000, 1001, 1005, 1006, 1008, 1009, 1010, 1011, 1013, 1014, 1015, 1017, 1018, 1019, 1020, 1022, 1023, 1027, 1030, 1031, 1037, 1039, 1042, 1043, 1044, 1046, 1047, 1050, 1051, 1053, 1055, 1057, 1058, 1059, 1061, 1062, 1063, 1064, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1084, 1086, 1087, 1090, 1092, 1094, 1096, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1112, 1113, 1115, 1117, 1119, 1121, 1123, 1124, 1126, 1127, 1128, 1131, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
What is the name of the 24 hour diner at San Francisco?
name refers to label; 24 hour diner refers to food_type = '24 hour diner'; San Francisco refers to city = 'san francisco'
SELECT label FROM generalinfo WHERE food_type = '24 hour diner' AND city = 'san francisco'
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,755
1,755
CREATE TABLE `generalinfo` ( label TEXT null, food_type TEXT null, city TEXT null, foreign key city references geographiccity on update cascade on delete cascade )
[ "AND", "SELECT", "FROM" ]
3
simple
{ "case_1": [ 1073 ], "case_2": [ 1073 ], "case_3": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141 ] }
restaurant
Give the review of the restaurant located in Ocean St., Santa Cruz.
Ocean St. refers to street_name = 'ocean st'; Santa Cruz refers to city = 'santa cruz'
SELECT T2.review FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.city = 'santa cruz' AND T1.street_name = 'ocean st'
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,756
1,756
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, city TEXT null, review REAL null, foreign key city references geographiccity on update cascade on delete cascade ) CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, street_name TEXT null, city TEXT null, foreign key city references geographic city on update cascade on delete cascade, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "AS", "AND", "SELECT", "INNER JOIN", "ON", "FROM" ]
7
simple
{ "case_1": [ 217, 275, 524, 590, 799, 895 ], "case_2": [ 217, 275, 524, 590, 799, 886, 895 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 88, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 264, 265, 266, 267, 268, 269, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 444, 445, 446, 447, 448, 449, 450, 451, 452, 454, 455, 456, 457, 459, 460, 462, 463, 464, 465, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 505, 507, 509, 510, 511, 514, 515, 516, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 544, 547, 548, 550, 552, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1071, 1072, 1074, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
Give the street number of a bar in Oakland with a 2.7 review.
street number refers to street_num; bar refers to food_type = 'bar'; Oakland refers to city = 'oakland'; 2.7 review refers to review = 2.7
SELECT T2.street_num FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.review = 2.7 AND T2.city = 'oakland' AND T1.food_type = 'bar'
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,757
1,757
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, food_type TEXT null, city TEXT null, review REAL null, foreign key city references geographiccity on update cascade on delete cascade ) CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, street_num INTEGER null, city TEXT null, foreign key city references geographic city on update cascade on delete cascade, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "AS", "AND", "SELECT", "INNER JOIN", "ON", "FROM" ]
8
simple
{ "case_1": [ 217, 275, 524, 590, 799, 895 ], "case_2": [ 217, 275, 524, 590, 799, 886, 895 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 88, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 264, 265, 266, 267, 268, 269, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 444, 445, 446, 447, 448, 449, 450, 451, 452, 454, 455, 456, 457, 459, 460, 462, 463, 464, 465, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 505, 507, 509, 510, 511, 514, 515, 516, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 544, 547, 548, 550, 552, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1071, 1072, 1074, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
Among the bakeries, what is total number of bakery located at University Avenue, Palo Alto?
bakery refers to food_type = 'bakery'; University Avenue refers to street_name = 'university ave.'; Palo Alto refers to city = 'palo alto'
SELECT COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.food_type = 'bakery' AND T2.city = 'palo alto' AND T1.street_name = 'university ave.'
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,758
1,758
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, food_type TEXT null, city TEXT null, foreign key city references geographiccity on update cascade on delete cascade ) CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, street_name TEXT null, city TEXT null, foreign key city references geographic city on update cascade on delete cascade, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "AS", "AND", "SELECT", "INNER JOIN", "ON", "COUNT", "FROM" ]
9
simple
{ "case_1": [ 217, 275, 524, 590, 799, 895 ], "case_2": [ 217, 275, 524, 590, 799, 886, 895 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 32, 33, 34, 35, 36, 37, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 109, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 192, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 230, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 259, 260, 261, 262, 264, 265, 266, 267, 268, 269, 271, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 286, 287, 289, 290, 292, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 399, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 462, 463, 464, 465, 466, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 504, 505, 507, 509, 510, 511, 512, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 542, 544, 547, 548, 550, 552, 554, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 618, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 665, 666, 667, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 680, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 692, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 707, 710, 711, 712, 714, 715, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 730, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 817, 818, 819, 820, 822, 823, 824, 825, 827, 828, 829, 830, 831, 832, 833, 834, 835, 837, 838, 839, 841, 843, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 903, 904, 905, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 945, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 965, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1019, 1020, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1074, 1078, 1079, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1113, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1126, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
Among the listed winery, what is the street number of the winery named "Tulocay Winery"?
winery refers to food_type = 'winery'; street number refers to street_num; "Tulocay Winery" refers to label = 'Tulocay winery'
SELECT T1.street_num FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.label = 'Tulocay winery' AND T2.food_type = 'winery'
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,759
1,759
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null ) CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, street_num INTEGER null, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "AS", "AND", "SELECT", "INNER JOIN", "ON", "FROM" ]
7
simple
{ "case_1": [ 217, 275, 524, 590, 799, 895 ], "case_2": [ 217, 275, 524, 590, 799, 886, 895 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 88, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 264, 265, 266, 267, 268, 269, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 444, 445, 446, 447, 448, 449, 450, 451, 452, 454, 455, 456, 457, 459, 460, 462, 463, 464, 465, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 505, 507, 509, 510, 511, 514, 515, 516, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 544, 547, 548, 550, 552, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1071, 1072, 1074, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
List the review and label of the restaurants in Mission Blvd., Hayward.
Mission Blvd. refers to street_name = 'mission blvd'; Hayward refers to city = 'hayward'
SELECT T2.review, T2.label FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.city = 'hayward' AND T1.street_name = 'mission blvd'
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,760
1,760
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, label TEXT null, city TEXT null, review REAL null, foreign key city references geographiccity on update cascade on delete cascade ) CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, street_name TEXT null, city TEXT null, foreign key city references geographic city on update cascade on delete cascade, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "AS", "AND", "SELECT", "INNER JOIN", "ON", "FROM" ]
7
simple
{ "case_1": [ 217, 275, 524, 590, 799, 895 ], "case_2": [ 217, 275, 524, 590, 799, 886, 895 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 88, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 264, 265, 266, 267, 268, 269, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 444, 445, 446, 447, 448, 449, 450, 451, 452, 454, 455, 456, 457, 459, 460, 462, 463, 464, 465, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 505, 507, 509, 510, 511, 514, 515, 516, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 544, 547, 548, 550, 552, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1071, 1072, 1074, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
Among all indian restaurants in Castro St., Mountainview, how many of them is about cookhouse in their label?
indian restaurant refers to food_type = 'indian'; Castro St. refers to street_name = 'castro st'; Mountainview refers to city = 'mountainview'; have the word "Indian" in label refers to label = 'indian'
SELECT COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.street_name = 'castro st' AND T1.city = 'mountain view' AND T2.food_type = 'indian' AND T2.label LIKE '%cookhouse%'
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,761
1,761
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, foreign key city references geographiccity on update cascade on delete cascade ) CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, street_name TEXT null, city TEXT null, foreign key city references geographic city on update cascade on delete cascade, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "AS", "AND", "SELECT", "LIKE", "INNER JOIN", "ON", "COUNT", "FROM" ]
11
medium
{ "case_1": [ 886 ], "case_2": [ 217, 275, 524, 590, 799, 886, 895 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 88, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 264, 265, 266, 267, 268, 269, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 304, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 368, 369, 370, 373, 374, 375, 376, 378, 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 421, 422, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 444, 445, 446, 447, 448, 449, 450, 451, 452, 454, 455, 456, 457, 459, 460, 462, 463, 464, 465, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 505, 507, 509, 510, 511, 514, 515, 516, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 544, 547, 548, 550, 552, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 591, 592, 593, 595, 596, 597, 600, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 999, 1000, 1001, 1003, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1070, 1071, 1072, 1074, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
In restaurants with a review of 2, how many restaurants have a street number below 500?
review of 2 refers to review = 2; street number below 500 refers to street_num < 500
SELECT COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.review = 2 AND T1.street_num < 500
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,762
1,762
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, review REAL null ) CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, street_num INTEGER null, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "AS", "AND", "SELECT", "INNER JOIN", "ON", "COUNT", "FROM" ]
8
simple
{ "case_1": [ 217, 275, 524, 590, 799, 895 ], "case_2": [ 217, 275, 524, 590, 799, 886, 895 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 32, 33, 34, 35, 36, 37, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 109, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 192, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 230, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 259, 260, 261, 262, 264, 265, 266, 267, 268, 269, 271, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 286, 287, 289, 290, 292, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 399, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 462, 463, 464, 465, 466, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 504, 505, 507, 509, 510, 511, 512, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 542, 544, 547, 548, 550, 552, 554, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 618, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 665, 666, 667, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 680, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 692, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 707, 710, 711, 712, 714, 715, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 730, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 817, 818, 819, 820, 822, 823, 824, 825, 827, 828, 829, 830, 831, 832, 833, 834, 835, 837, 838, 839, 841, 843, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 903, 904, 905, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 945, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 965, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1019, 1020, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1074, 1078, 1079, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1113, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1126, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
Among all asian restaurants in N. Milpitas Blvd., Milpitas, how many of them have restaurant ID greater than 385?
asian restaurant refers to food_type = 'asian'; N. Milpitas Blvd. refers to street_name = 'n milpitas blvd'; Milpitas refers to city = 'milpitas'; restaurant ID greater than 385 refers to id_restaurant > 385
SELECT COUNT(T1.id_restaurant) AS num FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.city = 'milpitas' AND T2.food_type = 'asian' AND T1.street_name = 'n milpitas blvd' AND T1.id_restaurant > 385
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,763
1,763
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, food_type TEXT null, city TEXT null, foreign key city references geographiccity on update cascade on delete cascade ) CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, street_name TEXT null, city TEXT null, foreign key city references geographic city on update cascade on delete cascade, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "AS", "AND", "SELECT", "INNER JOIN", "ON", "COUNT", "FROM" ]
11
medium
{ "case_1": [ 886 ], "case_2": [ 217, 275, 524, 590, 799, 886, 895 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 32, 33, 34, 35, 36, 37, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 109, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 192, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 230, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 259, 260, 261, 262, 264, 265, 266, 267, 268, 269, 271, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 286, 287, 289, 290, 292, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 399, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 462, 463, 464, 465, 466, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 504, 505, 507, 509, 510, 511, 512, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 542, 544, 547, 548, 550, 552, 554, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 618, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 665, 666, 667, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 680, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 692, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 707, 710, 711, 712, 714, 715, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 730, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 817, 818, 819, 820, 822, 823, 824, 825, 827, 828, 829, 830, 831, 832, 833, 834, 835, 837, 838, 839, 841, 843, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 903, 904, 905, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 945, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 965, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1019, 1020, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1074, 1078, 1079, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1113, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1126, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
What is the restaurant's name and ID located at Ocean Avenue, San Francisco?
restaurant's name refers to label; Ocean Avenue refers to street_name = 'ocean avenue'; San Francisco refers to city = 'san francisco'
SELECT T2.label, T1.id_restaurant FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'san francisco' AND T1.street_name = 'ocean avenue'
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,764
1,764
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, label TEXT null, city TEXT null, foreign key city references geographiccity on update cascade on delete cascade ) CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, street_name TEXT null, city TEXT null, foreign key city references geographic city on update cascade on delete cascade, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "AS", "AND", "SELECT", "INNER JOIN", "ON", "FROM" ]
7
simple
{ "case_1": [ 217, 275, 524, 590, 799, 895 ], "case_2": [ 217, 275, 524, 590, 799, 886, 895 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 88, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 264, 265, 266, 267, 268, 269, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 444, 445, 446, 447, 448, 449, 450, 451, 452, 454, 455, 456, 457, 459, 460, 462, 463, 464, 465, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 505, 507, 509, 510, 511, 514, 515, 516, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 544, 547, 548, 550, 552, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1071, 1072, 1074, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
What is the full address of the restaurant named "Sanuki Restaurant"?
full address refers to city, street_num, street_name; restaurant named "Sanuki Restaurant" refers to label = 'sanuki restaurant'
SELECT T2.city, T1.street_num, T1.street_name FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.label = 'sanuki restaurant'
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,765
1,765
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, label TEXT null, city TEXT null, foreign key city references geographiccity on update cascade on delete cascade ) CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key city references geographic city on update cascade on delete cascade, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "AS", "SELECT", "INNER JOIN", "ON", "FROM" ]
6
simple
{ "case_1": [ 217, 275, 524, 590, 799, 895 ], "case_2": [ 217, 275, 524, 590, 799, 886, 895 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 35, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 104, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 192, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 215, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 271, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 286, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 462, 463, 464, 465, 466, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 504, 505, 506, 507, 508, 509, 510, 511, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 526, 527, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 542, 544, 547, 548, 550, 552, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 657, 658, 659, 660, 661, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 786, 787, 788, 790, 792, 793, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 978, 980, 981, 982, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1004, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1074, 1075, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1113, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
List the food type of the restaurant located in 22779 6th St., Hayward City.
22779 refers to street_num = 22779; 6th St. refers to street_name = '6th St'
SELECT T2.food_type FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.street_num = 22779 AND T1.street_name = '6th St' AND T2.city = 'hayward'
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,766
1,766
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, food_type TEXT null, city TEXT null, foreign key city references geographiccity on update cascade on delete cascade ) CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key city references geographic city on update cascade on delete cascade, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "AS", "AND", "SELECT", "INNER JOIN", "ON", "FROM" ]
8
simple
{ "case_1": [ 217, 275, 524, 590, 799, 895 ], "case_2": [ 217, 275, 524, 590, 799, 886, 895 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 88, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 264, 265, 266, 267, 268, 269, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 444, 445, 446, 447, 448, 449, 450, 451, 452, 454, 455, 456, 457, 459, 460, 462, 463, 464, 465, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 505, 507, 509, 510, 511, 514, 515, 516, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 544, 547, 548, 550, 552, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1071, 1072, 1074, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
How many American restaurants are located in Front, San Francisco?
American restaurant refers to food_type = 'american'; Front refers to street_name = 'front'; San Francisco refers to city = 'san francisco'
SELECT COUNT(T2.food_type = 'american') FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'san francisco' AND T1.street_name = 'front'
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,767
1,767
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, food_type TEXT null, city TEXT null, foreign key city references geographiccity on update cascade on delete cascade ) CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, street_name TEXT null, city TEXT null, foreign key city references geographic city on update cascade on delete cascade, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "AS", "AND", "SELECT", "INNER JOIN", "ON", "COUNT", "FROM" ]
8
simple
{ "case_1": [ 217, 275, 524, 590, 799, 895 ], "case_2": [ 217, 275, 524, 590, 799, 886, 895 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 32, 33, 34, 35, 36, 37, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 109, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 192, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 230, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 259, 260, 261, 262, 264, 265, 266, 267, 268, 269, 271, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 286, 287, 289, 290, 292, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 399, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 462, 463, 464, 465, 466, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 504, 505, 507, 509, 510, 511, 512, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 542, 544, 547, 548, 550, 552, 554, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 618, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 665, 666, 667, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 680, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 692, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 707, 710, 711, 712, 714, 715, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 730, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 817, 818, 819, 820, 822, 823, 824, 825, 827, 828, 829, 830, 831, 832, 833, 834, 835, 837, 838, 839, 841, 843, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 903, 904, 905, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 945, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 965, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1019, 1020, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1074, 1078, 1079, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1113, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1126, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
List the restaurant's ID that has a review greater than the 70% of average review of all American restaurants with street number greater than 2000.
American restaurant refers to food_type = 'american'; street number greater than 2000 refers to street_num > 2000; review greater than the 70% of average review refers to review > multiply(avg(review), 0.7)
SELECT T1.id_restaurant FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.food_type = 'american' AND T1.street_num > 2000 GROUP BY T1.id_restaurant ORDER BY AVG(T2.review) * 0.7 DESC
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,768
1,768
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, food_type TEXT null, review REAL null ) CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, street_num INTEGER null, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "GROUP BY", "AS", "AND", "SELECT", "ORDER BY", "INNER JOIN", "ON", "AVG", "DESC", "FROM" ]
11
medium
{ "case_1": [ 886 ], "case_2": [ 275, 524, 590, 799, 886, 895 ], "case_3": [ 275, 311, 334, 524, 590, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 1, 4, 5, 8, 10, 11, 12, 19, 20, 21, 22, 24, 26, 29, 30, 33, 36, 37, 39, 44, 45, 47, 49, 51, 52, 53, 55, 57, 59, 62, 63, 66, 68, 69, 71, 73, 74, 75, 76, 80, 85, 86, 88, 89, 90, 93, 95, 96, 98, 99, 111, 112, 113, 115, 116, 117, 118, 119, 121, 125, 126, 127, 128, 129, 131, 137, 138, 140, 141, 142, 143, 144, 146, 150, 152, 154, 158, 159, 160, 162, 163, 164, 167, 169, 170, 172, 175, 176, 177, 179, 180, 183, 184, 187, 188, 191, 197, 199, 200, 202, 206, 211, 213, 214, 219, 220, 227, 229, 232, 233, 235, 239, 240, 244, 246, 247, 256, 258, 262, 265, 266, 267, 268, 272, 275, 276, 277, 278, 281, 282, 286, 295, 296, 301, 309, 311, 313, 314, 315, 317, 319, 320, 322, 324, 325, 329, 330, 333, 334, 336, 339, 341, 342, 344, 345, 349, 353, 356, 361, 364, 365, 368, 370, 373, 374, 376, 378, 379, 381, 382, 383, 385, 391, 393, 394, 395, 398, 402, 403, 405, 406, 407, 408, 409, 411, 413, 414, 416, 417, 419, 424, 425, 426, 427, 428, 429, 433, 434, 435, 436, 437, 438, 440, 444, 445, 446, 448, 451, 452, 454, 455, 460, 462, 463, 464, 469, 470, 473, 475, 476, 477, 480, 482, 490, 493, 494, 495, 496, 497, 498, 500, 505, 507, 514, 515, 516, 519, 520, 522, 524, 526, 528, 529, 530, 532, 533, 536, 537, 538, 539, 541, 542, 544, 548, 552, 557, 558, 559, 560, 561, 562, 563, 566, 567, 578, 579, 581, 582, 584, 586, 588, 589, 590, 592, 595, 605, 608, 610, 611, 612, 613, 615, 621, 624, 625, 626, 627, 630, 632, 633, 634, 637, 638, 641, 643, 645, 648, 651, 654, 657, 659, 663, 665, 666, 668, 669, 671, 675, 677, 678, 681, 683, 684, 685, 686, 687, 688, 690, 691, 693, 696, 697, 699, 701, 702, 704, 712, 714, 715, 719, 720, 721, 726, 727, 733, 734, 735, 736, 739, 740, 741, 743, 746, 747, 749, 751, 752, 753, 754, 756, 758, 759, 760, 763, 765, 767, 768, 773, 775, 776, 777, 778, 779, 780, 783, 784, 788, 790, 793, 797, 799, 800, 803, 804, 806, 807, 808, 810, 814, 818, 819, 823, 824, 825, 827, 829, 830, 832, 833, 835, 838, 844, 848, 849, 850, 851, 853, 858, 859, 860, 861, 862, 863, 866, 867, 870, 873, 876, 877, 878, 879, 882, 886, 888, 889, 891, 892, 893, 895, 896, 901, 902, 905, 907, 911, 917, 918, 923, 924, 927, 928, 929, 930, 931, 932, 934, 935, 944, 949, 950, 951, 953, 954, 956, 958, 961, 962, 963, 966, 967, 969, 970, 973, 974, 975, 977, 981, 985, 986, 991, 993, 994, 996, 1000, 1001, 1005, 1006, 1010, 1013, 1017, 1019, 1022, 1023, 1025, 1027, 1031, 1034, 1037, 1038, 1039, 1042, 1043, 1044, 1046, 1047, 1049, 1050, 1051, 1056, 1058, 1060, 1061, 1063, 1064, 1065, 1067, 1068, 1071, 1072, 1080, 1084, 1086, 1091, 1092, 1094, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1115, 1119, 1123, 1124, 1128, 1131, 1135, 1136, 1137 ] }
restaurant
Among the restaurants located on the street number ranges from 1000 to 2000, what is the percentage of Afghani restaurants are there?
street number ranges from 1000 to 2000 refers to 1000 < = street_num < = 2000; Afghani restaurant refers to food_type = 'afghani'; percentage = divide(count(id_restaurant where food_type = 'afghani'), count(id_restaurant)) * 100%
SELECT CAST(SUM(IIF(T2.food_type = 'afghani', 1, 0)) AS REAL) * 100 / COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE 1000 <= T1.street_num <= 2000
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,769
1,769
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, food_type TEXT null ) CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, street_num INTEGER null, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "AS", "SELECT", "SUM", "INNER JOIN", "ON", "CAST", "COUNT", "FROM" ]
10
simple
{ "case_1": [ 217, 275, 524, 590, 799, 895 ], "case_2": [ 217, 275, 524, 590, 799, 886, 895 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 3, 4, 5, 6, 7, 8, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 35, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 192, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 215, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 264, 265, 266, 267, 268, 269, 271, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 304, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 368, 369, 370, 373, 374, 375, 376, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 462, 463, 464, 465, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 504, 505, 507, 509, 510, 511, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 526, 527, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 544, 547, 548, 550, 552, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 661, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1074, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
What is the name of the most popular restaurant serving Asian foods in San Francisco?
the most popular refers to max(review); Asian food refers to food_type = 'asian'; San Francisco refers to city = 'san francisco'
SELECT label FROM generalinfo WHERE food_type = 'asian' AND city = 'san francisco' AND review = ( SELECT MAX(review) FROM generalinfo WHERE food_type = 'asian' AND city = 'san francisco' )
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,770
1,770
CREATE TABLE `generalinfo` ( label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key city references geographiccity on update cascade on delete cascade )
[ "AND", "SELECT", "FROM", "MAX" ]
8
simple
{ "case_1": [ 1073 ], "case_2": [ 1073 ], "case_3": [ 275, 524, 799, 886, 895, 1073 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 2, 4, 5, 8, 10, 12, 19, 20, 21, 22, 24, 26, 30, 31, 32, 33, 35, 37, 38, 39, 40, 43, 44, 45, 47, 50, 51, 52, 53, 56, 57, 63, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 79, 85, 88, 90, 93, 95, 96, 98, 99, 100, 109, 111, 112, 113, 115, 116, 117, 118, 119, 123, 125, 127, 128, 129, 131, 138, 141, 142, 143, 144, 146, 152, 154, 158, 160, 163, 164, 168, 169, 170, 172, 175, 176, 177, 180, 183, 184, 187, 197, 200, 214, 219, 223, 227, 230, 239, 240, 241, 244, 255, 256, 258, 259, 262, 265, 266, 267, 268, 270, 272, 275, 276, 277, 278, 282, 294, 296, 301, 305, 314, 315, 317, 319, 325, 330, 339, 341, 350, 356, 361, 362, 367, 368, 370, 374, 376, 382, 383, 385, 386, 391, 393, 395, 398, 399, 402, 403, 405, 406, 408, 410, 413, 414, 416, 417, 418, 419, 421, 424, 425, 426, 427, 428, 433, 436, 437, 438, 439, 440, 444, 446, 448, 451, 452, 455, 463, 464, 466, 469, 470, 475, 476, 477, 480, 482, 490, 492, 493, 494, 496, 497, 498, 500, 507, 510, 512, 514, 515, 516, 519, 520, 522, 524, 526, 528, 529, 530, 533, 537, 539, 541, 544, 551, 554, 557, 558, 559, 561, 562, 563, 565, 581, 582, 584, 586, 588, 589, 591, 594, 595, 599, 601, 605, 608, 610, 612, 613, 615, 618, 622, 624, 625, 626, 627, 632, 633, 637, 641, 642, 643, 648, 651, 656, 663, 666, 667, 668, 671, 675, 677, 678, 679, 680, 683, 684, 685, 686, 687, 690, 692, 693, 697, 699, 702, 707, 712, 714, 715, 716, 718, 719, 726, 727, 730, 734, 735, 739, 740, 741, 743, 746, 747, 749, 753, 754, 756, 758, 760, 763, 765, 767, 768, 773, 775, 776, 777, 780, 783, 785, 788, 793, 794, 797, 798, 799, 800, 804, 806, 807, 808, 810, 814, 817, 819, 820, 824, 825, 829, 830, 831, 832, 835, 838, 840, 842, 843, 844, 845, 848, 849, 851, 853, 855, 856, 858, 859, 860, 861, 864, 867, 870, 873, 877, 878, 879, 886, 888, 892, 895, 896, 902, 903, 905, 907, 917, 920, 923, 924, 928, 930, 931, 932, 935, 944, 945, 949, 953, 954, 956, 958, 961, 965, 969, 974, 984, 985, 986, 991, 996, 998, 1000, 1001, 1008, 1009, 1014, 1017, 1018, 1019, 1020, 1022, 1023, 1026, 1027, 1028, 1031, 1039, 1042, 1044, 1046, 1058, 1059, 1061, 1063, 1064, 1067, 1068, 1071, 1072, 1073, 1079, 1080, 1081, 1084, 1086, 1092, 1100, 1101, 1103, 1104, 1105, 1109, 1115, 1117, 1118, 1119, 1121, 1123, 1126, 1128, 1131, 1136, 1138 ] }
restaurant
How many cities are there in Monterey?
Monterey refers to region = 'monterey'
SELECT COUNT(DISTINCT city) FROM geographic WHERE region = 'monterey'
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,771
1,771
CREATE TABLE `geographic` ( city TEXT not null primary key, region TEXT null )
[ "COUNT", "SELECT", "FROM" ]
3
simple
{ "case_1": [ 332, 972 ], "case_2": [ 332, 972 ], "case_3": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141 ] }
restaurant
How many deli in Belmont have a review rating of 2 or more?
deli ris a food type; Belmont refers to city = 'belmont'; review rating of 2 or more refers to review > 2
SELECT COUNT(id_restaurant) FROM generalinfo WHERE city = 'belmont' AND review > 2 AND food_type = 'deli'
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,772
1,772
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, food_type TEXT null, city TEXT null, review REAL null, foreign key city references geographiccity on update cascade on delete cascade )
[ "COUNT", "AND", "SELECT", "FROM" ]
5
simple
{ "case_1": [ 1073 ], "case_2": [ 1073 ], "case_3": [ 275, 311, 316, 334, 524, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 4, 5, 6, 8, 9, 10, 11, 12, 13, 15, 16, 19, 20, 21, 22, 24, 25, 26, 27, 28, 30, 32, 33, 35, 36, 37, 38, 39, 40, 43, 44, 45, 47, 50, 51, 52, 53, 55, 56, 57, 61, 62, 63, 66, 67, 68, 69, 71, 73, 74, 75, 76, 77, 78, 79, 82, 85, 86, 87, 88, 89, 90, 91, 93, 95, 96, 98, 99, 100, 106, 108, 109, 111, 112, 113, 115, 116, 117, 118, 119, 121, 124, 125, 126, 127, 128, 129, 131, 138, 140, 141, 142, 143, 144, 146, 147, 148, 152, 154, 157, 158, 159, 160, 163, 164, 167, 168, 169, 170, 172, 173, 175, 176, 177, 179, 180, 182, 183, 184, 185, 187, 188, 189, 190, 191, 192, 196, 197, 198, 199, 200, 202, 203, 206, 210, 212, 214, 216, 219, 223, 224, 225, 226, 227, 229, 230, 233, 234, 239, 240, 243, 244, 247, 252, 254, 255, 256, 258, 259, 261, 262, 265, 266, 267, 268, 269, 270, 271, 272, 273, 275, 276, 277, 278, 282, 286, 291, 293, 294, 296, 299, 301, 303, 305, 311, 314, 315, 316, 317, 319, 320, 323, 325, 330, 334, 335, 336, 338, 339, 341, 344, 345, 348, 349, 350, 352, 354, 356, 358, 359, 360, 361, 362, 364, 367, 368, 370, 371, 373, 374, 375, 376, 380, 382, 383, 384, 385, 391, 392, 393, 394, 395, 398, 399, 401, 402, 403, 405, 406, 408, 409, 410, 411, 412, 413, 414, 416, 417, 418, 419, 420, 421, 423, 424, 425, 426, 427, 428, 433, 436, 437, 438, 439, 440, 443, 444, 445, 446, 447, 448, 451, 452, 453, 454, 455, 458, 460, 462, 463, 464, 465, 466, 467, 469, 470, 471, 473, 475, 476, 477, 478, 480, 481, 482, 484, 485, 487, 488, 490, 492, 493, 494, 496, 497, 498, 500, 504, 505, 507, 509, 510, 512, 514, 515, 516, 517, 519, 520, 522, 524, 526, 528, 529, 530, 531, 532, 533, 535, 536, 537, 538, 539, 541, 542, 543, 544, 545, 547, 548, 551, 552, 554, 557, 558, 559, 560, 561, 562, 563, 564, 566, 573, 580, 581, 582, 584, 585, 586, 588, 589, 591, 594, 595, 596, 597, 598, 599, 601, 603, 605, 606, 608, 610, 611, 612, 613, 615, 618, 620, 622, 624, 625, 626, 627, 629, 630, 632, 633, 634, 637, 641, 643, 645, 646, 648, 649, 651, 654, 656, 658, 659, 661, 662, 663, 664, 665, 666, 667, 668, 669, 671, 673, 675, 677, 678, 679, 680, 681, 683, 684, 685, 686, 687, 688, 689, 690, 692, 693, 694, 696, 697, 698, 699, 702, 703, 705, 707, 712, 714, 715, 716, 718, 719, 721, 726, 727, 730, 733, 734, 735, 736, 737, 739, 740, 741, 743, 746, 747, 748, 749, 750, 752, 753, 754, 756, 757, 758, 760, 762, 763, 765, 767, 768, 769, 770, 772, 773, 775, 776, 777, 778, 779, 780, 783, 785, 787, 788, 790, 793, 794, 795, 796, 797, 798, 799, 800, 802, 804, 806, 807, 808, 810, 811, 812, 813, 814, 817, 818, 819, 820, 821, 824, 825, 827, 829, 830, 831, 832, 835, 838, 839, 840, 841, 843, 844, 848, 849, 851, 853, 855, 857, 858, 859, 860, 861, 864, 865, 866, 867, 869, 870, 873, 874, 876, 877, 878, 879, 886, 888, 890, 892, 893, 894, 895, 896, 897, 898, 899, 901, 902, 903, 905, 907, 909, 911, 912, 913, 915, 917, 918, 920, 922, 923, 924, 926, 927, 928, 930, 931, 932, 934, 935, 941, 942, 943, 944, 945, 949, 950, 951, 953, 954, 956, 958, 960, 961, 963, 965, 968, 969, 972, 974, 975, 976, 977, 981, 983, 985, 986, 991, 993, 996, 998, 1000, 1001, 1005, 1006, 1008, 1009, 1010, 1011, 1013, 1014, 1015, 1017, 1018, 1019, 1020, 1022, 1023, 1027, 1030, 1031, 1037, 1039, 1042, 1043, 1044, 1046, 1047, 1050, 1051, 1053, 1055, 1057, 1058, 1059, 1061, 1062, 1063, 1064, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1084, 1086, 1087, 1090, 1092, 1094, 1096, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1112, 1113, 1115, 1117, 1119, 1121, 1123, 1124, 1126, 1127, 1128, 1131, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
Which county in northern California has the highest number of cities?
northern California refers to region = 'northern california'; the highest number of cities refers to max(count(city))
SELECT county FROM geographic WHERE region = 'northern california' GROUP BY county ORDER BY COUNT(city) DESC LIMIT 1
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,773
1,773
CREATE TABLE `geographic` ( city TEXT not null primary key, county TEXT null, region TEXT null )
[ "GROUP BY", "SELECT", "ORDER BY", "LIMIT", "COUNT", "FROM", "DESC" ]
7
simple
{ "case_1": [ 972 ], "case_2": [ 972 ], "case_3": [ 275, 311, 334, 590, 669, 886, 934, 972, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 1, 10, 11, 13, 15, 17, 20, 22, 28, 29, 36, 38, 43, 49, 55, 59, 62, 69, 73, 75, 78, 86, 89, 108, 115, 121, 125, 126, 133, 138, 140, 142, 143, 150, 159, 162, 163, 167, 169, 173, 174, 179, 181, 182, 185, 187, 188, 191, 199, 202, 206, 208, 213, 214, 229, 233, 247, 252, 262, 263, 275, 278, 281, 285, 286, 291, 309, 311, 313, 314, 319, 320, 324, 329, 334, 336, 337, 341, 342, 344, 345, 348, 349, 352, 353, 356, 359, 364, 365, 371, 373, 378, 379, 381, 385, 394, 395, 400, 403, 404, 409, 411, 424, 428, 429, 434, 435, 444, 445, 451, 454, 460, 462, 466, 469, 473, 481, 482, 495, 497, 505, 530, 532, 534, 536, 538, 542, 548, 552, 555, 560, 566, 567, 576, 578, 579, 583, 584, 586, 590, 592, 595, 611, 619, 621, 625, 626, 630, 634, 637, 638, 645, 654, 657, 659, 664, 665, 669, 681, 688, 690, 691, 696, 698, 701, 703, 708, 713, 718, 719, 721, 732, 733, 735, 743, 748, 752, 759, 760, 768, 778, 779, 790, 803, 810, 815, 817, 818, 823, 827, 830, 836, 850, 851, 861, 866, 869, 876, 886, 889, 891, 893, 901, 911, 918, 927, 929, 934, 946, 950, 951, 954, 956, 962, 963, 966, 967, 970, 972, 973, 975, 977, 981, 983, 987, 989, 993, 994, 1004, 1005, 1006, 1010, 1013, 1017, 1024, 1025, 1030, 1034, 1037, 1038, 1043, 1047, 1049, 1050, 1051, 1056, 1057, 1065, 1067, 1068, 1070, 1076, 1077, 1083, 1094, 1106, 1124, 1135, 1137, 1139, 1141 ] }
restaurant
How many restaurants can you find in Concord?
Concord refers to city = 'concord'
SELECT COUNT(id_restaurant) FROM location WHERE city = 'concord'
CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,774
1,774
CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, city TEXT null, foreign key city references geographic city on update cascade on delete cascade, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "COUNT", "SELECT", "FROM" ]
3
simple
{ "case_1": [ 442, 603 ], "case_2": [ 442, 603 ], "case_3": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141 ] }
restaurant
In which region can you find the top 4 most popular restaurants?
the top 4 most popular restaurant refers to top 4 max(review)
SELECT T2.region FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city ORDER BY T1.review DESC LIMIT 4
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,775
1,775
CREATE TABLE `geographic` ( city TEXT not null primary key, region TEXT null ) CREATE TABLE `generalinfo` ( city TEXT null, review REAL null, foreign key city references geographiccity on update cascade on delete cascade )
[ "AS", "SELECT", "ORDER BY", "LIMIT", "INNER JOIN", "ON", "DESC", "FROM" ]
9
simple
{ "case_1": [ 316 ], "case_2": [ 316, 334, 669, 934, 981 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 972, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 33, 34, 36, 37, 38, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 80, 81, 82, 83, 84, 85, 86, 88, 89, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 108, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 173, 174, 175, 176, 177, 179, 180, 181, 183, 184, 185, 186, 187, 188, 189, 190, 191, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 208, 211, 212, 213, 214, 217, 218, 219, 220, 221, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 252, 254, 256, 257, 258, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 285, 286, 287, 289, 290, 291, 292, 295, 296, 297, 298, 299, 300, 301, 302, 304, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 352, 353, 354, 356, 357, 358, 359, 360, 361, 363, 364, 365, 368, 369, 370, 371, 373, 374, 375, 376, 378, 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 444, 445, 446, 448, 449, 450, 451, 452, 454, 455, 456, 457, 459, 460, 462, 463, 464, 465, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 505, 507, 509, 511, 514, 515, 516, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 544, 547, 548, 550, 552, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 619, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 662, 663, 664, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 708, 710, 711, 712, 714, 715, 717, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 732, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 796, 797, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 815, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 836, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 869, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 934, 935, 936, 937, 938, 940, 943, 944, 946, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 972, 973, 974, 975, 977, 980, 981, 983, 985, 986, 987, 988, 991, 993, 994, 996, 997, 999, 1000, 1001, 1003, 1004, 1005, 1006, 1010, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1030, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1057, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1071, 1072, 1074, 1076, 1077, 1078, 1080, 1082, 1083, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1114, 1115, 1116, 1118, 1119, 1122, 1123, 1124, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1139, 1141 ] }
restaurant
How many Chinese restaurants are there on 1st st, Livermore?
Chinese restaurant refers to food_type = 'chinese'; 1st st refers to street_name = '1st st'; Livermore refers to city = 'livermore'
SELECT COUNT(T1.id_restaurant) FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'livermore' AND T1.food_type = 'chinese' AND T2.street_name = '1st st'
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,776
1,776
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, food_type TEXT null, city TEXT null, foreign key city references geographiccity on update cascade on delete cascade ) CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, street_name TEXT null, city TEXT null, foreign key city references geographic city on update cascade on delete cascade, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "AS", "AND", "SELECT", "INNER JOIN", "ON", "COUNT", "FROM" ]
9
simple
{ "case_1": [ 217, 275, 524, 590, 799, 895 ], "case_2": [ 217, 275, 524, 590, 799, 886, 895 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 32, 33, 34, 35, 36, 37, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 109, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 192, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 230, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 259, 260, 261, 262, 264, 265, 266, 267, 268, 269, 271, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 286, 287, 289, 290, 292, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 399, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 462, 463, 464, 465, 466, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 504, 505, 507, 509, 510, 511, 512, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 542, 544, 547, 548, 550, 552, 554, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 618, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 665, 666, 667, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 680, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 692, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 707, 710, 711, 712, 714, 715, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 730, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 817, 818, 819, 820, 822, 823, 824, 825, 827, 828, 829, 830, 831, 832, 833, 834, 835, 837, 838, 839, 841, 843, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 903, 904, 905, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 945, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 965, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1019, 1020, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1074, 1078, 1079, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1113, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1126, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
How many Indian restaurants are there in the Los Angeles area?
Indian restaurant refers to food_type = 'indian'; the Los Angeles area refers to region = 'los angeles area'
SELECT COUNT(T1.city) FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.food_type = 'indian' AND T1.region = 'los angeles area'
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,777
1,777
CREATE TABLE `geographic` ( city TEXT not null primary key, region TEXT null ) CREATE TABLE `generalinfo` ( food_type TEXT null, city TEXT null, foreign key city references geographiccity on update cascade on delete cascade )
[ "AS", "AND", "SELECT", "INNER JOIN", "ON", "COUNT", "FROM" ]
8
simple
{ "case_1": [ 316 ], "case_2": [ 316, 334, 669, 934, 981 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 32, 33, 34, 35, 36, 37, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 109, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 192, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 230, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 259, 260, 261, 262, 264, 265, 266, 267, 268, 269, 271, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 286, 287, 289, 290, 292, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 399, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 462, 463, 464, 465, 466, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 504, 505, 507, 509, 510, 511, 512, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 542, 544, 547, 548, 550, 552, 554, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 618, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 665, 666, 667, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 680, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 692, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 707, 710, 711, 712, 714, 715, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 730, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 817, 818, 819, 820, 822, 823, 824, 825, 827, 828, 829, 830, 831, 832, 833, 834, 835, 837, 838, 839, 841, 843, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 903, 904, 905, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 945, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 965, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1019, 1020, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1074, 1078, 1079, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1113, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1126, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
In the Bay Area, what is the most common type of food served by restaurants?
the Bay Area refers to region = 'bay area'; the most common type of food refers to max(count(food_type))
SELECT T2.food_type FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.region = 'bay area' GROUP BY T2.food_type ORDER BY COUNT(T2.food_type) DESC LIMIT 1
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,778
1,778
CREATE TABLE `geographic` ( city TEXT not null primary key, region TEXT null ) CREATE TABLE `generalinfo` ( food_type TEXT null, city TEXT null, foreign key city references geographiccity on update cascade on delete cascade )
[ "GROUP BY", "AS", "SELECT", "ORDER BY", "LIMIT", "INNER JOIN", "ON", "DESC", "COUNT", "FROM" ]
11
medium
{ "case_1": [ 334, 669, 934, 981 ], "case_2": [ 316, 334, 669, 934, 981 ], "case_3": [ 275, 311, 316, 334, 590, 597, 669, 799, 886, 934, 972, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 4, 6, 10, 11, 13, 15, 16, 20, 22, 27, 28, 29, 30, 36, 37, 47, 49, 51, 53, 55, 59, 62, 63, 68, 69, 73, 74, 75, 77, 78, 82, 86, 88, 89, 91, 93, 96, 98, 106, 108, 113, 115, 117, 118, 119, 121, 125, 126, 131, 138, 140, 142, 143, 146, 148, 150, 152, 159, 160, 162, 163, 164, 167, 169, 170, 173, 175, 179, 183, 184, 185, 187, 188, 189, 190, 191, 196, 197, 199, 200, 202, 206, 212, 213, 214, 225, 226, 227, 229, 233, 234, 239, 243, 244, 247, 252, 254, 256, 261, 262, 267, 268, 269, 275, 276, 277, 278, 281, 285, 286, 291, 299, 301, 309, 311, 313, 314, 316, 317, 319, 320, 323, 324, 325, 329, 330, 334, 335, 336, 338, 339, 341, 342, 344, 345, 348, 349, 352, 353, 354, 356, 358, 359, 360, 364, 365, 370, 371, 373, 374, 375, 378, 379, 381, 382, 383, 384, 385, 391, 392, 394, 395, 401, 403, 406, 409, 411, 412, 416, 417, 424, 426, 428, 429, 434, 435, 436, 444, 445, 448, 451, 454, 460, 462, 464, 465, 467, 469, 471, 473, 476, 477, 478, 482, 484, 487, 488, 490, 493, 495, 497, 500, 505, 509, 515, 516, 519, 520, 526, 530, 532, 535, 536, 537, 538, 542, 544, 547, 548, 552, 558, 559, 560, 563, 564, 566, 567, 573, 578, 579, 580, 581, 582, 584, 586, 590, 592, 595, 596, 597, 606, 608, 611, 613, 620, 621, 625, 626, 627, 630, 632, 633, 634, 637, 638, 641, 645, 646, 649, 651, 654, 657, 658, 659, 662, 663, 664, 665, 668, 669, 671, 681, 687, 688, 690, 691, 694, 696, 698, 701, 703, 705, 712, 714, 719, 720, 721, 727, 733, 734, 735, 736, 739, 740, 743, 748, 749, 750, 751, 752, 753, 756, 759, 760, 762, 768, 769, 772, 778, 779, 787, 790, 796, 797, 799, 800, 802, 803, 804, 810, 812, 813, 814, 818, 819, 823, 824, 827, 830, 838, 839, 841, 849, 850, 851, 853, 857, 861, 866, 867, 869, 870, 874, 876, 877, 882, 886, 888, 889, 891, 893, 896, 897, 898, 901, 902, 909, 911, 912, 915, 917, 918, 922, 923, 924, 926, 927, 929, 930, 932, 934, 935, 943, 950, 951, 953, 954, 956, 958, 961, 962, 963, 966, 967, 969, 970, 972, 973, 975, 977, 981, 983, 985, 986, 987, 993, 994, 996, 1004, 1005, 1006, 1010, 1013, 1015, 1017, 1022, 1023, 1025, 1030, 1034, 1037, 1038, 1042, 1043, 1047, 1049, 1050, 1051, 1056, 1057, 1058, 1062, 1064, 1065, 1067, 1068, 1071, 1072, 1076, 1077, 1078, 1082, 1084, 1086, 1087, 1091, 1094, 1100, 1101, 1103, 1104, 1106, 1112, 1119, 1123, 1124, 1128, 1131, 1133, 1134, 1135, 1137 ] }
restaurant
How many restaurants in Broadway, Oakland received a review of no more than 3?
Broadway refers to street_name = 'broadway';  Oakland refers to city = 'oakland'; a review of no more than 3 refers to review < 3
SELECT COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.street_name = 'broadway' AND T2.review < 3 AND T1.city = 'oakland'
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,779
1,779
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, city TEXT null, review REAL null, foreign key city references geographiccity on update cascade on delete cascade ) CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, street_name TEXT null, city TEXT null, foreign key city references geographic city on update cascade on delete cascade, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "AS", "AND", "SELECT", "INNER JOIN", "ON", "COUNT", "FROM" ]
9
simple
{ "case_1": [ 217, 275, 524, 590, 799, 895 ], "case_2": [ 217, 275, 524, 590, 799, 886, 895 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 32, 33, 34, 35, 36, 37, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 109, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 192, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 230, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 259, 260, 261, 262, 264, 265, 266, 267, 268, 269, 271, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 286, 287, 289, 290, 292, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 399, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 462, 463, 464, 465, 466, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 504, 505, 507, 509, 510, 511, 512, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 542, 544, 547, 548, 550, 552, 554, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 618, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 665, 666, 667, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 680, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 692, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 707, 710, 711, 712, 714, 715, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 730, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 817, 818, 819, 820, 822, 823, 824, 825, 827, 828, 829, 830, 831, 832, 833, 834, 835, 837, 838, 839, 841, 843, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 903, 904, 905, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 945, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 965, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1019, 1020, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1074, 1078, 1079, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1113, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1126, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
In which region can you find the highest number of Baskin Robbins restaurants?
the highest number refers to max(count(city)); Baskin Robbins restaurant refers to label = 'baskin robbins'
SELECT T2.region AS num FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.label = 'baskin robbins' GROUP BY T2.region ORDER BY COUNT(T1.city) DESC LIMIT 1
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,780
1,780
CREATE TABLE `geographic` ( city TEXT not null primary key, region TEXT null ) CREATE TABLE `generalinfo` ( label TEXT null, city TEXT null, foreign key city references geographiccity on update cascade on delete cascade )
[ "GROUP BY", "AS", "SELECT", "ORDER BY", "LIMIT", "INNER JOIN", "ON", "DESC", "COUNT", "FROM" ]
12
medium
{ "case_1": [ 334, 669, 934, 981 ], "case_2": [ 316, 334, 669, 934, 981 ], "case_3": [ 275, 311, 316, 334, 590, 597, 669, 799, 886, 934, 972, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 4, 6, 10, 11, 13, 15, 16, 20, 22, 27, 28, 29, 30, 36, 37, 47, 49, 51, 53, 55, 59, 62, 63, 68, 69, 73, 74, 75, 77, 78, 82, 86, 88, 89, 91, 93, 96, 98, 106, 108, 113, 115, 117, 118, 119, 121, 125, 126, 131, 138, 140, 142, 143, 146, 148, 150, 152, 159, 160, 162, 163, 164, 167, 169, 170, 173, 175, 179, 183, 184, 185, 187, 188, 189, 190, 191, 196, 197, 199, 200, 202, 206, 212, 213, 214, 225, 226, 227, 229, 233, 234, 239, 243, 244, 247, 252, 254, 256, 261, 262, 267, 268, 269, 275, 276, 277, 278, 281, 285, 286, 291, 299, 301, 309, 311, 313, 314, 316, 317, 319, 320, 323, 324, 325, 329, 330, 334, 335, 336, 338, 339, 341, 342, 344, 345, 348, 349, 352, 353, 354, 356, 358, 359, 360, 364, 365, 370, 371, 373, 374, 375, 378, 379, 381, 382, 383, 384, 385, 391, 392, 394, 395, 401, 403, 406, 409, 411, 412, 416, 417, 424, 426, 428, 429, 434, 435, 436, 444, 445, 448, 451, 454, 460, 462, 464, 465, 467, 469, 471, 473, 476, 477, 478, 482, 484, 487, 488, 490, 493, 495, 497, 500, 505, 509, 515, 516, 519, 520, 526, 530, 532, 535, 536, 537, 538, 542, 544, 547, 548, 552, 558, 559, 560, 563, 564, 566, 567, 573, 578, 579, 580, 581, 582, 584, 586, 590, 592, 595, 596, 597, 606, 608, 611, 613, 620, 621, 625, 626, 627, 630, 632, 633, 634, 637, 638, 641, 645, 646, 649, 651, 654, 657, 658, 659, 662, 663, 664, 665, 668, 669, 671, 681, 687, 688, 690, 691, 694, 696, 698, 701, 703, 705, 712, 714, 719, 720, 721, 727, 733, 734, 735, 736, 739, 740, 743, 748, 749, 750, 751, 752, 753, 756, 759, 760, 762, 768, 769, 772, 778, 779, 787, 790, 796, 797, 799, 800, 802, 803, 804, 810, 812, 813, 814, 818, 819, 823, 824, 827, 830, 838, 839, 841, 849, 850, 851, 853, 857, 861, 866, 867, 869, 870, 874, 876, 877, 882, 886, 888, 889, 891, 893, 896, 897, 898, 901, 902, 909, 911, 912, 915, 917, 918, 922, 923, 924, 926, 927, 929, 930, 932, 934, 935, 943, 950, 951, 953, 954, 956, 958, 961, 962, 963, 966, 967, 969, 970, 972, 973, 975, 977, 981, 983, 985, 986, 987, 993, 994, 996, 1004, 1005, 1006, 1010, 1013, 1015, 1017, 1022, 1023, 1025, 1030, 1034, 1037, 1038, 1042, 1043, 1047, 1049, 1050, 1051, 1056, 1057, 1058, 1062, 1064, 1065, 1067, 1068, 1071, 1072, 1076, 1077, 1078, 1082, 1084, 1086, 1087, 1091, 1094, 1100, 1101, 1103, 1104, 1106, 1112, 1119, 1123, 1124, 1128, 1131, 1133, 1134, 1135, 1137 ] }
restaurant
List all the streets where pizza-serving restaurants are found in San Jose.
street refers to street_name; pizza-serving restaurant refers to food_type = 'pizza'; San Jose refers to city = 'san jose'
SELECT T1.street_name FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.food_type = 'pizza' AND T1.city = 'san jose'
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,781
1,781
CREATE TABLE `generalinfo` ( food_type TEXT null, city TEXT null, foreign key city references geographiccity on update cascade on delete cascade ) CREATE TABLE `location` ( street_name TEXT null, city TEXT null, foreign key city references geographic city on update cascade on delete cascade )
[ "AS", "AND", "SELECT", "INNER JOIN", "ON", "FROM" ]
7
simple
{ "case_1": [ 217, 275, 524, 590, 799, 895 ], "case_2": [ 217, 275, 524, 590, 799, 886, 895 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 88, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 264, 265, 266, 267, 268, 269, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 444, 445, 446, 447, 448, 449, 450, 451, 452, 454, 455, 456, 457, 459, 460, 462, 463, 464, 465, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 505, 507, 509, 510, 511, 514, 515, 516, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 544, 547, 548, 550, 552, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1071, 1072, 1074, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
How many types of restaurants are there in the Yosemite and Mono Lake area?
SELECT COUNT(T2.food_type) FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.region = 'yosemite and mono lake area'
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,782
1,782
CREATE TABLE `geographic` ( city TEXT not null primary key, region TEXT null ) CREATE TABLE `generalinfo` ( food_type TEXT null, city TEXT null, foreign key city references geographiccity on update cascade on delete cascade )
[ "AS", "SELECT", "and", "INNER JOIN", "ON", "COUNT", "FROM" ]
8
simple
{ "case_1": [ 316 ], "case_2": [ 316, 334, 669, 934, 981 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 35, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 173, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 192, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 264, 265, 266, 267, 268, 269, 271, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 286, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 368, 369, 370, 373, 374, 375, 376, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 462, 463, 464, 465, 466, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 504, 505, 507, 509, 510, 511, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 542, 544, 547, 548, 550, 552, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 661, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 999, 1000, 1001, 1003, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1074, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1113, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
restaurant
What is the full address of the most popular restaurant among the diners?
full address refers to street_num, street_name, city; the most popular refers to max(review)
SELECT T2.street_name, T2.street_num, T2.city FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant ORDER BY T1.review DESC LIMIT 1
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,783
1,783
CREATE TABLE `generalinfo` ( id_restaurant INTEGER not null primary key, city TEXT null, review REAL null, foreign key city references geographiccity on update cascade on delete cascade ) CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key city references geographic city on update cascade on delete cascade, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "AS", "SELECT", "ORDER BY", "LIMIT", "INNER JOIN", "ON", "DESC", "FROM" ]
9
simple
{ "case_1": [ 217, 275, 524, 590, 799, 895 ], "case_2": [ 217, 275, 524, 590, 799, 886, 895 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 972, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 33, 34, 36, 37, 38, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 80, 81, 82, 83, 84, 85, 86, 88, 89, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 108, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 173, 174, 175, 176, 177, 179, 180, 181, 183, 184, 185, 186, 187, 188, 189, 190, 191, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 208, 211, 212, 213, 214, 217, 218, 219, 220, 221, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 252, 254, 256, 257, 258, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 285, 286, 287, 289, 290, 291, 292, 295, 296, 297, 298, 299, 300, 301, 302, 304, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 352, 353, 354, 356, 357, 358, 359, 360, 361, 363, 364, 365, 368, 369, 370, 371, 373, 374, 375, 376, 378, 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 444, 445, 446, 448, 449, 450, 451, 452, 454, 455, 456, 457, 459, 460, 462, 463, 464, 465, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 505, 507, 509, 511, 514, 515, 516, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 544, 547, 548, 550, 552, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 619, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 662, 663, 664, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 708, 710, 711, 712, 714, 715, 717, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 732, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 796, 797, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 815, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 836, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 869, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 934, 935, 936, 937, 938, 940, 943, 944, 946, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 972, 973, 974, 975, 977, 980, 981, 983, 985, 986, 987, 988, 991, 993, 994, 996, 997, 999, 1000, 1001, 1003, 1004, 1005, 1006, 1010, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1030, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1057, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1071, 1072, 1074, 1076, 1077, 1078, 1080, 1082, 1083, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1114, 1115, 1116, 1118, 1119, 1122, 1123, 1124, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1139, 1141 ] }
restaurant
In which counties can you find the restaurant with the highest number of branches?
restaurant refers to label; the highest number of branches refers to max(count(city))
SELECT T2.county FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city GROUP BY T2.county ORDER BY COUNT(T1.label) DESC LIMIT 1
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,784
1,784
CREATE TABLE `geographic` ( city TEXT not null primary key, county TEXT null ) CREATE TABLE `generalinfo` ( label TEXT null, city TEXT null, foreign key city references geographiccity on update cascade on delete cascade )
[ "GROUP BY", "AS", "SELECT", "ORDER BY", "LIMIT", "INNER JOIN", "ON", "DESC", "COUNT", "FROM" ]
11
medium
{ "case_1": [ 334, 669, 934, 981 ], "case_2": [ 316, 334, 669, 934, 981 ], "case_3": [ 275, 311, 316, 334, 590, 597, 669, 799, 886, 934, 972, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 4, 6, 10, 11, 13, 15, 16, 20, 22, 27, 28, 29, 30, 36, 37, 47, 49, 51, 53, 55, 59, 62, 63, 68, 69, 73, 74, 75, 77, 78, 82, 86, 88, 89, 91, 93, 96, 98, 106, 108, 113, 115, 117, 118, 119, 121, 125, 126, 131, 138, 140, 142, 143, 146, 148, 150, 152, 159, 160, 162, 163, 164, 167, 169, 170, 173, 175, 179, 183, 184, 185, 187, 188, 189, 190, 191, 196, 197, 199, 200, 202, 206, 212, 213, 214, 225, 226, 227, 229, 233, 234, 239, 243, 244, 247, 252, 254, 256, 261, 262, 267, 268, 269, 275, 276, 277, 278, 281, 285, 286, 291, 299, 301, 309, 311, 313, 314, 316, 317, 319, 320, 323, 324, 325, 329, 330, 334, 335, 336, 338, 339, 341, 342, 344, 345, 348, 349, 352, 353, 354, 356, 358, 359, 360, 364, 365, 370, 371, 373, 374, 375, 378, 379, 381, 382, 383, 384, 385, 391, 392, 394, 395, 401, 403, 406, 409, 411, 412, 416, 417, 424, 426, 428, 429, 434, 435, 436, 444, 445, 448, 451, 454, 460, 462, 464, 465, 467, 469, 471, 473, 476, 477, 478, 482, 484, 487, 488, 490, 493, 495, 497, 500, 505, 509, 515, 516, 519, 520, 526, 530, 532, 535, 536, 537, 538, 542, 544, 547, 548, 552, 558, 559, 560, 563, 564, 566, 567, 573, 578, 579, 580, 581, 582, 584, 586, 590, 592, 595, 596, 597, 606, 608, 611, 613, 620, 621, 625, 626, 627, 630, 632, 633, 634, 637, 638, 641, 645, 646, 649, 651, 654, 657, 658, 659, 662, 663, 664, 665, 668, 669, 671, 681, 687, 688, 690, 691, 694, 696, 698, 701, 703, 705, 712, 714, 719, 720, 721, 727, 733, 734, 735, 736, 739, 740, 743, 748, 749, 750, 751, 752, 753, 756, 759, 760, 762, 768, 769, 772, 778, 779, 787, 790, 796, 797, 799, 800, 802, 803, 804, 810, 812, 813, 814, 818, 819, 823, 824, 827, 830, 838, 839, 841, 849, 850, 851, 853, 857, 861, 866, 867, 869, 870, 874, 876, 877, 882, 886, 888, 889, 891, 893, 896, 897, 898, 901, 902, 909, 911, 912, 915, 917, 918, 922, 923, 924, 926, 927, 929, 930, 932, 934, 935, 943, 950, 951, 953, 954, 956, 958, 961, 962, 963, 966, 967, 969, 970, 972, 973, 975, 977, 981, 983, 985, 986, 987, 993, 994, 996, 1004, 1005, 1006, 1010, 1013, 1015, 1017, 1022, 1023, 1025, 1030, 1034, 1037, 1038, 1042, 1043, 1047, 1049, 1050, 1051, 1056, 1057, 1058, 1062, 1064, 1065, 1067, 1068, 1071, 1072, 1076, 1077, 1078, 1082, 1084, 1086, 1087, 1091, 1094, 1100, 1101, 1103, 1104, 1106, 1112, 1119, 1123, 1124, 1128, 1131, 1133, 1134, 1135, 1137 ] }
restaurant
Which region has the highest number of restaurants?
the highest number refers to max(count(id_restaurant))
SELECT T1.region FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city GROUP BY T1.region ORDER BY COUNT(T2.id_restaurant) DESC LIMIT 1
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,785
1,785
CREATE TABLE `geographic` ( city TEXT not null primary key, region TEXT null ) CREATE TABLE `location` ( id_restaurant INTEGER not null primary key, city TEXT null, foreign key city references geographic city on update cascade on delete cascade, foreign key id_restaurant references generalinfo id_restaurant on update cascade on delete cascade )
[ "GROUP BY", "AS", "SELECT", "ORDER BY", "LIMIT", "INNER JOIN", "ON", "DESC", "COUNT", "FROM" ]
11
medium
{ "case_1": [ 311 ], "case_2": [ 311, 597 ], "case_3": [ 275, 311, 316, 334, 590, 597, 669, 799, 886, 934, 972, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 4, 6, 10, 11, 13, 15, 16, 20, 22, 27, 28, 29, 30, 36, 37, 47, 49, 51, 53, 55, 59, 62, 63, 68, 69, 73, 74, 75, 77, 78, 82, 86, 88, 89, 91, 93, 96, 98, 106, 108, 113, 115, 117, 118, 119, 121, 125, 126, 131, 138, 140, 142, 143, 146, 148, 150, 152, 159, 160, 162, 163, 164, 167, 169, 170, 173, 175, 179, 183, 184, 185, 187, 188, 189, 190, 191, 196, 197, 199, 200, 202, 206, 212, 213, 214, 225, 226, 227, 229, 233, 234, 239, 243, 244, 247, 252, 254, 256, 261, 262, 267, 268, 269, 275, 276, 277, 278, 281, 285, 286, 291, 299, 301, 309, 311, 313, 314, 316, 317, 319, 320, 323, 324, 325, 329, 330, 334, 335, 336, 338, 339, 341, 342, 344, 345, 348, 349, 352, 353, 354, 356, 358, 359, 360, 364, 365, 370, 371, 373, 374, 375, 378, 379, 381, 382, 383, 384, 385, 391, 392, 394, 395, 401, 403, 406, 409, 411, 412, 416, 417, 424, 426, 428, 429, 434, 435, 436, 444, 445, 448, 451, 454, 460, 462, 464, 465, 467, 469, 471, 473, 476, 477, 478, 482, 484, 487, 488, 490, 493, 495, 497, 500, 505, 509, 515, 516, 519, 520, 526, 530, 532, 535, 536, 537, 538, 542, 544, 547, 548, 552, 558, 559, 560, 563, 564, 566, 567, 573, 578, 579, 580, 581, 582, 584, 586, 590, 592, 595, 596, 597, 606, 608, 611, 613, 620, 621, 625, 626, 627, 630, 632, 633, 634, 637, 638, 641, 645, 646, 649, 651, 654, 657, 658, 659, 662, 663, 664, 665, 668, 669, 671, 681, 687, 688, 690, 691, 694, 696, 698, 701, 703, 705, 712, 714, 719, 720, 721, 727, 733, 734, 735, 736, 739, 740, 743, 748, 749, 750, 751, 752, 753, 756, 759, 760, 762, 768, 769, 772, 778, 779, 787, 790, 796, 797, 799, 800, 802, 803, 804, 810, 812, 813, 814, 818, 819, 823, 824, 827, 830, 838, 839, 841, 849, 850, 851, 853, 857, 861, 866, 867, 869, 870, 874, 876, 877, 882, 886, 888, 889, 891, 893, 896, 897, 898, 901, 902, 909, 911, 912, 915, 917, 918, 922, 923, 924, 926, 927, 929, 930, 932, 934, 935, 943, 950, 951, 953, 954, 956, 958, 961, 962, 963, 966, 967, 969, 970, 972, 973, 975, 977, 981, 983, 985, 986, 987, 993, 994, 996, 1004, 1005, 1006, 1010, 1013, 1015, 1017, 1022, 1023, 1025, 1030, 1034, 1037, 1038, 1042, 1043, 1047, 1049, 1050, 1051, 1056, 1057, 1058, 1062, 1064, 1065, 1067, 1068, 1071, 1072, 1076, 1077, 1078, 1082, 1084, 1086, 1087, 1091, 1094, 1100, 1101, 1103, 1104, 1106, 1112, 1119, 1123, 1124, 1128, 1131, 1133, 1134, 1135, 1137 ] }
restaurant
List the full address of all the American restaurants with a review of 4 or more?
full address refers to street_num, street_name, city; American restaurant refers to food_type = 'american'; a review of 4 or more refers to review > 4
SELECT T1.street_num, T1.street_name, T1.city FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.review >= 4
CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
CREATE TABLE geographic ( city TEXT not null primary key, county TEXT null, region TEXT null ) CREATE TABLE generalinfo ( id_restaurant INTEGER not null primary key, label TEXT null, food_type TEXT null, city TEXT null, review REAL null, foreign key (city) references geographic(city) on update cascade on delete cascade ) CREATE TABLE location ( id_restaurant INTEGER not null primary key, street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key (city) references geographic (city) on update cascade on delete cascade, foreign key (id_restaurant) references generalinfo (id_restaurant) on update cascade on delete cascade )
na
1,786
1,786
CREATE TABLE `generalinfo` ( city TEXT null, review REAL null, foreign key city references geographiccity on update cascade on delete cascade ) CREATE TABLE `location` ( street_num INTEGER null, street_name TEXT null, city TEXT null, foreign key city references geographic city on update cascade on delete cascade )
[ "AS", "SELECT", "INNER JOIN", "ON", "FROM" ]
6
simple
{ "case_1": [ 217, 275, 524, 590, 799, 895 ], "case_2": [ 217, 275, 524, 590, 799, 886, 895 ], "case_3": [ 217, 275, 311, 316, 334, 524, 590, 597, 669, 799, 886, 895, 934, 981 ], "case_4": [ 217, 275, 311, 316, 332, 334, 442, 524, 590, 597, 603, 669, 799, 886, 895, 934, 972, 981, 1073 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 35, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 104, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 192, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 215, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 271, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 286, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 462, 463, 464, 465, 466, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 504, 505, 506, 507, 508, 509, 510, 511, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 526, 527, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 542, 544, 547, 548, 550, 552, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 657, 658, 659, 660, 661, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 786, 787, 788, 790, 792, 793, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 978, 980, 981, 982, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1004, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1074, 1075, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1113, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
soccer_2016
How many players were born after the year 1985?
born after the year 1985 refers to SUBSTR(DOB, 1, 4) > 1985
SELECT COUNT(Player_Id) FROM Player WHERE SUBSTR(DOB, 1, 4) > 1985
CREATE TABLE Player ( Player_Id INTEGER primary key, Player_Name TEXT, DOB DATE, Batting_hand INTEGER, Bowling_skill INTEGER, Country_Name INTEGER, foreign key (Batting_hand) references Batting_Style(Batting_Id), foreign key (Bowling_skill) references Bowling_Style(Bowling_Id), foreign key (Country_Name) references Country(Country_Id) )
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ) CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ) CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTEGER ) CREATE TABLE Country ( Country_Id INTEGER primary key, Country_Name TEXT, foreign key (Country_Id) references Country(Country_Id) ) CREATE TABLE Extra_Type ( Extra_Id INTEGER primary key, Extra_Name TEXT ) CREATE TABLE Extra_Runs ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Extra_Type_Id INTEGER, Extra_Runs INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Extra_Type_Id) references Extra_Type(Extra_Id) ) CREATE TABLE Out_Type ( Out_Id INTEGER primary key, Out_Name TEXT ) CREATE TABLE Outcome ( Outcome_Id INTEGER primary key, Outcome_Type TEXT ) CREATE TABLE Player ( Player_Id INTEGER primary key, Player_Name TEXT, DOB DATE, Batting_hand INTEGER, Bowling_skill INTEGER, Country_Name INTEGER, foreign key (Batting_hand) references Batting_Style(Batting_Id), foreign key (Bowling_skill) references Bowling_Style(Bowling_Id), foreign key (Country_Name) references Country(Country_Id) ) CREATE TABLE Rolee ( Role_Id INTEGER primary key, Role_Desc TEXT ) CREATE TABLE Season ( Season_Id INTEGER primary key, Man_of_the_Series INTEGER, Orange_Cap INTEGER, Purple_Cap INTEGER, Season_Year INTEGER ) CREATE TABLE Team ( Team_Id INTEGER primary key, Team_Name TEXT ) CREATE TABLE Toss_Decision ( Toss_Id INTEGER primary key, Toss_Name TEXT ) CREATE TABLE Umpire ( Umpire_Id INTEGER primary key, Umpire_Name TEXT, Umpire_Country INTEGER, foreign key (Umpire_Country) references Country(Country_Id) ) CREATE TABLE Venue ( Venue_Id INTEGER primary key, Venue_Name TEXT, City_Id INTEGER, foreign key (City_Id) references City(City_Id) ) CREATE TABLE Win_By ( Win_Id INTEGER primary key, Win_Type TEXT ) CREATE TABLE Match ( Match_Id INTEGER primary key, Team_1 INTEGER, Team_2 INTEGER, Match_Date DATE, Season_Id INTEGER, Venue_Id INTEGER, Toss_Winner INTEGER, Toss_Decide INTEGER, Win_Type INTEGER, Win_Margin INTEGER, Outcome_type INTEGER, Match_Winner INTEGER, Man_of_the_Match INTEGER, foreign key (Team_1) references Team(Team_Id), foreign key (Team_2) references Team(Team_Id), foreign key (Season_Id) references Season(Season_Id), foreign key (Venue_Id) references Venue(Venue_Id), foreign key (Toss_Winner) references Team(Team_Id), foreign key (Toss_Decide) references Toss_Decision(Toss_Id), foreign key (Win_Type) references Win_By(Win_Id), foreign key (Outcome_type) references Out_Type(Out_Id), foreign key (Match_Winner) references Team(Team_Id), foreign key (Man_of_the_Match) references Player(Player_Id) ) CREATE TABLE Ball_by_Ball ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Innings_No INTEGER, Team_Batting INTEGER, Team_Bowling INTEGER, Striker_Batting_Position INTEGER, Striker INTEGER, Non_Striker INTEGER, Bowler INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id) ) CREATE TABLE Batsman_Scored ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Runs_Scored INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id) ) CREATE TABLE Player_Match ( Match_Id INTEGER, Player_Id INTEGER, Role_Id INTEGER, Team_Id INTEGER, primary key (Match_Id, Player_Id, Role_Id), foreign key (Match_Id) references Match(Match_Id), foreign key (Player_Id) references Player(Player_Id), foreign key (Team_Id) references Team(Team_Id), foreign key (Role_Id) references Rolee(Role_Id) ) CREATE TABLE Wicket_Taken ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Player_Out INTEGER, Kind_Out INTEGER, Fielders INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id), foreign key (Player_Out) references Player(Player_Id), foreign key (Kind_Out) references Out_Type(Out_Id), foreign key (Fielders) references Player(Player_Id) )
na
1,787
1,787
CREATE TABLE `Player` ( Player_Id INTEGER primary key, DOB DATE )
[ "SUBSTR", "COUNT", "SELECT", "FROM" ]
4
simple
{ "case_1": [ 2, 259 ], "case_2": [ 2, 259 ], "case_3": [ 2, 54, 122, 212, 225, 229, 252, 259, 314, 349, 383, 509, 547, 548, 564, 654, 688, 714, 743, 778, 787, 943, 951, 1037, 1064, 1078, 1087, 1124 ], "case_4": [ 2, 43, 54, 122, 134, 150, 201, 205, 212, 225, 229, 232, 245, 252, 259, 314, 349, 383, 509, 518, 547, 548, 550, 564, 577, 592, 617, 640, 644, 654, 688, 700, 713, 714, 743, 778, 787, 829, 943, 951, 959, 979, 1024, 1037, 1064, 1065, 1078, 1087, 1091, 1092, 1093, 1098, 1102, 1110, 1124 ], "case_5": [ 0, 1, 2, 4, 6, 9, 11, 13, 15, 16, 22, 25, 27, 28, 30, 32, 35, 36, 37, 40, 47, 50, 51, 53, 54, 55, 61, 62, 63, 67, 68, 69, 73, 74, 75, 77, 78, 82, 86, 87, 88, 89, 91, 93, 96, 98, 106, 108, 109, 113, 115, 117, 118, 119, 121, 122, 124, 125, 126, 131, 140, 142, 143, 146, 147, 148, 152, 157, 159, 160, 164, 167, 169, 170, 173, 175, 179, 182, 183, 184, 185, 187, 188, 189, 190, 191, 192, 196, 197, 198, 199, 202, 203, 206, 210, 212, 214, 216, 219, 224, 225, 226, 227, 229, 230, 233, 234, 237, 243, 244, 247, 252, 254, 256, 259, 261, 267, 268, 269, 271, 273, 276, 277, 286, 291, 293, 294, 299, 301, 303, 311, 314, 316, 317, 319, 320, 323, 325, 330, 334, 335, 336, 338, 339, 341, 344, 345, 348, 349, 352, 354, 358, 359, 360, 364, 370, 371, 373, 374, 375, 380, 382, 383, 384, 391, 392, 394, 399, 401, 403, 406, 409, 410, 411, 412, 416, 417, 418, 420, 421, 423, 424, 426, 436, 443, 444, 445, 447, 448, 451, 453, 454, 458, 460, 462, 464, 465, 466, 467, 469, 471, 473, 476, 477, 478, 481, 484, 485, 487, 488, 490, 493, 500, 504, 505, 509, 510, 512, 515, 516, 517, 519, 520, 526, 531, 532, 535, 536, 537, 538, 542, 543, 544, 545, 547, 548, 552, 554, 558, 559, 560, 563, 564, 566, 573, 580, 581, 582, 585, 591, 594, 595, 596, 597, 598, 603, 606, 608, 611, 613, 618, 620, 627, 629, 630, 632, 633, 634, 641, 645, 646, 649, 654, 656, 658, 659, 661, 662, 663, 664, 665, 667, 668, 669, 671, 673, 680, 681, 687, 688, 689, 692, 694, 696, 698, 703, 705, 707, 712, 714, 718, 719, 721, 727, 730, 733, 734, 735, 736, 737, 739, 740, 743, 748, 749, 750, 752, 753, 756, 757, 760, 762, 768, 769, 770, 772, 778, 779, 787, 790, 795, 796, 797, 798, 799, 800, 802, 804, 811, 812, 813, 814, 817, 818, 819, 820, 821, 824, 827, 830, 831, 838, 839, 841, 843, 849, 851, 853, 857, 865, 866, 867, 869, 870, 874, 876, 877, 886, 888, 890, 893, 894, 896, 897, 898, 899, 901, 902, 903, 909, 911, 912, 913, 915, 917, 918, 922, 923, 924, 926, 927, 930, 934, 935, 941, 942, 943, 945, 950, 951, 954, 956, 958, 960, 961, 963, 965, 968, 969, 972, 975, 976, 977, 981, 983, 985, 986, 993, 996, 1005, 1006, 1008, 1010, 1011, 1013, 1014, 1015, 1020, 1022, 1023, 1030, 1037, 1042, 1043, 1047, 1050, 1051, 1053, 1055, 1057, 1058, 1059, 1062, 1064, 1067, 1069, 1070, 1071, 1072, 1076, 1077, 1078, 1079, 1082, 1084, 1086, 1087, 1090, 1094, 1096, 1097, 1100, 1101, 1103, 1104, 1106, 1112, 1113, 1119, 1121, 1123, 1124, 1126, 1127, 1128, 1131, 1133, 1134, 1135, 1137 ] }
soccer_2016
How many matches were there in May, 2008?
in May 2008 refers to SUBSTR(Match_Date, 1, 4) = '2008' AND SUBSTR(Match_Date, 7, 1) = '5'
SELECT COUNT(Match_Id) FROM `Match` WHERE SUBSTR(Match_Date, 1, 4) = '2008' AND SUBSTR(Match_Date, 7, 1) = '5'
CREATE TABLE Match ( Match_Id INTEGER primary key, Team_1 INTEGER, Team_2 INTEGER, Match_Date DATE, Season_Id INTEGER, Venue_Id INTEGER, Toss_Winner INTEGER, Toss_Decide INTEGER, Win_Type INTEGER, Win_Margin INTEGER, Outcome_type INTEGER, Match_Winner INTEGER, Man_of_the_Match INTEGER, foreign key (Team_1) references Team(Team_Id), foreign key (Team_2) references Team(Team_Id), foreign key (Season_Id) references Season(Season_Id), foreign key (Venue_Id) references Venue(Venue_Id), foreign key (Toss_Winner) references Team(Team_Id), foreign key (Toss_Decide) references Toss_Decision(Toss_Id), foreign key (Win_Type) references Win_By(Win_Id), foreign key (Outcome_type) references Out_Type(Out_Id), foreign key (Match_Winner) references Team(Team_Id), foreign key (Man_of_the_Match) references Player(Player_Id) )
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ) CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ) CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTEGER ) CREATE TABLE Country ( Country_Id INTEGER primary key, Country_Name TEXT, foreign key (Country_Id) references Country(Country_Id) ) CREATE TABLE Extra_Type ( Extra_Id INTEGER primary key, Extra_Name TEXT ) CREATE TABLE Extra_Runs ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Extra_Type_Id INTEGER, Extra_Runs INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Extra_Type_Id) references Extra_Type(Extra_Id) ) CREATE TABLE Out_Type ( Out_Id INTEGER primary key, Out_Name TEXT ) CREATE TABLE Outcome ( Outcome_Id INTEGER primary key, Outcome_Type TEXT ) CREATE TABLE Player ( Player_Id INTEGER primary key, Player_Name TEXT, DOB DATE, Batting_hand INTEGER, Bowling_skill INTEGER, Country_Name INTEGER, foreign key (Batting_hand) references Batting_Style(Batting_Id), foreign key (Bowling_skill) references Bowling_Style(Bowling_Id), foreign key (Country_Name) references Country(Country_Id) ) CREATE TABLE Rolee ( Role_Id INTEGER primary key, Role_Desc TEXT ) CREATE TABLE Season ( Season_Id INTEGER primary key, Man_of_the_Series INTEGER, Orange_Cap INTEGER, Purple_Cap INTEGER, Season_Year INTEGER ) CREATE TABLE Team ( Team_Id INTEGER primary key, Team_Name TEXT ) CREATE TABLE Toss_Decision ( Toss_Id INTEGER primary key, Toss_Name TEXT ) CREATE TABLE Umpire ( Umpire_Id INTEGER primary key, Umpire_Name TEXT, Umpire_Country INTEGER, foreign key (Umpire_Country) references Country(Country_Id) ) CREATE TABLE Venue ( Venue_Id INTEGER primary key, Venue_Name TEXT, City_Id INTEGER, foreign key (City_Id) references City(City_Id) ) CREATE TABLE Win_By ( Win_Id INTEGER primary key, Win_Type TEXT ) CREATE TABLE Match ( Match_Id INTEGER primary key, Team_1 INTEGER, Team_2 INTEGER, Match_Date DATE, Season_Id INTEGER, Venue_Id INTEGER, Toss_Winner INTEGER, Toss_Decide INTEGER, Win_Type INTEGER, Win_Margin INTEGER, Outcome_type INTEGER, Match_Winner INTEGER, Man_of_the_Match INTEGER, foreign key (Team_1) references Team(Team_Id), foreign key (Team_2) references Team(Team_Id), foreign key (Season_Id) references Season(Season_Id), foreign key (Venue_Id) references Venue(Venue_Id), foreign key (Toss_Winner) references Team(Team_Id), foreign key (Toss_Decide) references Toss_Decision(Toss_Id), foreign key (Win_Type) references Win_By(Win_Id), foreign key (Outcome_type) references Out_Type(Out_Id), foreign key (Match_Winner) references Team(Team_Id), foreign key (Man_of_the_Match) references Player(Player_Id) ) CREATE TABLE Ball_by_Ball ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Innings_No INTEGER, Team_Batting INTEGER, Team_Bowling INTEGER, Striker_Batting_Position INTEGER, Striker INTEGER, Non_Striker INTEGER, Bowler INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id) ) CREATE TABLE Batsman_Scored ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Runs_Scored INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id) ) CREATE TABLE Player_Match ( Match_Id INTEGER, Player_Id INTEGER, Role_Id INTEGER, Team_Id INTEGER, primary key (Match_Id, Player_Id, Role_Id), foreign key (Match_Id) references Match(Match_Id), foreign key (Player_Id) references Player(Player_Id), foreign key (Team_Id) references Team(Team_Id), foreign key (Role_Id) references Rolee(Role_Id) ) CREATE TABLE Wicket_Taken ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Player_Out INTEGER, Kind_Out INTEGER, Fielders INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id), foreign key (Player_Out) references Player(Player_Id), foreign key (Kind_Out) references Out_Type(Out_Id), foreign key (Fielders) references Player(Player_Id) )
na
1,788
1,788
CREATE TABLE `Match` ( Match_Id INTEGER primary key, Match_Date DATE )
[ "AND", "SELECT", "SUBSTR", "COUNT", "FROM" ]
6
simple
{ "case_1": [ 122 ], "case_2": [ 122 ], "case_3": [ 2, 43, 54, 122, 212, 225, 229, 252, 259, 314, 349, 383, 509, 547, 548, 564, 654, 688, 714, 743, 778, 787, 829, 943, 951, 1037, 1064, 1078, 1087, 1092, 1124 ], "case_4": [ 2, 43, 54, 122, 134, 150, 201, 205, 212, 225, 229, 232, 245, 252, 259, 314, 349, 383, 509, 518, 547, 548, 550, 564, 577, 592, 617, 640, 644, 654, 688, 700, 713, 714, 743, 778, 787, 829, 943, 951, 959, 979, 1024, 1037, 1064, 1065, 1078, 1087, 1091, 1092, 1093, 1098, 1102, 1110, 1124 ], "case_5": [ 0, 1, 2, 4, 5, 6, 8, 9, 10, 11, 12, 13, 15, 16, 19, 20, 21, 22, 24, 25, 26, 27, 28, 30, 32, 33, 35, 36, 37, 38, 39, 40, 43, 44, 45, 47, 50, 51, 52, 53, 54, 55, 56, 57, 61, 62, 63, 66, 67, 68, 69, 71, 73, 74, 75, 76, 77, 78, 79, 82, 85, 86, 87, 88, 89, 90, 91, 93, 95, 96, 98, 99, 100, 106, 108, 109, 111, 112, 113, 115, 116, 117, 118, 119, 121, 122, 124, 125, 126, 127, 128, 129, 131, 138, 140, 141, 142, 143, 144, 146, 147, 148, 152, 154, 157, 158, 159, 160, 163, 164, 167, 168, 169, 170, 172, 173, 175, 176, 177, 179, 180, 182, 183, 184, 185, 187, 188, 189, 190, 191, 192, 196, 197, 198, 199, 200, 202, 203, 206, 210, 212, 214, 216, 219, 223, 224, 225, 226, 227, 229, 230, 233, 234, 237, 239, 240, 243, 244, 247, 252, 254, 255, 256, 258, 259, 261, 262, 265, 266, 267, 268, 269, 270, 271, 272, 273, 275, 276, 277, 278, 282, 286, 291, 293, 294, 296, 299, 301, 303, 305, 311, 314, 315, 316, 317, 319, 320, 323, 325, 330, 334, 335, 336, 338, 339, 341, 344, 345, 348, 349, 350, 352, 354, 356, 358, 359, 360, 361, 362, 364, 367, 368, 370, 371, 373, 374, 375, 376, 380, 382, 383, 384, 385, 391, 392, 393, 394, 395, 398, 399, 401, 402, 403, 405, 406, 408, 409, 410, 411, 412, 413, 414, 416, 417, 418, 419, 420, 421, 423, 424, 425, 426, 427, 428, 433, 436, 437, 438, 439, 440, 443, 444, 445, 446, 447, 448, 451, 452, 453, 454, 455, 458, 460, 462, 463, 464, 465, 466, 467, 469, 470, 471, 473, 475, 476, 477, 478, 480, 481, 482, 484, 485, 487, 488, 490, 492, 493, 494, 496, 497, 498, 500, 504, 505, 507, 509, 510, 512, 514, 515, 516, 517, 519, 520, 522, 524, 526, 528, 529, 530, 531, 532, 533, 535, 536, 537, 538, 539, 541, 542, 543, 544, 545, 547, 548, 551, 552, 554, 557, 558, 559, 560, 561, 562, 563, 564, 566, 573, 580, 581, 582, 584, 585, 586, 588, 589, 591, 594, 595, 596, 597, 598, 599, 601, 603, 605, 606, 608, 610, 611, 612, 613, 615, 618, 620, 622, 624, 625, 626, 627, 629, 630, 632, 633, 634, 637, 641, 643, 645, 646, 648, 649, 651, 654, 656, 658, 659, 661, 662, 663, 664, 665, 666, 667, 668, 669, 671, 673, 675, 677, 678, 679, 680, 681, 683, 684, 685, 686, 687, 688, 689, 690, 692, 693, 694, 696, 697, 698, 699, 702, 703, 705, 707, 712, 714, 715, 716, 718, 719, 721, 726, 727, 730, 733, 734, 735, 736, 737, 739, 740, 741, 743, 746, 747, 748, 749, 750, 752, 753, 754, 756, 757, 758, 760, 762, 763, 765, 767, 768, 769, 770, 772, 773, 775, 776, 777, 778, 779, 780, 783, 785, 787, 788, 790, 793, 794, 795, 796, 797, 798, 799, 800, 802, 804, 806, 807, 808, 810, 811, 812, 813, 814, 817, 818, 819, 820, 821, 824, 825, 827, 829, 830, 831, 832, 835, 838, 839, 840, 841, 843, 844, 848, 849, 851, 853, 855, 857, 858, 859, 860, 861, 864, 865, 866, 867, 869, 870, 873, 874, 876, 877, 878, 879, 886, 888, 890, 892, 893, 894, 895, 896, 897, 898, 899, 901, 902, 903, 905, 907, 909, 911, 912, 913, 915, 917, 918, 920, 922, 923, 924, 926, 927, 928, 930, 931, 932, 934, 935, 941, 942, 943, 944, 945, 949, 950, 951, 953, 954, 956, 958, 960, 961, 963, 965, 968, 969, 972, 974, 975, 976, 977, 981, 983, 985, 986, 991, 993, 996, 998, 1000, 1001, 1005, 1006, 1008, 1009, 1010, 1011, 1013, 1014, 1015, 1017, 1018, 1019, 1020, 1022, 1023, 1027, 1030, 1031, 1037, 1039, 1042, 1043, 1044, 1046, 1047, 1050, 1051, 1053, 1055, 1057, 1058, 1059, 1061, 1062, 1063, 1064, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1084, 1086, 1087, 1090, 1092, 1094, 1096, 1097, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1112, 1113, 1115, 1117, 1119, 1121, 1123, 1124, 1126, 1127, 1128, 1131, 1133, 1134, 1135, 1136, 1137 ] }
soccer_2016
For how many times has player no.41 won the "man of the match" award?
player no.41 won the "man of the match" refers to Man_of_the_Match = 41
SELECT COUNT(Match_Id) FROM `Match` WHERE Man_of_the_Match = 41
CREATE TABLE Match ( Match_Id INTEGER primary key, Team_1 INTEGER, Team_2 INTEGER, Match_Date DATE, Season_Id INTEGER, Venue_Id INTEGER, Toss_Winner INTEGER, Toss_Decide INTEGER, Win_Type INTEGER, Win_Margin INTEGER, Outcome_type INTEGER, Match_Winner INTEGER, Man_of_the_Match INTEGER, foreign key (Team_1) references Team(Team_Id), foreign key (Team_2) references Team(Team_Id), foreign key (Season_Id) references Season(Season_Id), foreign key (Venue_Id) references Venue(Venue_Id), foreign key (Toss_Winner) references Team(Team_Id), foreign key (Toss_Decide) references Toss_Decision(Toss_Id), foreign key (Win_Type) references Win_By(Win_Id), foreign key (Outcome_type) references Out_Type(Out_Id), foreign key (Match_Winner) references Team(Team_Id), foreign key (Man_of_the_Match) references Player(Player_Id) )
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ) CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ) CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTEGER ) CREATE TABLE Country ( Country_Id INTEGER primary key, Country_Name TEXT, foreign key (Country_Id) references Country(Country_Id) ) CREATE TABLE Extra_Type ( Extra_Id INTEGER primary key, Extra_Name TEXT ) CREATE TABLE Extra_Runs ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Extra_Type_Id INTEGER, Extra_Runs INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Extra_Type_Id) references Extra_Type(Extra_Id) ) CREATE TABLE Out_Type ( Out_Id INTEGER primary key, Out_Name TEXT ) CREATE TABLE Outcome ( Outcome_Id INTEGER primary key, Outcome_Type TEXT ) CREATE TABLE Player ( Player_Id INTEGER primary key, Player_Name TEXT, DOB DATE, Batting_hand INTEGER, Bowling_skill INTEGER, Country_Name INTEGER, foreign key (Batting_hand) references Batting_Style(Batting_Id), foreign key (Bowling_skill) references Bowling_Style(Bowling_Id), foreign key (Country_Name) references Country(Country_Id) ) CREATE TABLE Rolee ( Role_Id INTEGER primary key, Role_Desc TEXT ) CREATE TABLE Season ( Season_Id INTEGER primary key, Man_of_the_Series INTEGER, Orange_Cap INTEGER, Purple_Cap INTEGER, Season_Year INTEGER ) CREATE TABLE Team ( Team_Id INTEGER primary key, Team_Name TEXT ) CREATE TABLE Toss_Decision ( Toss_Id INTEGER primary key, Toss_Name TEXT ) CREATE TABLE Umpire ( Umpire_Id INTEGER primary key, Umpire_Name TEXT, Umpire_Country INTEGER, foreign key (Umpire_Country) references Country(Country_Id) ) CREATE TABLE Venue ( Venue_Id INTEGER primary key, Venue_Name TEXT, City_Id INTEGER, foreign key (City_Id) references City(City_Id) ) CREATE TABLE Win_By ( Win_Id INTEGER primary key, Win_Type TEXT ) CREATE TABLE Match ( Match_Id INTEGER primary key, Team_1 INTEGER, Team_2 INTEGER, Match_Date DATE, Season_Id INTEGER, Venue_Id INTEGER, Toss_Winner INTEGER, Toss_Decide INTEGER, Win_Type INTEGER, Win_Margin INTEGER, Outcome_type INTEGER, Match_Winner INTEGER, Man_of_the_Match INTEGER, foreign key (Team_1) references Team(Team_Id), foreign key (Team_2) references Team(Team_Id), foreign key (Season_Id) references Season(Season_Id), foreign key (Venue_Id) references Venue(Venue_Id), foreign key (Toss_Winner) references Team(Team_Id), foreign key (Toss_Decide) references Toss_Decision(Toss_Id), foreign key (Win_Type) references Win_By(Win_Id), foreign key (Outcome_type) references Out_Type(Out_Id), foreign key (Match_Winner) references Team(Team_Id), foreign key (Man_of_the_Match) references Player(Player_Id) ) CREATE TABLE Ball_by_Ball ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Innings_No INTEGER, Team_Batting INTEGER, Team_Bowling INTEGER, Striker_Batting_Position INTEGER, Striker INTEGER, Non_Striker INTEGER, Bowler INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id) ) CREATE TABLE Batsman_Scored ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Runs_Scored INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id) ) CREATE TABLE Player_Match ( Match_Id INTEGER, Player_Id INTEGER, Role_Id INTEGER, Team_Id INTEGER, primary key (Match_Id, Player_Id, Role_Id), foreign key (Match_Id) references Match(Match_Id), foreign key (Player_Id) references Player(Player_Id), foreign key (Team_Id) references Team(Team_Id), foreign key (Role_Id) references Rolee(Role_Id) ) CREATE TABLE Wicket_Taken ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Player_Out INTEGER, Kind_Out INTEGER, Fielders INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id), foreign key (Player_Out) references Player(Player_Id), foreign key (Kind_Out) references Out_Type(Out_Id), foreign key (Fielders) references Player(Player_Id) )
na
1,789
1,789
CREATE TABLE `Match` ( Match_Id INTEGER primary key, Man_of_the_Match INTEGER, foreign key Man_of_the_Match references PlayerPlayer_Id )
[ "COUNT", "SELECT", "FROM" ]
3
simple
{ "case_1": [ 122, 979 ], "case_2": [ 122, 979 ], "case_3": [ 2, 43, 54, 122, 134, 150, 201, 205, 212, 225, 229, 232, 245, 252, 259, 314, 349, 383, 509, 518, 547, 548, 550, 564, 577, 592, 617, 640, 644, 654, 688, 700, 713, 714, 743, 778, 787, 829, 943, 951, 959, 979, 1024, 1037, 1064, 1065, 1078, 1087, 1091, 1092, 1093, 1098, 1102, 1110, 1124 ], "case_4": [ 2, 43, 54, 122, 134, 150, 201, 205, 212, 225, 229, 232, 245, 252, 259, 314, 349, 383, 509, 518, 547, 548, 550, 564, 577, 592, 617, 640, 644, 654, 688, 700, 713, 714, 743, 778, 787, 829, 943, 951, 959, 979, 1024, 1037, 1064, 1065, 1078, 1087, 1091, 1092, 1093, 1098, 1102, 1110, 1124 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141 ] }
soccer_2016
Please list the IDs of all the matches in the year 2008.
ID of matches refers to Match_Id; in the year 2008 refers to SUBSTR(Match_Date, 1, 4) = '2008'
SELECT Match_Id FROM `Match` WHERE SUBSTR(Match_Date, 1, 4) = '2008'
CREATE TABLE Match ( Match_Id INTEGER primary key, Team_1 INTEGER, Team_2 INTEGER, Match_Date DATE, Season_Id INTEGER, Venue_Id INTEGER, Toss_Winner INTEGER, Toss_Decide INTEGER, Win_Type INTEGER, Win_Margin INTEGER, Outcome_type INTEGER, Match_Winner INTEGER, Man_of_the_Match INTEGER, foreign key (Team_1) references Team(Team_Id), foreign key (Team_2) references Team(Team_Id), foreign key (Season_Id) references Season(Season_Id), foreign key (Venue_Id) references Venue(Venue_Id), foreign key (Toss_Winner) references Team(Team_Id), foreign key (Toss_Decide) references Toss_Decision(Toss_Id), foreign key (Win_Type) references Win_By(Win_Id), foreign key (Outcome_type) references Out_Type(Out_Id), foreign key (Match_Winner) references Team(Team_Id), foreign key (Man_of_the_Match) references Player(Player_Id) )
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ) CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ) CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTEGER ) CREATE TABLE Country ( Country_Id INTEGER primary key, Country_Name TEXT, foreign key (Country_Id) references Country(Country_Id) ) CREATE TABLE Extra_Type ( Extra_Id INTEGER primary key, Extra_Name TEXT ) CREATE TABLE Extra_Runs ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Extra_Type_Id INTEGER, Extra_Runs INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Extra_Type_Id) references Extra_Type(Extra_Id) ) CREATE TABLE Out_Type ( Out_Id INTEGER primary key, Out_Name TEXT ) CREATE TABLE Outcome ( Outcome_Id INTEGER primary key, Outcome_Type TEXT ) CREATE TABLE Player ( Player_Id INTEGER primary key, Player_Name TEXT, DOB DATE, Batting_hand INTEGER, Bowling_skill INTEGER, Country_Name INTEGER, foreign key (Batting_hand) references Batting_Style(Batting_Id), foreign key (Bowling_skill) references Bowling_Style(Bowling_Id), foreign key (Country_Name) references Country(Country_Id) ) CREATE TABLE Rolee ( Role_Id INTEGER primary key, Role_Desc TEXT ) CREATE TABLE Season ( Season_Id INTEGER primary key, Man_of_the_Series INTEGER, Orange_Cap INTEGER, Purple_Cap INTEGER, Season_Year INTEGER ) CREATE TABLE Team ( Team_Id INTEGER primary key, Team_Name TEXT ) CREATE TABLE Toss_Decision ( Toss_Id INTEGER primary key, Toss_Name TEXT ) CREATE TABLE Umpire ( Umpire_Id INTEGER primary key, Umpire_Name TEXT, Umpire_Country INTEGER, foreign key (Umpire_Country) references Country(Country_Id) ) CREATE TABLE Venue ( Venue_Id INTEGER primary key, Venue_Name TEXT, City_Id INTEGER, foreign key (City_Id) references City(City_Id) ) CREATE TABLE Win_By ( Win_Id INTEGER primary key, Win_Type TEXT ) CREATE TABLE Match ( Match_Id INTEGER primary key, Team_1 INTEGER, Team_2 INTEGER, Match_Date DATE, Season_Id INTEGER, Venue_Id INTEGER, Toss_Winner INTEGER, Toss_Decide INTEGER, Win_Type INTEGER, Win_Margin INTEGER, Outcome_type INTEGER, Match_Winner INTEGER, Man_of_the_Match INTEGER, foreign key (Team_1) references Team(Team_Id), foreign key (Team_2) references Team(Team_Id), foreign key (Season_Id) references Season(Season_Id), foreign key (Venue_Id) references Venue(Venue_Id), foreign key (Toss_Winner) references Team(Team_Id), foreign key (Toss_Decide) references Toss_Decision(Toss_Id), foreign key (Win_Type) references Win_By(Win_Id), foreign key (Outcome_type) references Out_Type(Out_Id), foreign key (Match_Winner) references Team(Team_Id), foreign key (Man_of_the_Match) references Player(Player_Id) ) CREATE TABLE Ball_by_Ball ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Innings_No INTEGER, Team_Batting INTEGER, Team_Bowling INTEGER, Striker_Batting_Position INTEGER, Striker INTEGER, Non_Striker INTEGER, Bowler INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id) ) CREATE TABLE Batsman_Scored ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Runs_Scored INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id) ) CREATE TABLE Player_Match ( Match_Id INTEGER, Player_Id INTEGER, Role_Id INTEGER, Team_Id INTEGER, primary key (Match_Id, Player_Id, Role_Id), foreign key (Match_Id) references Match(Match_Id), foreign key (Player_Id) references Player(Player_Id), foreign key (Team_Id) references Team(Team_Id), foreign key (Role_Id) references Rolee(Role_Id) ) CREATE TABLE Wicket_Taken ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Player_Out INTEGER, Kind_Out INTEGER, Fielders INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id), foreign key (Player_Out) references Player(Player_Id), foreign key (Kind_Out) references Out_Type(Out_Id), foreign key (Fielders) references Player(Player_Id) )
na
1,790
1,790
CREATE TABLE `Match` ( Match_Id INTEGER primary key, Match_Date DATE )
[ "SUBSTR", "SELECT", "FROM" ]
3
simple
{ "case_1": [ 122, 979 ], "case_2": [ 122, 979 ], "case_3": [ 2, 43, 54, 122, 134, 150, 201, 205, 212, 225, 229, 232, 245, 252, 259, 314, 349, 383, 509, 518, 547, 548, 550, 564, 577, 592, 617, 640, 644, 654, 688, 700, 713, 714, 743, 778, 787, 829, 943, 951, 959, 979, 1024, 1037, 1064, 1065, 1078, 1087, 1091, 1092, 1093, 1098, 1102, 1110, 1124 ], "case_4": [ 2, 43, 54, 122, 134, 150, 201, 205, 212, 225, 229, 232, 245, 252, 259, 314, 349, 383, 509, 518, 547, 548, 550, 564, 577, 592, 617, 640, 644, 654, 688, 700, 713, 714, 743, 778, 787, 829, 943, 951, 959, 979, 1024, 1037, 1064, 1065, 1078, 1087, 1091, 1092, 1093, 1098, 1102, 1110, 1124 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141 ] }
soccer_2016
How many players are from Australia?
Australia refers to Country_Name = 'Australia'
SELECT COUNT(CASE WHEN T2.Country_Name = 'Australia' THEN T1.Player_Id ELSE NULL END) FROM Player AS T1 INNER JOIN Country AS T2 ON T1.Country_Name = T2.Country_Id
CREATE TABLE Country ( Country_Id INTEGER primary key, Country_Name TEXT, foreign key (Country_Id) references Country(Country_Id) ) CREATE TABLE Player ( Player_Id INTEGER primary key, Player_Name TEXT, DOB DATE, Batting_hand INTEGER, Bowling_skill INTEGER, Country_Name INTEGER, foreign key (Batting_hand) references Batting_Style(Batting_Id), foreign key (Bowling_skill) references Bowling_Style(Bowling_Id), foreign key (Country_Name) references Country(Country_Id) )
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ) CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ) CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTEGER ) CREATE TABLE Country ( Country_Id INTEGER primary key, Country_Name TEXT, foreign key (Country_Id) references Country(Country_Id) ) CREATE TABLE Extra_Type ( Extra_Id INTEGER primary key, Extra_Name TEXT ) CREATE TABLE Extra_Runs ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Extra_Type_Id INTEGER, Extra_Runs INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Extra_Type_Id) references Extra_Type(Extra_Id) ) CREATE TABLE Out_Type ( Out_Id INTEGER primary key, Out_Name TEXT ) CREATE TABLE Outcome ( Outcome_Id INTEGER primary key, Outcome_Type TEXT ) CREATE TABLE Player ( Player_Id INTEGER primary key, Player_Name TEXT, DOB DATE, Batting_hand INTEGER, Bowling_skill INTEGER, Country_Name INTEGER, foreign key (Batting_hand) references Batting_Style(Batting_Id), foreign key (Bowling_skill) references Bowling_Style(Bowling_Id), foreign key (Country_Name) references Country(Country_Id) ) CREATE TABLE Rolee ( Role_Id INTEGER primary key, Role_Desc TEXT ) CREATE TABLE Season ( Season_Id INTEGER primary key, Man_of_the_Series INTEGER, Orange_Cap INTEGER, Purple_Cap INTEGER, Season_Year INTEGER ) CREATE TABLE Team ( Team_Id INTEGER primary key, Team_Name TEXT ) CREATE TABLE Toss_Decision ( Toss_Id INTEGER primary key, Toss_Name TEXT ) CREATE TABLE Umpire ( Umpire_Id INTEGER primary key, Umpire_Name TEXT, Umpire_Country INTEGER, foreign key (Umpire_Country) references Country(Country_Id) ) CREATE TABLE Venue ( Venue_Id INTEGER primary key, Venue_Name TEXT, City_Id INTEGER, foreign key (City_Id) references City(City_Id) ) CREATE TABLE Win_By ( Win_Id INTEGER primary key, Win_Type TEXT ) CREATE TABLE Match ( Match_Id INTEGER primary key, Team_1 INTEGER, Team_2 INTEGER, Match_Date DATE, Season_Id INTEGER, Venue_Id INTEGER, Toss_Winner INTEGER, Toss_Decide INTEGER, Win_Type INTEGER, Win_Margin INTEGER, Outcome_type INTEGER, Match_Winner INTEGER, Man_of_the_Match INTEGER, foreign key (Team_1) references Team(Team_Id), foreign key (Team_2) references Team(Team_Id), foreign key (Season_Id) references Season(Season_Id), foreign key (Venue_Id) references Venue(Venue_Id), foreign key (Toss_Winner) references Team(Team_Id), foreign key (Toss_Decide) references Toss_Decision(Toss_Id), foreign key (Win_Type) references Win_By(Win_Id), foreign key (Outcome_type) references Out_Type(Out_Id), foreign key (Match_Winner) references Team(Team_Id), foreign key (Man_of_the_Match) references Player(Player_Id) ) CREATE TABLE Ball_by_Ball ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Innings_No INTEGER, Team_Batting INTEGER, Team_Bowling INTEGER, Striker_Batting_Position INTEGER, Striker INTEGER, Non_Striker INTEGER, Bowler INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id) ) CREATE TABLE Batsman_Scored ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Runs_Scored INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id) ) CREATE TABLE Player_Match ( Match_Id INTEGER, Player_Id INTEGER, Role_Id INTEGER, Team_Id INTEGER, primary key (Match_Id, Player_Id, Role_Id), foreign key (Match_Id) references Match(Match_Id), foreign key (Player_Id) references Player(Player_Id), foreign key (Team_Id) references Team(Team_Id), foreign key (Role_Id) references Rolee(Role_Id) ) CREATE TABLE Wicket_Taken ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Player_Out INTEGER, Kind_Out INTEGER, Fielders INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id), foreign key (Player_Out) references Player(Player_Id), foreign key (Kind_Out) references Out_Type(Out_Id), foreign key (Fielders) references Player(Player_Id) )
na
1,791
1,791
CREATE TABLE `Country` ( Country_Id INTEGER primary key, Country_Name TEXT, foreign key Country_Id references CountryCountry_Id ) CREATE TABLE `Player` ( Player_Id INTEGER primary key, Country_Name INTEGER, foreign key Country_Name references CountryCountry_Id )
[ "CASE WHEN", "AS", "SELECT", "CASE", "NULL", "INNER JOIN", "ON", "COUNT", "FROM" ]
10
simple
{ "case_1": [ -1 ], "case_2": [ 150, 349 ], "case_3": [ 134, 150, 201, 212, 225, 229, 232, 314, 349, 383, 509, 518, 547, 548, 550, 564, 577, 592, 640, 644, 654, 688, 700, 714, 743, 778, 787, 829, 943, 951, 959, 1037, 1064, 1065, 1078, 1087, 1091, 1092, 1098, 1124 ], "case_4": [ 2, 43, 54, 122, 134, 150, 201, 205, 212, 225, 229, 232, 245, 252, 259, 314, 349, 383, 509, 518, 547, 548, 550, 564, 577, 592, 617, 640, 644, 654, 688, 700, 713, 714, 743, 778, 787, 829, 943, 951, 959, 979, 1024, 1037, 1064, 1065, 1078, 1087, 1091, 1092, 1093, 1098, 1102, 1110, 1124 ], "case_5": [ 0, 1, 3, 4, 5, 6, 7, 8, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 88, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 104, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 173, 175, 176, 177, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 192, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 215, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 271, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 368, 369, 370, 373, 374, 375, 376, 378, 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 462, 463, 464, 465, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 504, 505, 507, 508, 509, 511, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 544, 547, 548, 550, 552, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 978, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1071, 1072, 1074, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1114, 1115, 1116, 1118, 1119, 1122, 1123, 1124, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
soccer_2016
Which country is the oldest player from?
country refers to Country_Name; the oldest refers to min(DOB)
SELECT T1.Country_Name FROM Country AS T1 INNER JOIN Player AS T2 ON T2.Country_Name = T1.Country_Id WHERE T2.Country_Name IS NOT NULL ORDER BY T2.DOB LIMIT 1
CREATE TABLE Country ( Country_Id INTEGER primary key, Country_Name TEXT, foreign key (Country_Id) references Country(Country_Id) ) CREATE TABLE Player ( Player_Id INTEGER primary key, Player_Name TEXT, DOB DATE, Batting_hand INTEGER, Bowling_skill INTEGER, Country_Name INTEGER, foreign key (Batting_hand) references Batting_Style(Batting_Id), foreign key (Bowling_skill) references Bowling_Style(Bowling_Id), foreign key (Country_Name) references Country(Country_Id) )
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ) CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ) CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTEGER ) CREATE TABLE Country ( Country_Id INTEGER primary key, Country_Name TEXT, foreign key (Country_Id) references Country(Country_Id) ) CREATE TABLE Extra_Type ( Extra_Id INTEGER primary key, Extra_Name TEXT ) CREATE TABLE Extra_Runs ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Extra_Type_Id INTEGER, Extra_Runs INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Extra_Type_Id) references Extra_Type(Extra_Id) ) CREATE TABLE Out_Type ( Out_Id INTEGER primary key, Out_Name TEXT ) CREATE TABLE Outcome ( Outcome_Id INTEGER primary key, Outcome_Type TEXT ) CREATE TABLE Player ( Player_Id INTEGER primary key, Player_Name TEXT, DOB DATE, Batting_hand INTEGER, Bowling_skill INTEGER, Country_Name INTEGER, foreign key (Batting_hand) references Batting_Style(Batting_Id), foreign key (Bowling_skill) references Bowling_Style(Bowling_Id), foreign key (Country_Name) references Country(Country_Id) ) CREATE TABLE Rolee ( Role_Id INTEGER primary key, Role_Desc TEXT ) CREATE TABLE Season ( Season_Id INTEGER primary key, Man_of_the_Series INTEGER, Orange_Cap INTEGER, Purple_Cap INTEGER, Season_Year INTEGER ) CREATE TABLE Team ( Team_Id INTEGER primary key, Team_Name TEXT ) CREATE TABLE Toss_Decision ( Toss_Id INTEGER primary key, Toss_Name TEXT ) CREATE TABLE Umpire ( Umpire_Id INTEGER primary key, Umpire_Name TEXT, Umpire_Country INTEGER, foreign key (Umpire_Country) references Country(Country_Id) ) CREATE TABLE Venue ( Venue_Id INTEGER primary key, Venue_Name TEXT, City_Id INTEGER, foreign key (City_Id) references City(City_Id) ) CREATE TABLE Win_By ( Win_Id INTEGER primary key, Win_Type TEXT ) CREATE TABLE Match ( Match_Id INTEGER primary key, Team_1 INTEGER, Team_2 INTEGER, Match_Date DATE, Season_Id INTEGER, Venue_Id INTEGER, Toss_Winner INTEGER, Toss_Decide INTEGER, Win_Type INTEGER, Win_Margin INTEGER, Outcome_type INTEGER, Match_Winner INTEGER, Man_of_the_Match INTEGER, foreign key (Team_1) references Team(Team_Id), foreign key (Team_2) references Team(Team_Id), foreign key (Season_Id) references Season(Season_Id), foreign key (Venue_Id) references Venue(Venue_Id), foreign key (Toss_Winner) references Team(Team_Id), foreign key (Toss_Decide) references Toss_Decision(Toss_Id), foreign key (Win_Type) references Win_By(Win_Id), foreign key (Outcome_type) references Out_Type(Out_Id), foreign key (Match_Winner) references Team(Team_Id), foreign key (Man_of_the_Match) references Player(Player_Id) ) CREATE TABLE Ball_by_Ball ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Innings_No INTEGER, Team_Batting INTEGER, Team_Bowling INTEGER, Striker_Batting_Position INTEGER, Striker INTEGER, Non_Striker INTEGER, Bowler INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id) ) CREATE TABLE Batsman_Scored ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Runs_Scored INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id) ) CREATE TABLE Player_Match ( Match_Id INTEGER, Player_Id INTEGER, Role_Id INTEGER, Team_Id INTEGER, primary key (Match_Id, Player_Id, Role_Id), foreign key (Match_Id) references Match(Match_Id), foreign key (Player_Id) references Player(Player_Id), foreign key (Team_Id) references Team(Team_Id), foreign key (Role_Id) references Rolee(Role_Id) ) CREATE TABLE Wicket_Taken ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Player_Out INTEGER, Kind_Out INTEGER, Fielders INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id), foreign key (Player_Out) references Player(Player_Id), foreign key (Kind_Out) references Out_Type(Out_Id), foreign key (Fielders) references Player(Player_Id) )
na
1,792
1,792
CREATE TABLE `Country` ( Country_Id INTEGER primary key, Country_Name TEXT, foreign key Country_Id references CountryCountry_Id ) CREATE TABLE `Player` ( DOB DATE, Country_Name INTEGER, foreign key Country_Name references CountryCountry_Id )
[ "AS", "SELECT", "ORDER BY", "LIMIT", "NULL", "INNER JOIN", "ON", "NOT", "IS", "FROM" ]
11
medium
{ "case_1": [ 150, 349 ], "case_2": [ 150, 349 ], "case_3": [ 150, 229, 314, 349, 548, 592, 654, 688, 778, 951, 1037, 1065, 1124 ], "case_4": [ 2, 43, 54, 122, 134, 150, 201, 205, 212, 225, 229, 232, 245, 252, 259, 314, 349, 383, 509, 518, 547, 548, 550, 564, 577, 592, 617, 640, 644, 654, 688, 700, 713, 714, 743, 778, 787, 829, 943, 951, 959, 979, 1024, 1037, 1064, 1065, 1078, 1087, 1091, 1092, 1093, 1098, 1102, 1110, 1124 ], "case_5": [ 0, 1, 7, 11, 16, 20, 29, 36, 42, 49, 53, 55, 59, 62, 69, 73, 75, 86, 92, 106, 121, 125, 126, 138, 148, 150, 152, 158, 159, 162, 163, 167, 171, 179, 187, 188, 195, 199, 200, 202, 206, 213, 229, 233, 239, 247, 258, 262, 263, 267, 275, 278, 281, 298, 299, 303, 305, 309, 311, 313, 314, 319, 320, 324, 329, 334, 336, 341, 342, 345, 349, 353, 356, 364, 365, 373, 375, 378, 379, 381, 385, 393, 394, 395, 398, 402, 403, 406, 409, 411, 428, 429, 434, 435, 436, 443, 444, 445, 451, 454, 460, 462, 469, 476, 478, 479, 482, 493, 495, 497, 505, 508, 514, 516, 522, 528, 530, 532, 533, 536, 538, 548, 552, 560, 566, 567, 573, 578, 579, 584, 586, 589, 590, 592, 595, 601, 611, 620, 621, 625, 626, 634, 637, 638, 645, 646, 654, 657, 659, 665, 669, 672, 681, 688, 690, 691, 701, 706, 712, 724, 733, 735, 752, 759, 760, 768, 772, 778, 790, 803, 805, 810, 818, 823, 827, 830, 837, 844, 850, 851, 861, 866, 876, 880, 886, 889, 891, 893, 894, 901, 911, 918, 926, 927, 934, 935, 941, 950, 951, 953, 954, 956, 962, 963, 966, 967, 970, 973, 975, 977, 978, 981, 982, 985, 994, 1005, 1006, 1010, 1013, 1017, 1025, 1034, 1036, 1037, 1038, 1047, 1048, 1049, 1050, 1051, 1056, 1062, 1065, 1066, 1067, 1068, 1069, 1094, 1124, 1129, 1131, 1133, 1134, 1137 ] }
soccer_2016
What is the bowling skill of SC Ganguly?
SC Ganguly refers to Player_Name = 'SC Ganguly'
SELECT T1.Bowling_Skill FROM Bowling_Style AS T1 INNER JOIN Player AS T2 ON T2.Bowling_skill = T1.Bowling_Id WHERE T2.Player_Name = 'SC Ganguly'
CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ) CREATE TABLE Player ( Player_Id INTEGER primary key, Player_Name TEXT, DOB DATE, Batting_hand INTEGER, Bowling_skill INTEGER, Country_Name INTEGER, foreign key (Batting_hand) references Batting_Style(Batting_Id), foreign key (Bowling_skill) references Bowling_Style(Bowling_Id), foreign key (Country_Name) references Country(Country_Id) )
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ) CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ) CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTEGER ) CREATE TABLE Country ( Country_Id INTEGER primary key, Country_Name TEXT, foreign key (Country_Id) references Country(Country_Id) ) CREATE TABLE Extra_Type ( Extra_Id INTEGER primary key, Extra_Name TEXT ) CREATE TABLE Extra_Runs ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Extra_Type_Id INTEGER, Extra_Runs INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Extra_Type_Id) references Extra_Type(Extra_Id) ) CREATE TABLE Out_Type ( Out_Id INTEGER primary key, Out_Name TEXT ) CREATE TABLE Outcome ( Outcome_Id INTEGER primary key, Outcome_Type TEXT ) CREATE TABLE Player ( Player_Id INTEGER primary key, Player_Name TEXT, DOB DATE, Batting_hand INTEGER, Bowling_skill INTEGER, Country_Name INTEGER, foreign key (Batting_hand) references Batting_Style(Batting_Id), foreign key (Bowling_skill) references Bowling_Style(Bowling_Id), foreign key (Country_Name) references Country(Country_Id) ) CREATE TABLE Rolee ( Role_Id INTEGER primary key, Role_Desc TEXT ) CREATE TABLE Season ( Season_Id INTEGER primary key, Man_of_the_Series INTEGER, Orange_Cap INTEGER, Purple_Cap INTEGER, Season_Year INTEGER ) CREATE TABLE Team ( Team_Id INTEGER primary key, Team_Name TEXT ) CREATE TABLE Toss_Decision ( Toss_Id INTEGER primary key, Toss_Name TEXT ) CREATE TABLE Umpire ( Umpire_Id INTEGER primary key, Umpire_Name TEXT, Umpire_Country INTEGER, foreign key (Umpire_Country) references Country(Country_Id) ) CREATE TABLE Venue ( Venue_Id INTEGER primary key, Venue_Name TEXT, City_Id INTEGER, foreign key (City_Id) references City(City_Id) ) CREATE TABLE Win_By ( Win_Id INTEGER primary key, Win_Type TEXT ) CREATE TABLE Match ( Match_Id INTEGER primary key, Team_1 INTEGER, Team_2 INTEGER, Match_Date DATE, Season_Id INTEGER, Venue_Id INTEGER, Toss_Winner INTEGER, Toss_Decide INTEGER, Win_Type INTEGER, Win_Margin INTEGER, Outcome_type INTEGER, Match_Winner INTEGER, Man_of_the_Match INTEGER, foreign key (Team_1) references Team(Team_Id), foreign key (Team_2) references Team(Team_Id), foreign key (Season_Id) references Season(Season_Id), foreign key (Venue_Id) references Venue(Venue_Id), foreign key (Toss_Winner) references Team(Team_Id), foreign key (Toss_Decide) references Toss_Decision(Toss_Id), foreign key (Win_Type) references Win_By(Win_Id), foreign key (Outcome_type) references Out_Type(Out_Id), foreign key (Match_Winner) references Team(Team_Id), foreign key (Man_of_the_Match) references Player(Player_Id) ) CREATE TABLE Ball_by_Ball ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Innings_No INTEGER, Team_Batting INTEGER, Team_Bowling INTEGER, Striker_Batting_Position INTEGER, Striker INTEGER, Non_Striker INTEGER, Bowler INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id) ) CREATE TABLE Batsman_Scored ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Runs_Scored INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id) ) CREATE TABLE Player_Match ( Match_Id INTEGER, Player_Id INTEGER, Role_Id INTEGER, Team_Id INTEGER, primary key (Match_Id, Player_Id, Role_Id), foreign key (Match_Id) references Match(Match_Id), foreign key (Player_Id) references Player(Player_Id), foreign key (Team_Id) references Team(Team_Id), foreign key (Role_Id) references Rolee(Role_Id) ) CREATE TABLE Wicket_Taken ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Player_Out INTEGER, Kind_Out INTEGER, Fielders INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id), foreign key (Player_Out) references Player(Player_Id), foreign key (Kind_Out) references Out_Type(Out_Id), foreign key (Fielders) references Player(Player_Id) )
na
1,793
1,793
CREATE TABLE `Bowling_Style` ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ) CREATE TABLE `Player` ( Player_Name TEXT, Bowling_skill INTEGER, foreign key Bowling_skill references Bowling_StyleBowling_Id )
[ "AS", "SELECT", "INNER JOIN", "ON", "FROM" ]
6
simple
{ "case_1": [ 509, 644 ], "case_2": [ 509, 644, 1037 ], "case_3": [ 2, 134, 150, 201, 212, 225, 229, 232, 314, 349, 383, 509, 518, 547, 548, 550, 564, 577, 592, 640, 644, 654, 688, 700, 714, 743, 778, 787, 829, 943, 951, 959, 1037, 1064, 1065, 1078, 1087, 1091, 1092, 1098, 1124 ], "case_4": [ 2, 43, 54, 122, 134, 150, 201, 205, 212, 225, 229, 232, 245, 252, 259, 314, 349, 383, 509, 518, 547, 548, 550, 564, 577, 592, 617, 640, 644, 654, 688, 700, 713, 714, 743, 778, 787, 829, 943, 951, 959, 979, 1024, 1037, 1064, 1065, 1078, 1087, 1091, 1092, 1093, 1098, 1102, 1110, 1124 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 35, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 104, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 192, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 215, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 271, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 286, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 462, 463, 464, 465, 466, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 504, 505, 506, 507, 508, 509, 510, 511, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 526, 527, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 542, 544, 547, 548, 550, 552, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 657, 658, 659, 660, 661, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 786, 787, 788, 790, 792, 793, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 978, 980, 981, 982, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1004, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1074, 1075, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1113, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
soccer_2016
Among the players who use the right hand as their batting hand, how many of them were born after 1985?
right hand as batting hand refers to Batting_Hand = 'Right-hand bat'; born after 1985 refers to SUBSTR(DOB, 1, 4) > 1985
SELECT SUM(CASE WHEN SUBSTR(T1.DOB, 1, 4) > 1985 THEN 1 ELSE 0 END) FROM Player AS T1 INNER JOIN Batting_Style AS T2 ON T1.Batting_hand = T2.Batting_Id WHERE T2.Batting_Hand = 'Right-hand bat'
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ) CREATE TABLE Player ( Player_Id INTEGER primary key, Player_Name TEXT, DOB DATE, Batting_hand INTEGER, Bowling_skill INTEGER, Country_Name INTEGER, foreign key (Batting_hand) references Batting_Style(Batting_Id), foreign key (Bowling_skill) references Bowling_Style(Bowling_Id), foreign key (Country_Name) references Country(Country_Id) )
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ) CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ) CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTEGER ) CREATE TABLE Country ( Country_Id INTEGER primary key, Country_Name TEXT, foreign key (Country_Id) references Country(Country_Id) ) CREATE TABLE Extra_Type ( Extra_Id INTEGER primary key, Extra_Name TEXT ) CREATE TABLE Extra_Runs ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Extra_Type_Id INTEGER, Extra_Runs INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Extra_Type_Id) references Extra_Type(Extra_Id) ) CREATE TABLE Out_Type ( Out_Id INTEGER primary key, Out_Name TEXT ) CREATE TABLE Outcome ( Outcome_Id INTEGER primary key, Outcome_Type TEXT ) CREATE TABLE Player ( Player_Id INTEGER primary key, Player_Name TEXT, DOB DATE, Batting_hand INTEGER, Bowling_skill INTEGER, Country_Name INTEGER, foreign key (Batting_hand) references Batting_Style(Batting_Id), foreign key (Bowling_skill) references Bowling_Style(Bowling_Id), foreign key (Country_Name) references Country(Country_Id) ) CREATE TABLE Rolee ( Role_Id INTEGER primary key, Role_Desc TEXT ) CREATE TABLE Season ( Season_Id INTEGER primary key, Man_of_the_Series INTEGER, Orange_Cap INTEGER, Purple_Cap INTEGER, Season_Year INTEGER ) CREATE TABLE Team ( Team_Id INTEGER primary key, Team_Name TEXT ) CREATE TABLE Toss_Decision ( Toss_Id INTEGER primary key, Toss_Name TEXT ) CREATE TABLE Umpire ( Umpire_Id INTEGER primary key, Umpire_Name TEXT, Umpire_Country INTEGER, foreign key (Umpire_Country) references Country(Country_Id) ) CREATE TABLE Venue ( Venue_Id INTEGER primary key, Venue_Name TEXT, City_Id INTEGER, foreign key (City_Id) references City(City_Id) ) CREATE TABLE Win_By ( Win_Id INTEGER primary key, Win_Type TEXT ) CREATE TABLE Match ( Match_Id INTEGER primary key, Team_1 INTEGER, Team_2 INTEGER, Match_Date DATE, Season_Id INTEGER, Venue_Id INTEGER, Toss_Winner INTEGER, Toss_Decide INTEGER, Win_Type INTEGER, Win_Margin INTEGER, Outcome_type INTEGER, Match_Winner INTEGER, Man_of_the_Match INTEGER, foreign key (Team_1) references Team(Team_Id), foreign key (Team_2) references Team(Team_Id), foreign key (Season_Id) references Season(Season_Id), foreign key (Venue_Id) references Venue(Venue_Id), foreign key (Toss_Winner) references Team(Team_Id), foreign key (Toss_Decide) references Toss_Decision(Toss_Id), foreign key (Win_Type) references Win_By(Win_Id), foreign key (Outcome_type) references Out_Type(Out_Id), foreign key (Match_Winner) references Team(Team_Id), foreign key (Man_of_the_Match) references Player(Player_Id) ) CREATE TABLE Ball_by_Ball ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Innings_No INTEGER, Team_Batting INTEGER, Team_Bowling INTEGER, Striker_Batting_Position INTEGER, Striker INTEGER, Non_Striker INTEGER, Bowler INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id) ) CREATE TABLE Batsman_Scored ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Runs_Scored INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id) ) CREATE TABLE Player_Match ( Match_Id INTEGER, Player_Id INTEGER, Role_Id INTEGER, Team_Id INTEGER, primary key (Match_Id, Player_Id, Role_Id), foreign key (Match_Id) references Match(Match_Id), foreign key (Player_Id) references Player(Player_Id), foreign key (Team_Id) references Team(Team_Id), foreign key (Role_Id) references Rolee(Role_Id) ) CREATE TABLE Wicket_Taken ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Player_Out INTEGER, Kind_Out INTEGER, Fielders INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id), foreign key (Player_Out) references Player(Player_Id), foreign key (Kind_Out) references Out_Type(Out_Id), foreign key (Fielders) references Player(Player_Id) )
na
1,794
1,794
CREATE TABLE `Batting_Style` ( Batting_Id INTEGER primary key, Batting_hand TEXT ) CREATE TABLE `Player` ( DOB DATE, Batting_hand INTEGER, foreign key Batting_hand references Batting_StyleBatting_Id )
[ "CASE WHEN", "AS", "SELECT", "SUM", "CASE", "-", "INNER JOIN", "ON", "SUBSTR", "FROM" ]
11
medium
{ "case_1": [ 943, 1078 ], "case_2": [ 550, 943, 959, 1078 ], "case_3": [ 54, 122, 201, 212, 225, 383, 509, 518, 547, 550, 564, 640, 787, 829, 943, 959, 979, 1064, 1078, 1087, 1092, 1093, 1098 ], "case_4": [ 2, 43, 54, 122, 134, 150, 201, 205, 212, 225, 229, 232, 245, 252, 259, 314, 349, 383, 509, 518, 547, 548, 550, 564, 577, 592, 617, 640, 644, 654, 688, 700, 713, 714, 743, 778, 787, 829, 943, 951, 959, 979, 1024, 1037, 1064, 1065, 1078, 1087, 1091, 1092, 1093, 1098, 1102, 1110, 1124 ], "case_5": [ 0, 3, 6, 16, 21, 24, 34, 39, 42, 45, 54, 61, 64, 71, 74, 77, 81, 83, 85, 93, 94, 97, 98, 104, 105, 106, 112, 113, 115, 120, 122, 127, 128, 129, 135, 141, 148, 152, 153, 154, 155, 158, 169, 171, 172, 173, 180, 183, 184, 186, 187, 189, 191, 192, 195, 197, 199, 201, 207, 212, 213, 215, 219, 223, 225, 226, 228, 234, 236, 240, 244, 248, 254, 258, 261, 264, 267, 271, 272, 279, 296, 298, 299, 300, 304, 313, 316, 317, 322, 323, 325, 335, 339, 347, 356, 360, 363, 365, 368, 375, 378, 379, 381, 382, 383, 391, 392, 393, 394, 398, 402, 406, 409, 412, 415, 416, 425, 427, 436, 438, 445, 446, 448, 450, 451, 452, 453, 470, 476, 478, 479, 483, 486, 487, 488, 489, 496, 498, 500, 503, 504, 507, 509, 514, 517, 518, 520, 522, 528, 529, 535, 537, 540, 544, 547, 550, 559, 562, 563, 564, 571, 573, 575, 579, 580, 581, 597, 609, 612, 620, 623, 624, 628, 630, 638, 640, 643, 646, 647, 649, 650, 658, 660, 662, 666, 672, 675, 676, 677, 681, 682, 684, 686, 690, 693, 695, 701, 706, 709, 710, 717, 723, 740, 744, 745, 746, 747, 750, 753, 754, 756, 758, 762, 772, 776, 777, 787, 788, 795, 796, 798, 800, 802, 805, 808, 810, 813, 823, 825, 827, 829, 832, 835, 838, 841, 844, 848, 858, 868, 870, 871, 874, 878, 880, 882, 896, 905, 909, 912, 922, 924, 925, 926, 930, 943, 944, 954, 958, 959, 962, 973, 974, 979, 980, 985, 993, 998, 1008, 1012, 1023, 1027, 1031, 1038, 1052, 1062, 1064, 1066, 1068, 1069, 1074, 1078, 1082, 1087, 1092, 1093, 1098, 1100, 1101, 1111, 1123, 1131, 1132, 1133, 1134, 1135 ] }
soccer_2016
Please list the names of the players who use the right hand as their batting hand and are from Australia.
name of player refers to Player_Name; right hand as batting hand refers to Batting_Hand = 'Right-hand bat'; Australia refers to Country_Name = 'Australia'
SELECT T2.Player_Name FROM Country AS T1 INNER JOIN Player AS T2 ON T2.Country_Name = T1.Country_id INNER JOIN Batting_Style AS T3 ON T2.Batting_hand = T3.Batting_Id WHERE T1.Country_Name = 'Australia' AND T3.Batting_Hand = 'Right-hand bat'
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ) CREATE TABLE Country ( Country_Id INTEGER primary key, Country_Name TEXT, foreign key (Country_Id) references Country(Country_Id) ) CREATE TABLE Player ( Player_Id INTEGER primary key, Player_Name TEXT, DOB DATE, Batting_hand INTEGER, Bowling_skill INTEGER, Country_Name INTEGER, foreign key (Batting_hand) references Batting_Style(Batting_Id), foreign key (Bowling_skill) references Bowling_Style(Bowling_Id), foreign key (Country_Name) references Country(Country_Id) )
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ) CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ) CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTEGER ) CREATE TABLE Country ( Country_Id INTEGER primary key, Country_Name TEXT, foreign key (Country_Id) references Country(Country_Id) ) CREATE TABLE Extra_Type ( Extra_Id INTEGER primary key, Extra_Name TEXT ) CREATE TABLE Extra_Runs ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Extra_Type_Id INTEGER, Extra_Runs INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Extra_Type_Id) references Extra_Type(Extra_Id) ) CREATE TABLE Out_Type ( Out_Id INTEGER primary key, Out_Name TEXT ) CREATE TABLE Outcome ( Outcome_Id INTEGER primary key, Outcome_Type TEXT ) CREATE TABLE Player ( Player_Id INTEGER primary key, Player_Name TEXT, DOB DATE, Batting_hand INTEGER, Bowling_skill INTEGER, Country_Name INTEGER, foreign key (Batting_hand) references Batting_Style(Batting_Id), foreign key (Bowling_skill) references Bowling_Style(Bowling_Id), foreign key (Country_Name) references Country(Country_Id) ) CREATE TABLE Rolee ( Role_Id INTEGER primary key, Role_Desc TEXT ) CREATE TABLE Season ( Season_Id INTEGER primary key, Man_of_the_Series INTEGER, Orange_Cap INTEGER, Purple_Cap INTEGER, Season_Year INTEGER ) CREATE TABLE Team ( Team_Id INTEGER primary key, Team_Name TEXT ) CREATE TABLE Toss_Decision ( Toss_Id INTEGER primary key, Toss_Name TEXT ) CREATE TABLE Umpire ( Umpire_Id INTEGER primary key, Umpire_Name TEXT, Umpire_Country INTEGER, foreign key (Umpire_Country) references Country(Country_Id) ) CREATE TABLE Venue ( Venue_Id INTEGER primary key, Venue_Name TEXT, City_Id INTEGER, foreign key (City_Id) references City(City_Id) ) CREATE TABLE Win_By ( Win_Id INTEGER primary key, Win_Type TEXT ) CREATE TABLE Match ( Match_Id INTEGER primary key, Team_1 INTEGER, Team_2 INTEGER, Match_Date DATE, Season_Id INTEGER, Venue_Id INTEGER, Toss_Winner INTEGER, Toss_Decide INTEGER, Win_Type INTEGER, Win_Margin INTEGER, Outcome_type INTEGER, Match_Winner INTEGER, Man_of_the_Match INTEGER, foreign key (Team_1) references Team(Team_Id), foreign key (Team_2) references Team(Team_Id), foreign key (Season_Id) references Season(Season_Id), foreign key (Venue_Id) references Venue(Venue_Id), foreign key (Toss_Winner) references Team(Team_Id), foreign key (Toss_Decide) references Toss_Decision(Toss_Id), foreign key (Win_Type) references Win_By(Win_Id), foreign key (Outcome_type) references Out_Type(Out_Id), foreign key (Match_Winner) references Team(Team_Id), foreign key (Man_of_the_Match) references Player(Player_Id) ) CREATE TABLE Ball_by_Ball ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Innings_No INTEGER, Team_Batting INTEGER, Team_Bowling INTEGER, Striker_Batting_Position INTEGER, Striker INTEGER, Non_Striker INTEGER, Bowler INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id) ) CREATE TABLE Batsman_Scored ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Runs_Scored INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id) ) CREATE TABLE Player_Match ( Match_Id INTEGER, Player_Id INTEGER, Role_Id INTEGER, Team_Id INTEGER, primary key (Match_Id, Player_Id, Role_Id), foreign key (Match_Id) references Match(Match_Id), foreign key (Player_Id) references Player(Player_Id), foreign key (Team_Id) references Team(Team_Id), foreign key (Role_Id) references Rolee(Role_Id) ) CREATE TABLE Wicket_Taken ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Player_Out INTEGER, Kind_Out INTEGER, Fielders INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id), foreign key (Player_Out) references Player(Player_Id), foreign key (Kind_Out) references Out_Type(Out_Id), foreign key (Fielders) references Player(Player_Id) )
na
1,795
1,795
CREATE TABLE `Batting_Style` ( Batting_Id INTEGER primary key, Batting_hand TEXT ) CREATE TABLE `Country` ( Country_Id INTEGER primary key, Country_Name TEXT, foreign key Country_Id references CountryCountry_Id ) CREATE TABLE `Player` ( Player_Name TEXT, Batting_hand INTEGER, Country_Name INTEGER, foreign key Batting_hand references Batting_StyleBatting_Id, foreign key Country_Name references CountryCountry_Id )
[ "AS", "AND", "SELECT", "-", "INNER JOIN", "ON", "FROM" ]
11
medium
{ "case_1": [ -1 ], "case_2": [ -1 ], "case_3": [ 2, 43, 134, 150, 201, 212, 225, 229, 232, 259, 314, 349, 383, 509, 518, 547, 548, 550, 564, 577, 592, 640, 644, 654, 688, 700, 714, 743, 778, 787, 829, 943, 951, 959, 1037, 1064, 1065, 1078, 1087, 1091, 1092, 1098, 1124 ], "case_4": [ 2, 43, 54, 122, 134, 150, 201, 205, 212, 225, 229, 232, 245, 252, 259, 314, 349, 383, 509, 518, 547, 548, 550, 564, 577, 592, 617, 640, 644, 654, 688, 700, 713, 714, 743, 778, 787, 829, 943, 951, 959, 979, 1024, 1037, 1064, 1065, 1078, 1087, 1091, 1092, 1093, 1098, 1102, 1110, 1124 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 32, 33, 34, 36, 37, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 79, 80, 81, 82, 83, 84, 85, 86, 88, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 259, 260, 261, 262, 264, 265, 266, 267, 268, 269, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 304, 305, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 362, 363, 364, 365, 367, 368, 369, 370, 373, 374, 375, 376, 378, 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 444, 445, 446, 447, 448, 449, 450, 451, 452, 454, 455, 456, 457, 459, 460, 462, 463, 464, 465, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 505, 507, 509, 510, 511, 514, 515, 516, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 544, 547, 548, 550, 552, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 662, 663, 665, 666, 667, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 679, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 785, 786, 787, 788, 790, 792, 793, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 817, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 864, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1005, 1006, 1008, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1070, 1071, 1072, 1074, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1114, 1115, 1116, 1118, 1119, 1121, 1122, 1123, 1124, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
soccer_2016
Please list the bowling skills of all the players from Australia.
Australia refers to Country_Name = 'Australia'
SELECT T2.Bowling_Skill FROM Player AS T1 INNER JOIN Bowling_Style AS T2 ON T1.Bowling_skill = T2.Bowling_Id INNER JOIN Country AS T3 ON T1.Country_Name = T3.Country_Id WHERE T3.Country_Name = 'Australia' GROUP BY T2.Bowling_Skill
CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ) CREATE TABLE Country ( Country_Id INTEGER primary key, Country_Name TEXT, foreign key (Country_Id) references Country(Country_Id) ) CREATE TABLE Player ( Player_Id INTEGER primary key, Player_Name TEXT, DOB DATE, Batting_hand INTEGER, Bowling_skill INTEGER, Country_Name INTEGER, foreign key (Batting_hand) references Batting_Style(Batting_Id), foreign key (Bowling_skill) references Bowling_Style(Bowling_Id), foreign key (Country_Name) references Country(Country_Id) )
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ) CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ) CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTEGER ) CREATE TABLE Country ( Country_Id INTEGER primary key, Country_Name TEXT, foreign key (Country_Id) references Country(Country_Id) ) CREATE TABLE Extra_Type ( Extra_Id INTEGER primary key, Extra_Name TEXT ) CREATE TABLE Extra_Runs ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Extra_Type_Id INTEGER, Extra_Runs INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Extra_Type_Id) references Extra_Type(Extra_Id) ) CREATE TABLE Out_Type ( Out_Id INTEGER primary key, Out_Name TEXT ) CREATE TABLE Outcome ( Outcome_Id INTEGER primary key, Outcome_Type TEXT ) CREATE TABLE Player ( Player_Id INTEGER primary key, Player_Name TEXT, DOB DATE, Batting_hand INTEGER, Bowling_skill INTEGER, Country_Name INTEGER, foreign key (Batting_hand) references Batting_Style(Batting_Id), foreign key (Bowling_skill) references Bowling_Style(Bowling_Id), foreign key (Country_Name) references Country(Country_Id) ) CREATE TABLE Rolee ( Role_Id INTEGER primary key, Role_Desc TEXT ) CREATE TABLE Season ( Season_Id INTEGER primary key, Man_of_the_Series INTEGER, Orange_Cap INTEGER, Purple_Cap INTEGER, Season_Year INTEGER ) CREATE TABLE Team ( Team_Id INTEGER primary key, Team_Name TEXT ) CREATE TABLE Toss_Decision ( Toss_Id INTEGER primary key, Toss_Name TEXT ) CREATE TABLE Umpire ( Umpire_Id INTEGER primary key, Umpire_Name TEXT, Umpire_Country INTEGER, foreign key (Umpire_Country) references Country(Country_Id) ) CREATE TABLE Venue ( Venue_Id INTEGER primary key, Venue_Name TEXT, City_Id INTEGER, foreign key (City_Id) references City(City_Id) ) CREATE TABLE Win_By ( Win_Id INTEGER primary key, Win_Type TEXT ) CREATE TABLE Match ( Match_Id INTEGER primary key, Team_1 INTEGER, Team_2 INTEGER, Match_Date DATE, Season_Id INTEGER, Venue_Id INTEGER, Toss_Winner INTEGER, Toss_Decide INTEGER, Win_Type INTEGER, Win_Margin INTEGER, Outcome_type INTEGER, Match_Winner INTEGER, Man_of_the_Match INTEGER, foreign key (Team_1) references Team(Team_Id), foreign key (Team_2) references Team(Team_Id), foreign key (Season_Id) references Season(Season_Id), foreign key (Venue_Id) references Venue(Venue_Id), foreign key (Toss_Winner) references Team(Team_Id), foreign key (Toss_Decide) references Toss_Decision(Toss_Id), foreign key (Win_Type) references Win_By(Win_Id), foreign key (Outcome_type) references Out_Type(Out_Id), foreign key (Match_Winner) references Team(Team_Id), foreign key (Man_of_the_Match) references Player(Player_Id) ) CREATE TABLE Ball_by_Ball ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Innings_No INTEGER, Team_Batting INTEGER, Team_Bowling INTEGER, Striker_Batting_Position INTEGER, Striker INTEGER, Non_Striker INTEGER, Bowler INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id) ) CREATE TABLE Batsman_Scored ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Runs_Scored INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id) ) CREATE TABLE Player_Match ( Match_Id INTEGER, Player_Id INTEGER, Role_Id INTEGER, Team_Id INTEGER, primary key (Match_Id, Player_Id, Role_Id), foreign key (Match_Id) references Match(Match_Id), foreign key (Player_Id) references Player(Player_Id), foreign key (Team_Id) references Team(Team_Id), foreign key (Role_Id) references Rolee(Role_Id) ) CREATE TABLE Wicket_Taken ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Player_Out INTEGER, Kind_Out INTEGER, Fielders INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id), foreign key (Player_Out) references Player(Player_Id), foreign key (Kind_Out) references Out_Type(Out_Id), foreign key (Fielders) references Player(Player_Id) )
na
1,796
1,796
CREATE TABLE `Bowling_Style` ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ) CREATE TABLE `Country` ( Country_Id INTEGER primary key, Country_Name TEXT, foreign key Country_Id references CountryCountry_Id ) CREATE TABLE `Player` ( Bowling_skill INTEGER, Country_Name INTEGER, foreign key Bowling_skill references Bowling_StyleBowling_Id, foreign key Country_Name references CountryCountry_Id )
[ "GROUP BY", "AS", "SELECT", "INNER JOIN", "ON", "FROM" ]
10
simple
{ "case_1": [ -1 ], "case_2": [ -1 ], "case_3": [ 134, 150, 201, 212, 225, 229, 232, 314, 349, 383, 509, 518, 547, 548, 550, 564, 577, 592, 640, 644, 654, 688, 700, 714, 743, 778, 787, 829, 943, 951, 959, 1037, 1064, 1065, 1078, 1087, 1091, 1092, 1098, 1124 ], "case_4": [ 2, 43, 54, 122, 134, 150, 201, 205, 212, 225, 229, 232, 245, 252, 259, 314, 349, 383, 509, 518, 547, 548, 550, 564, 577, 592, 617, 640, 644, 654, 688, 700, 713, 714, 743, 778, 787, 829, 943, 951, 959, 979, 1024, 1037, 1064, 1065, 1078, 1087, 1091, 1092, 1093, 1098, 1102, 1110, 1124 ], "case_5": [ 0, 1, 3, 4, 5, 6, 7, 8, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 88, 89, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 264, 265, 266, 267, 268, 269, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 286, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 304, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 368, 369, 370, 373, 374, 375, 376, 378, 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 444, 445, 446, 447, 448, 449, 450, 451, 452, 454, 455, 456, 457, 459, 460, 462, 463, 464, 465, 466, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 505, 507, 509, 511, 514, 515, 516, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 542, 544, 547, 548, 550, 552, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 796, 797, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 999, 1000, 1001, 1003, 1005, 1006, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1070, 1071, 1072, 1074, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1114, 1115, 1116, 1118, 1119, 1122, 1123, 1124, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
soccer_2016
Among the players whose bowling skill is "Legbreak", when was the oldest one of them born?
the oldest refers to min(DOB); date of birth refers to DOB
SELECT MIN(T1.DOB) FROM Player AS T1 INNER JOIN Bowling_Style AS T2 ON T1.Bowling_skill = T2.Bowling_Id WHERE T2.Bowling_Skill = 'Legbreak'
CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ) CREATE TABLE Player ( Player_Id INTEGER primary key, Player_Name TEXT, DOB DATE, Batting_hand INTEGER, Bowling_skill INTEGER, Country_Name INTEGER, foreign key (Batting_hand) references Batting_Style(Batting_Id), foreign key (Bowling_skill) references Bowling_Style(Bowling_Id), foreign key (Country_Name) references Country(Country_Id) )
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ) CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ) CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTEGER ) CREATE TABLE Country ( Country_Id INTEGER primary key, Country_Name TEXT, foreign key (Country_Id) references Country(Country_Id) ) CREATE TABLE Extra_Type ( Extra_Id INTEGER primary key, Extra_Name TEXT ) CREATE TABLE Extra_Runs ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Extra_Type_Id INTEGER, Extra_Runs INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Extra_Type_Id) references Extra_Type(Extra_Id) ) CREATE TABLE Out_Type ( Out_Id INTEGER primary key, Out_Name TEXT ) CREATE TABLE Outcome ( Outcome_Id INTEGER primary key, Outcome_Type TEXT ) CREATE TABLE Player ( Player_Id INTEGER primary key, Player_Name TEXT, DOB DATE, Batting_hand INTEGER, Bowling_skill INTEGER, Country_Name INTEGER, foreign key (Batting_hand) references Batting_Style(Batting_Id), foreign key (Bowling_skill) references Bowling_Style(Bowling_Id), foreign key (Country_Name) references Country(Country_Id) ) CREATE TABLE Rolee ( Role_Id INTEGER primary key, Role_Desc TEXT ) CREATE TABLE Season ( Season_Id INTEGER primary key, Man_of_the_Series INTEGER, Orange_Cap INTEGER, Purple_Cap INTEGER, Season_Year INTEGER ) CREATE TABLE Team ( Team_Id INTEGER primary key, Team_Name TEXT ) CREATE TABLE Toss_Decision ( Toss_Id INTEGER primary key, Toss_Name TEXT ) CREATE TABLE Umpire ( Umpire_Id INTEGER primary key, Umpire_Name TEXT, Umpire_Country INTEGER, foreign key (Umpire_Country) references Country(Country_Id) ) CREATE TABLE Venue ( Venue_Id INTEGER primary key, Venue_Name TEXT, City_Id INTEGER, foreign key (City_Id) references City(City_Id) ) CREATE TABLE Win_By ( Win_Id INTEGER primary key, Win_Type TEXT ) CREATE TABLE Match ( Match_Id INTEGER primary key, Team_1 INTEGER, Team_2 INTEGER, Match_Date DATE, Season_Id INTEGER, Venue_Id INTEGER, Toss_Winner INTEGER, Toss_Decide INTEGER, Win_Type INTEGER, Win_Margin INTEGER, Outcome_type INTEGER, Match_Winner INTEGER, Man_of_the_Match INTEGER, foreign key (Team_1) references Team(Team_Id), foreign key (Team_2) references Team(Team_Id), foreign key (Season_Id) references Season(Season_Id), foreign key (Venue_Id) references Venue(Venue_Id), foreign key (Toss_Winner) references Team(Team_Id), foreign key (Toss_Decide) references Toss_Decision(Toss_Id), foreign key (Win_Type) references Win_By(Win_Id), foreign key (Outcome_type) references Out_Type(Out_Id), foreign key (Match_Winner) references Team(Team_Id), foreign key (Man_of_the_Match) references Player(Player_Id) ) CREATE TABLE Ball_by_Ball ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Innings_No INTEGER, Team_Batting INTEGER, Team_Bowling INTEGER, Striker_Batting_Position INTEGER, Striker INTEGER, Non_Striker INTEGER, Bowler INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id) ) CREATE TABLE Batsman_Scored ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Runs_Scored INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id) ) CREATE TABLE Player_Match ( Match_Id INTEGER, Player_Id INTEGER, Role_Id INTEGER, Team_Id INTEGER, primary key (Match_Id, Player_Id, Role_Id), foreign key (Match_Id) references Match(Match_Id), foreign key (Player_Id) references Player(Player_Id), foreign key (Team_Id) references Team(Team_Id), foreign key (Role_Id) references Rolee(Role_Id) ) CREATE TABLE Wicket_Taken ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Player_Out INTEGER, Kind_Out INTEGER, Fielders INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id), foreign key (Player_Out) references Player(Player_Id), foreign key (Kind_Out) references Out_Type(Out_Id), foreign key (Fielders) references Player(Player_Id) )
na
1,797
1,797
CREATE TABLE `Bowling_Style` ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ) CREATE TABLE `Player` ( DOB DATE, Bowling_skill INTEGER, foreign key Bowling_skill references Bowling_StyleBowling_Id )
[ "AS", "SELECT", "INNER JOIN", "ON", "MIN", "FROM" ]
7
simple
{ "case_1": [ 509, 644 ], "case_2": [ 509, 644, 1037 ], "case_3": [ 134, 150, 201, 212, 225, 229, 232, 314, 349, 383, 509, 518, 547, 548, 550, 564, 577, 592, 640, 644, 654, 688, 700, 714, 743, 778, 787, 829, 943, 951, 959, 1037, 1064, 1065, 1078, 1087, 1091, 1092, 1098, 1124 ], "case_4": [ 2, 43, 54, 122, 134, 150, 201, 205, 212, 225, 229, 232, 245, 252, 259, 314, 349, 383, 509, 518, 547, 548, 550, 564, 577, 592, 617, 640, 644, 654, 688, 700, 713, 714, 743, 778, 787, 829, 943, 951, 959, 979, 1024, 1037, 1064, 1065, 1078, 1087, 1091, 1092, 1093, 1098, 1102, 1110, 1124 ], "case_5": [ 0, 1, 3, 4, 5, 6, 7, 8, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 88, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 264, 265, 266, 267, 268, 269, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 304, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 368, 369, 370, 373, 374, 375, 376, 378, 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 444, 445, 446, 447, 448, 449, 450, 451, 452, 454, 455, 456, 457, 459, 460, 462, 463, 464, 465, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 505, 507, 509, 511, 514, 515, 516, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 544, 547, 548, 550, 552, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 796, 797, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 999, 1000, 1001, 1003, 1005, 1006, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1071, 1072, 1074, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1114, 1115, 1116, 1118, 1119, 1122, 1123, 1124, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
soccer_2016
What is the bowling skill used by most players?
bowling skill used by most players refers to max(count(Bowling_Skill))
SELECT T1.Bowling_Skill FROM Bowling_Style AS T1 INNER JOIN Player AS T2 ON T2.Bowling_skill = T1.Bowling_Id GROUP BY T1.Bowling_Skill ORDER BY COUNT(T1.Bowling_Skill) DESC LIMIT 1
CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ) CREATE TABLE Player ( Player_Id INTEGER primary key, Player_Name TEXT, DOB DATE, Batting_hand INTEGER, Bowling_skill INTEGER, Country_Name INTEGER, foreign key (Batting_hand) references Batting_Style(Batting_Id), foreign key (Bowling_skill) references Bowling_Style(Bowling_Id), foreign key (Country_Name) references Country(Country_Id) )
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ) CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ) CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTEGER ) CREATE TABLE Country ( Country_Id INTEGER primary key, Country_Name TEXT, foreign key (Country_Id) references Country(Country_Id) ) CREATE TABLE Extra_Type ( Extra_Id INTEGER primary key, Extra_Name TEXT ) CREATE TABLE Extra_Runs ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Extra_Type_Id INTEGER, Extra_Runs INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Extra_Type_Id) references Extra_Type(Extra_Id) ) CREATE TABLE Out_Type ( Out_Id INTEGER primary key, Out_Name TEXT ) CREATE TABLE Outcome ( Outcome_Id INTEGER primary key, Outcome_Type TEXT ) CREATE TABLE Player ( Player_Id INTEGER primary key, Player_Name TEXT, DOB DATE, Batting_hand INTEGER, Bowling_skill INTEGER, Country_Name INTEGER, foreign key (Batting_hand) references Batting_Style(Batting_Id), foreign key (Bowling_skill) references Bowling_Style(Bowling_Id), foreign key (Country_Name) references Country(Country_Id) ) CREATE TABLE Rolee ( Role_Id INTEGER primary key, Role_Desc TEXT ) CREATE TABLE Season ( Season_Id INTEGER primary key, Man_of_the_Series INTEGER, Orange_Cap INTEGER, Purple_Cap INTEGER, Season_Year INTEGER ) CREATE TABLE Team ( Team_Id INTEGER primary key, Team_Name TEXT ) CREATE TABLE Toss_Decision ( Toss_Id INTEGER primary key, Toss_Name TEXT ) CREATE TABLE Umpire ( Umpire_Id INTEGER primary key, Umpire_Name TEXT, Umpire_Country INTEGER, foreign key (Umpire_Country) references Country(Country_Id) ) CREATE TABLE Venue ( Venue_Id INTEGER primary key, Venue_Name TEXT, City_Id INTEGER, foreign key (City_Id) references City(City_Id) ) CREATE TABLE Win_By ( Win_Id INTEGER primary key, Win_Type TEXT ) CREATE TABLE Match ( Match_Id INTEGER primary key, Team_1 INTEGER, Team_2 INTEGER, Match_Date DATE, Season_Id INTEGER, Venue_Id INTEGER, Toss_Winner INTEGER, Toss_Decide INTEGER, Win_Type INTEGER, Win_Margin INTEGER, Outcome_type INTEGER, Match_Winner INTEGER, Man_of_the_Match INTEGER, foreign key (Team_1) references Team(Team_Id), foreign key (Team_2) references Team(Team_Id), foreign key (Season_Id) references Season(Season_Id), foreign key (Venue_Id) references Venue(Venue_Id), foreign key (Toss_Winner) references Team(Team_Id), foreign key (Toss_Decide) references Toss_Decision(Toss_Id), foreign key (Win_Type) references Win_By(Win_Id), foreign key (Outcome_type) references Out_Type(Out_Id), foreign key (Match_Winner) references Team(Team_Id), foreign key (Man_of_the_Match) references Player(Player_Id) ) CREATE TABLE Ball_by_Ball ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Innings_No INTEGER, Team_Batting INTEGER, Team_Bowling INTEGER, Striker_Batting_Position INTEGER, Striker INTEGER, Non_Striker INTEGER, Bowler INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id) ) CREATE TABLE Batsman_Scored ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Runs_Scored INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id) ) CREATE TABLE Player_Match ( Match_Id INTEGER, Player_Id INTEGER, Role_Id INTEGER, Team_Id INTEGER, primary key (Match_Id, Player_Id, Role_Id), foreign key (Match_Id) references Match(Match_Id), foreign key (Player_Id) references Player(Player_Id), foreign key (Team_Id) references Team(Team_Id), foreign key (Role_Id) references Rolee(Role_Id) ) CREATE TABLE Wicket_Taken ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Player_Out INTEGER, Kind_Out INTEGER, Fielders INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id), foreign key (Player_Out) references Player(Player_Id), foreign key (Kind_Out) references Out_Type(Out_Id), foreign key (Fielders) references Player(Player_Id) )
na
1,798
1,798
CREATE TABLE `Bowling_Style` ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ) CREATE TABLE `Player` ( Bowling_skill INTEGER, foreign key Bowling_skill references Bowling_StyleBowling_Id )
[ "GROUP BY", "AS", "SELECT", "ORDER BY", "LIMIT", "INNER JOIN", "ON", "DESC", "COUNT", "FROM" ]
11
medium
{ "case_1": [ 1037 ], "case_2": [ 509, 1037 ], "case_3": [ 150, 212, 225, 229, 252, 314, 349, 383, 509, 547, 548, 564, 592, 654, 688, 714, 743, 778, 787, 943, 951, 1037, 1064, 1065, 1078, 1087, 1091, 1124 ], "case_4": [ 2, 43, 54, 122, 134, 150, 201, 205, 212, 225, 229, 232, 245, 252, 259, 314, 349, 383, 509, 518, 547, 548, 550, 564, 577, 592, 617, 640, 644, 654, 688, 700, 713, 714, 743, 778, 787, 829, 943, 951, 959, 979, 1024, 1037, 1064, 1065, 1078, 1087, 1091, 1092, 1093, 1098, 1102, 1110, 1124 ], "case_5": [ 0, 1, 4, 6, 10, 11, 13, 15, 16, 20, 22, 27, 28, 29, 30, 36, 37, 47, 49, 51, 53, 55, 59, 62, 63, 68, 69, 73, 74, 75, 77, 78, 82, 86, 88, 89, 91, 93, 96, 98, 106, 108, 113, 115, 117, 118, 119, 121, 125, 126, 131, 138, 140, 142, 143, 146, 148, 150, 152, 159, 160, 162, 163, 164, 167, 169, 170, 173, 175, 179, 183, 184, 185, 187, 188, 189, 190, 191, 196, 197, 199, 200, 202, 206, 212, 213, 214, 225, 226, 227, 229, 233, 234, 239, 243, 244, 247, 252, 254, 256, 261, 262, 267, 268, 269, 275, 276, 277, 278, 281, 285, 286, 291, 299, 301, 309, 311, 313, 314, 316, 317, 319, 320, 323, 324, 325, 329, 330, 334, 335, 336, 338, 339, 341, 342, 344, 345, 348, 349, 352, 353, 354, 356, 358, 359, 360, 364, 365, 370, 371, 373, 374, 375, 378, 379, 381, 382, 383, 384, 385, 391, 392, 394, 395, 401, 403, 406, 409, 411, 412, 416, 417, 424, 426, 428, 429, 434, 435, 436, 444, 445, 448, 451, 454, 460, 462, 464, 465, 467, 469, 471, 473, 476, 477, 478, 482, 484, 487, 488, 490, 493, 495, 497, 500, 505, 509, 515, 516, 519, 520, 526, 530, 532, 535, 536, 537, 538, 542, 544, 547, 548, 552, 558, 559, 560, 563, 564, 566, 567, 573, 578, 579, 580, 581, 582, 584, 586, 590, 592, 595, 596, 597, 606, 608, 611, 613, 620, 621, 625, 626, 627, 630, 632, 633, 634, 637, 638, 641, 645, 646, 649, 651, 654, 657, 658, 659, 662, 663, 664, 665, 668, 669, 671, 681, 687, 688, 690, 691, 694, 696, 698, 701, 703, 705, 712, 714, 719, 720, 721, 727, 733, 734, 735, 736, 739, 740, 743, 748, 749, 750, 751, 752, 753, 756, 759, 760, 762, 768, 769, 772, 778, 779, 787, 790, 796, 797, 799, 800, 802, 803, 804, 810, 812, 813, 814, 818, 819, 823, 824, 827, 830, 838, 839, 841, 849, 850, 851, 853, 857, 861, 866, 867, 869, 870, 874, 876, 877, 882, 886, 888, 889, 891, 893, 896, 897, 898, 901, 902, 909, 911, 912, 915, 917, 918, 922, 923, 924, 926, 927, 929, 930, 932, 934, 935, 943, 950, 951, 953, 954, 956, 958, 961, 962, 963, 966, 967, 969, 970, 972, 973, 975, 977, 981, 983, 985, 986, 987, 993, 994, 996, 1004, 1005, 1006, 1010, 1013, 1015, 1017, 1022, 1023, 1025, 1030, 1034, 1037, 1038, 1042, 1043, 1047, 1049, 1050, 1051, 1056, 1057, 1058, 1062, 1064, 1065, 1067, 1068, 1071, 1072, 1076, 1077, 1078, 1082, 1084, 1086, 1087, 1091, 1094, 1100, 1101, 1103, 1104, 1106, 1112, 1119, 1123, 1124, 1128, 1131, 1133, 1134, 1135, 1137 ] }
soccer_2016
What is the name of the player who won the "man of the match" award in the match on 2008/4/18?
name of player refers to Player_Name; on 2008/4/18 refers to Match_Date = '2008-04-18'
SELECT T2.Player_Name FROM Match AS T1 INNER JOIN Player AS T2 ON T2.Player_Id = T1.Man_of_the_Match WHERE T1.Match_Date = '2008-04-18'
CREATE TABLE Player ( Player_Id INTEGER primary key, Player_Name TEXT, DOB DATE, Batting_hand INTEGER, Bowling_skill INTEGER, Country_Name INTEGER, foreign key (Batting_hand) references Batting_Style(Batting_Id), foreign key (Bowling_skill) references Bowling_Style(Bowling_Id), foreign key (Country_Name) references Country(Country_Id) ) CREATE TABLE Match ( Match_Id INTEGER primary key, Team_1 INTEGER, Team_2 INTEGER, Match_Date DATE, Season_Id INTEGER, Venue_Id INTEGER, Toss_Winner INTEGER, Toss_Decide INTEGER, Win_Type INTEGER, Win_Margin INTEGER, Outcome_type INTEGER, Match_Winner INTEGER, Man_of_the_Match INTEGER, foreign key (Team_1) references Team(Team_Id), foreign key (Team_2) references Team(Team_Id), foreign key (Season_Id) references Season(Season_Id), foreign key (Venue_Id) references Venue(Venue_Id), foreign key (Toss_Winner) references Team(Team_Id), foreign key (Toss_Decide) references Toss_Decision(Toss_Id), foreign key (Win_Type) references Win_By(Win_Id), foreign key (Outcome_type) references Out_Type(Out_Id), foreign key (Match_Winner) references Team(Team_Id), foreign key (Man_of_the_Match) references Player(Player_Id) )
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ) CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ) CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTEGER ) CREATE TABLE Country ( Country_Id INTEGER primary key, Country_Name TEXT, foreign key (Country_Id) references Country(Country_Id) ) CREATE TABLE Extra_Type ( Extra_Id INTEGER primary key, Extra_Name TEXT ) CREATE TABLE Extra_Runs ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Extra_Type_Id INTEGER, Extra_Runs INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Extra_Type_Id) references Extra_Type(Extra_Id) ) CREATE TABLE Out_Type ( Out_Id INTEGER primary key, Out_Name TEXT ) CREATE TABLE Outcome ( Outcome_Id INTEGER primary key, Outcome_Type TEXT ) CREATE TABLE Player ( Player_Id INTEGER primary key, Player_Name TEXT, DOB DATE, Batting_hand INTEGER, Bowling_skill INTEGER, Country_Name INTEGER, foreign key (Batting_hand) references Batting_Style(Batting_Id), foreign key (Bowling_skill) references Bowling_Style(Bowling_Id), foreign key (Country_Name) references Country(Country_Id) ) CREATE TABLE Rolee ( Role_Id INTEGER primary key, Role_Desc TEXT ) CREATE TABLE Season ( Season_Id INTEGER primary key, Man_of_the_Series INTEGER, Orange_Cap INTEGER, Purple_Cap INTEGER, Season_Year INTEGER ) CREATE TABLE Team ( Team_Id INTEGER primary key, Team_Name TEXT ) CREATE TABLE Toss_Decision ( Toss_Id INTEGER primary key, Toss_Name TEXT ) CREATE TABLE Umpire ( Umpire_Id INTEGER primary key, Umpire_Name TEXT, Umpire_Country INTEGER, foreign key (Umpire_Country) references Country(Country_Id) ) CREATE TABLE Venue ( Venue_Id INTEGER primary key, Venue_Name TEXT, City_Id INTEGER, foreign key (City_Id) references City(City_Id) ) CREATE TABLE Win_By ( Win_Id INTEGER primary key, Win_Type TEXT ) CREATE TABLE Match ( Match_Id INTEGER primary key, Team_1 INTEGER, Team_2 INTEGER, Match_Date DATE, Season_Id INTEGER, Venue_Id INTEGER, Toss_Winner INTEGER, Toss_Decide INTEGER, Win_Type INTEGER, Win_Margin INTEGER, Outcome_type INTEGER, Match_Winner INTEGER, Man_of_the_Match INTEGER, foreign key (Team_1) references Team(Team_Id), foreign key (Team_2) references Team(Team_Id), foreign key (Season_Id) references Season(Season_Id), foreign key (Venue_Id) references Venue(Venue_Id), foreign key (Toss_Winner) references Team(Team_Id), foreign key (Toss_Decide) references Toss_Decision(Toss_Id), foreign key (Win_Type) references Win_By(Win_Id), foreign key (Outcome_type) references Out_Type(Out_Id), foreign key (Match_Winner) references Team(Team_Id), foreign key (Man_of_the_Match) references Player(Player_Id) ) CREATE TABLE Ball_by_Ball ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Innings_No INTEGER, Team_Batting INTEGER, Team_Bowling INTEGER, Striker_Batting_Position INTEGER, Striker INTEGER, Non_Striker INTEGER, Bowler INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id) ) CREATE TABLE Batsman_Scored ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Runs_Scored INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id) ) CREATE TABLE Player_Match ( Match_Id INTEGER, Player_Id INTEGER, Role_Id INTEGER, Team_Id INTEGER, primary key (Match_Id, Player_Id, Role_Id), foreign key (Match_Id) references Match(Match_Id), foreign key (Player_Id) references Player(Player_Id), foreign key (Team_Id) references Team(Team_Id), foreign key (Role_Id) references Rolee(Role_Id) ) CREATE TABLE Wicket_Taken ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Player_Out INTEGER, Kind_Out INTEGER, Fielders INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id), foreign key (Player_Out) references Player(Player_Id), foreign key (Kind_Out) references Out_Type(Out_Id), foreign key (Fielders) references Player(Player_Id) )
na
1,799
1,799
CREATE TABLE `Player` ( Player_Id INTEGER primary key, Player_Name TEXT ) CREATE TABLE `Match` ( Match_Date DATE, Man_of_the_Match INTEGER, foreign key Man_of_the_Match references PlayerPlayer_Id )
[ "AS", "SELECT", "-", "INNER JOIN", "ON", "FROM" ]
8
simple
{ "case_1": [ -1 ], "case_2": [ 1124 ], "case_3": [ 2, 134, 150, 201, 212, 225, 229, 232, 314, 349, 383, 509, 518, 547, 548, 550, 564, 577, 592, 640, 644, 654, 688, 700, 714, 743, 778, 787, 829, 943, 951, 959, 1037, 1064, 1065, 1078, 1087, 1091, 1092, 1098, 1124 ], "case_4": [ 2, 43, 54, 122, 134, 150, 201, 205, 212, 225, 229, 232, 245, 252, 259, 314, 349, 383, 509, 518, 547, 548, 550, 564, 577, 592, 617, 640, 644, 654, 688, 700, 713, 714, 743, 778, 787, 829, 943, 951, 959, 979, 1024, 1037, 1064, 1065, 1078, 1087, 1091, 1092, 1093, 1098, 1102, 1110, 1124 ], "case_5": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 55, 57, 58, 59, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 88, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 194, 195, 196, 197, 199, 200, 201, 202, 206, 207, 211, 212, 213, 214, 217, 218, 219, 220, 221, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 264, 265, 266, 267, 268, 269, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 304, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 368, 369, 370, 373, 374, 375, 376, 378, 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 444, 445, 446, 447, 448, 449, 450, 451, 452, 454, 455, 456, 457, 459, 460, 462, 463, 464, 465, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 505, 507, 509, 510, 511, 514, 515, 516, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 544, 547, 548, 550, 552, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 601, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 999, 1000, 1001, 1003, 1005, 1006, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1070, 1071, 1072, 1074, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1111, 1112, 1114, 1115, 1116, 1118, 1119, 1122, 1123, 1124, 1128, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }
soccer_2016
For how many times has SC Ganguly played as team captain in a match?
SC Ganguly refers to Player_Name = 'SC Ganguly'; team captain refers to Role_Desc = 'Captain'
SELECT SUM(CASE WHEN T3.Role_Desc = 'Captain' THEN 1 ELSE 0 END) FROM Player AS T1 INNER JOIN Player_Match AS T2 ON T1.Player_Id = T2.Player_Id INNER JOIN Rolee AS T3 ON T2.Role_Id = T3.Role_Id WHERE T1.Player_Name = 'SC Ganguly'
CREATE TABLE Player ( Player_Id INTEGER primary key, Player_Name TEXT, DOB DATE, Batting_hand INTEGER, Bowling_skill INTEGER, Country_Name INTEGER, foreign key (Batting_hand) references Batting_Style(Batting_Id), foreign key (Bowling_skill) references Bowling_Style(Bowling_Id), foreign key (Country_Name) references Country(Country_Id) ) CREATE TABLE Rolee ( Role_Id INTEGER primary key, Role_Desc TEXT ) CREATE TABLE Player_Match ( Match_Id INTEGER, Player_Id INTEGER, Role_Id INTEGER, Team_Id INTEGER, primary key (Match_Id, Player_Id, Role_Id), foreign key (Match_Id) references Match(Match_Id), foreign key (Player_Id) references Player(Player_Id), foreign key (Team_Id) references Team(Team_Id), foreign key (Role_Id) references Rolee(Role_Id) )
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ) CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ) CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTEGER ) CREATE TABLE Country ( Country_Id INTEGER primary key, Country_Name TEXT, foreign key (Country_Id) references Country(Country_Id) ) CREATE TABLE Extra_Type ( Extra_Id INTEGER primary key, Extra_Name TEXT ) CREATE TABLE Extra_Runs ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Extra_Type_Id INTEGER, Extra_Runs INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Extra_Type_Id) references Extra_Type(Extra_Id) ) CREATE TABLE Out_Type ( Out_Id INTEGER primary key, Out_Name TEXT ) CREATE TABLE Outcome ( Outcome_Id INTEGER primary key, Outcome_Type TEXT ) CREATE TABLE Player ( Player_Id INTEGER primary key, Player_Name TEXT, DOB DATE, Batting_hand INTEGER, Bowling_skill INTEGER, Country_Name INTEGER, foreign key (Batting_hand) references Batting_Style(Batting_Id), foreign key (Bowling_skill) references Bowling_Style(Bowling_Id), foreign key (Country_Name) references Country(Country_Id) ) CREATE TABLE Rolee ( Role_Id INTEGER primary key, Role_Desc TEXT ) CREATE TABLE Season ( Season_Id INTEGER primary key, Man_of_the_Series INTEGER, Orange_Cap INTEGER, Purple_Cap INTEGER, Season_Year INTEGER ) CREATE TABLE Team ( Team_Id INTEGER primary key, Team_Name TEXT ) CREATE TABLE Toss_Decision ( Toss_Id INTEGER primary key, Toss_Name TEXT ) CREATE TABLE Umpire ( Umpire_Id INTEGER primary key, Umpire_Name TEXT, Umpire_Country INTEGER, foreign key (Umpire_Country) references Country(Country_Id) ) CREATE TABLE Venue ( Venue_Id INTEGER primary key, Venue_Name TEXT, City_Id INTEGER, foreign key (City_Id) references City(City_Id) ) CREATE TABLE Win_By ( Win_Id INTEGER primary key, Win_Type TEXT ) CREATE TABLE Match ( Match_Id INTEGER primary key, Team_1 INTEGER, Team_2 INTEGER, Match_Date DATE, Season_Id INTEGER, Venue_Id INTEGER, Toss_Winner INTEGER, Toss_Decide INTEGER, Win_Type INTEGER, Win_Margin INTEGER, Outcome_type INTEGER, Match_Winner INTEGER, Man_of_the_Match INTEGER, foreign key (Team_1) references Team(Team_Id), foreign key (Team_2) references Team(Team_Id), foreign key (Season_Id) references Season(Season_Id), foreign key (Venue_Id) references Venue(Venue_Id), foreign key (Toss_Winner) references Team(Team_Id), foreign key (Toss_Decide) references Toss_Decision(Toss_Id), foreign key (Win_Type) references Win_By(Win_Id), foreign key (Outcome_type) references Out_Type(Out_Id), foreign key (Match_Winner) references Team(Team_Id), foreign key (Man_of_the_Match) references Player(Player_Id) ) CREATE TABLE Ball_by_Ball ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Innings_No INTEGER, Team_Batting INTEGER, Team_Bowling INTEGER, Striker_Batting_Position INTEGER, Striker INTEGER, Non_Striker INTEGER, Bowler INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id) ) CREATE TABLE Batsman_Scored ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Runs_Scored INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id) ) CREATE TABLE Player_Match ( Match_Id INTEGER, Player_Id INTEGER, Role_Id INTEGER, Team_Id INTEGER, primary key (Match_Id, Player_Id, Role_Id), foreign key (Match_Id) references Match(Match_Id), foreign key (Player_Id) references Player(Player_Id), foreign key (Team_Id) references Team(Team_Id), foreign key (Role_Id) references Rolee(Role_Id) ) CREATE TABLE Wicket_Taken ( Match_Id INTEGER, Over_Id INTEGER, Ball_Id INTEGER, Player_Out INTEGER, Kind_Out INTEGER, Fielders INTEGER, Innings_No INTEGER, primary key (Match_Id, Over_Id, Ball_Id, Innings_No), foreign key (Match_Id) references Match(Match_Id), foreign key (Player_Out) references Player(Player_Id), foreign key (Kind_Out) references Out_Type(Out_Id), foreign key (Fielders) references Player(Player_Id) )
na
1,800
1,800
CREATE TABLE `Player` ( Player_Id INTEGER primary key, Player_Name TEXT ) CREATE TABLE `Rolee` ( Role_Id INTEGER primary key, Role_Desc TEXT ) CREATE TABLE `Player_Match` ( Player_Id INTEGER, Role_Id INTEGER, Player_Id, Role_Id, foreign key Player_Id references PlayerPlayer_Id, foreign key Role_Id references RoleeRole_Id )
[ "CASE WHEN", "AS", "SELECT", "SUM", "CASE", "INNER JOIN", "ON", "FROM" ]
12
medium
{ "case_1": [ -1 ], "case_2": [ -1 ], "case_3": [ 54, 122, 134, 150, 201, 205, 212, 225, 229, 232, 245, 314, 349, 383, 509, 518, 547, 548, 550, 564, 577, 592, 640, 644, 654, 688, 700, 714, 743, 778, 787, 829, 943, 951, 959, 979, 1037, 1064, 1065, 1078, 1087, 1091, 1092, 1093, 1098, 1110, 1124 ], "case_4": [ 2, 43, 54, 122, 134, 150, 201, 205, 212, 225, 229, 232, 245, 252, 259, 314, 349, 383, 509, 518, 547, 548, 550, 564, 577, 592, 617, 640, 644, 654, 688, 700, 713, 714, 743, 778, 787, 829, 943, 951, 959, 979, 1024, 1037, 1064, 1065, 1078, 1087, 1091, 1092, 1093, 1098, 1102, 1110, 1124 ], "case_5": [ 0, 1, 3, 4, 5, 6, 7, 8, 11, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 33, 34, 36, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 54, 55, 57, 58, 59, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 88, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 104, 105, 106, 107, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 122, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 150, 151, 152, 153, 154, 155, 158, 159, 160, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 173, 175, 176, 177, 179, 180, 183, 184, 186, 187, 188, 189, 190, 191, 192, 194, 195, 196, 197, 199, 200, 201, 202, 205, 206, 207, 211, 212, 213, 214, 215, 217, 218, 219, 220, 221, 223, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 250, 254, 256, 257, 258, 260, 261, 262, 264, 265, 266, 267, 268, 269, 271, 272, 275, 276, 277, 278, 279, 280, 281, 282, 284, 287, 289, 290, 292, 295, 296, 297, 298, 299, 300, 301, 302, 304, 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 329, 330, 333, 334, 335, 336, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 349, 353, 354, 356, 357, 358, 360, 361, 363, 364, 365, 368, 369, 370, 373, 374, 375, 376, 378, 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 398, 401, 402, 403, 405, 406, 407, 408, 409, 411, 412, 413, 414, 415, 416, 417, 419, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 440, 441, 444, 445, 446, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 462, 463, 464, 465, 467, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 501, 503, 504, 505, 507, 508, 509, 511, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 526, 528, 529, 530, 532, 533, 535, 536, 537, 538, 539, 540, 541, 544, 547, 548, 550, 552, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 569, 570, 571, 572, 573, 574, 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, 588, 589, 590, 592, 593, 595, 596, 597, 600, 602, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 620, 621, 623, 624, 625, 626, 627, 628, 630, 631, 632, 633, 634, 636, 637, 638, 639, 640, 641, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 654, 655, 657, 658, 659, 660, 662, 663, 665, 666, 668, 669, 670, 671, 672, 674, 675, 676, 677, 678, 681, 682, 683, 684, 685, 686, 687, 688, 690, 691, 693, 694, 695, 696, 697, 699, 700, 701, 702, 704, 705, 706, 709, 710, 711, 712, 714, 715, 717, 720, 721, 722, 723, 724, 725, 726, 727, 728, 733, 734, 735, 736, 739, 740, 741, 742, 743, 744, 745, 746, 747, 749, 750, 751, 752, 753, 754, 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 782, 783, 784, 786, 787, 788, 790, 792, 793, 795, 796, 797, 798, 799, 800, 802, 803, 804, 805, 806, 807, 808, 809, 810, 812, 813, 814, 818, 819, 822, 823, 824, 825, 827, 828, 829, 830, 832, 833, 834, 835, 837, 838, 839, 841, 844, 845, 846, 848, 849, 850, 851, 852, 853, 854, 857, 858, 859, 860, 861, 862, 863, 866, 867, 868, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 885, 886, 887, 888, 889, 891, 892, 893, 894, 895, 896, 897, 898, 900, 901, 902, 904, 905, 907, 908, 909, 910, 911, 912, 914, 915, 916, 917, 918, 922, 923, 924, 925, 926, 927, 928, 930, 931, 932, 934, 935, 936, 937, 938, 939, 940, 941, 943, 944, 949, 950, 951, 952, 953, 954, 956, 958, 959, 961, 962, 963, 964, 966, 967, 969, 970, 971, 973, 974, 975, 977, 979, 980, 981, 985, 986, 988, 991, 993, 994, 996, 997, 998, 999, 1000, 1001, 1003, 1005, 1006, 1008, 1010, 1012, 1013, 1015, 1016, 1017, 1019, 1022, 1023, 1025, 1027, 1029, 1031, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1056, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1071, 1072, 1074, 1078, 1080, 1082, 1084, 1085, 1086, 1087, 1089, 1091, 1092, 1093, 1094, 1095, 1098, 1099, 1100, 1101, 1103, 1104, 1105, 1106, 1109, 1110, 1111, 1112, 1114, 1115, 1116, 1118, 1119, 1122, 1123, 1124, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137 ] }