File size: 265,432 Bytes
17b03a6 | 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 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 | Spider Error Analysis β Run 1 EM norm: 37.81% | EX: 47.20% ================================================================================ [1] OTHER | DB: concert_singer | EX: β Q : What is the average, minimum, and maximum age for all French singers Pred: SELECT AVG(age), MIN(age), MAX(age) FROM singer WHERE country = 'French' Gold: SELECT AVG(age), MIN(age), MAX(age) FROM singer WHERE country = 'France' Type: AGGREGATION [2] WRONG_COLUMNS | DB: concert_singer | EX: β Q : What is the maximum capacity and the average of all stadiums Pred: SELECT MAX(capacity), AVG(average) FROM stadium Gold: SELECT MAX(capacity), average FROM stadium Type: AGGREGATION [3] WRONG_TABLE | DB: concert_singer | EX: β Q : Show the stadium name and the number of concerts in each stadium Pred: SELECT T2.name, COUNT(*) FROM stadium AS T1 JOIN concert AS T2 ON T1.stadium_id = T2.stadium_id GROUP BY T1.stadium_id Gold: SELECT T2.name, COUNT(*) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id GROUP BY T1.stadium_id Type: JOIN, GROUP_BY, AGGREGATION [4] WRONG_TABLE | DB: concert_singer | EX: β Q : For each stadium, how many concerts play there Pred: SELECT COUNT(*), T1.stadium_id FROM stadium AS T1 JOIN concert AS T2 ON T1.stadium_id = T2.stadium_id GROUP BY T1.stadium_id Gold: SELECT T2.name, COUNT(*) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id GROUP BY T1.stadium_id Type: JOIN, GROUP_BY, AGGREGATION [5] OTHER | DB: concert_singer | EX: β Q : Show the stadium name and capacity with most number of concerts in year 2014 or after Pred: SELECT T2.name, T2.capacity FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year >= 2014 GROUP BY T1.stadium_id ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T2.name, T2.capacity FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year >= 2014 GROUP BY T2.stadium_id ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [6] OTHER | DB: concert_singer | EX: β Q : Show countries where a singer above age 40 and a singer below 30 are from Pred: SELECT Country FROM singer WHERE Age > 40 INTERSECT SELECT Country FROM singer WHERE Age 30 Gold: SELECT country FROM singer WHERE age > 40 INTERSECT SELECT country FROM singer WHERE age < 30 Type: SIMPLE [7] OTHER | DB: concert_singer | EX: β Q : Show the name and theme for all concerts and the number of singers in each concert Pred: SELECT T2.Concert_Name, T2.Theme, COUNT(*) FROM singer_in_concert AS T1 JOIN concert AS T2 ON T1.Concert_ID = T2.Concert_ID GROUP BY T1.Concert_ID Gold: SELECT T2.concert_name, T2.theme, COUNT(*) FROM singer_in_concert AS T1 JOIN concert AS T2 ON T1.concert_id = T2.concert_id GROUP BY T2.concert_id Type: JOIN, GROUP_BY, AGGREGATION [8] OTHER | DB: concert_singer | EX: β Q : What are the names , themes , and number of singers for every concert Pred: SELECT T2.Concert_Name, T2.Theme, COUNT(*) FROM singer_in_concert AS T1 JOIN concert AS T2 ON T1.Concert_ID = T2.Concert_ID GROUP BY T1.Concert_ID Gold: SELECT t2.concert_name, t2.theme, COUNT(*) FROM singer_in_concert AS t1 JOIN concert AS t2 ON t1.concert_id = t2.concert_id GROUP BY t2.concert_id Type: JOIN, GROUP_BY, AGGREGATION [9] OTHER | DB: concert_singer | EX: β Q : List singer names and number of concerts for each singer Pred: SELECT T2.Name, COUNT(*) FROM singer_in_concert AS T1 JOIN concert AS T2 ON T1.concert_id = T2.concert_id GROUP BY T2.Name Gold: SELECT T2.name, COUNT(*) FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id GROUP BY T2.singer_id Type: JOIN, GROUP_BY, AGGREGATION [10] OTHER | DB: concert_singer | EX: β Q : What are the names of the singers and number of concerts for each person Pred: SELECT T2.Name, COUNT(*) FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T2.Name Gold: SELECT T2.name, COUNT(*) FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id GROUP BY T2.singer_id Type: JOIN, GROUP_BY, AGGREGATION [11] WRONG_TABLE | DB: concert_singer | EX: β Q : List all singer names in concerts in year 2014 Pred: SELECT T2.Name FROM concert AS T1 JOIN singer_in_concert AS T2 ON T1.concert_id = T2.concert_id WHERE T1.Year = 2014 Gold: SELECT T2.name FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id JOIN concert AS T3 ON T1.concert_id = T3.concert_id WHERE T3.year = 2014 Type: JOIN [12] OTHER | DB: concert_singer | EX: β Q : What are the names of the singers who performed in a concert in 2014 Pred: SELECT T2.Name FROM singer_in_concert AS T1 JOIN concert AS T2 ON T1.concert_id = T2.concert_id WHERE T2.Year = 2014 Gold: SELECT T2.name FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id JOIN concert AS T3 ON T1.concert_id = T3.concert_id WHERE T3.year = 2014 Type: JOIN [13] EXTRA_JOIN | DB: concert_singer | EX: β Q : what is the name and nation of the singer who have a song having 'Hey' in its name Pred: SELECT T1.name, T1.country FROM singer AS T1 JOIN singer_in_concert AS T2 ON T1.singer_id = T2.singer_id WHERE T2.Song_Name LIKE "%Hey%" Gold: SELECT name, country FROM singer WHERE song_name LIKE '%Hey%' Type: SIMPLE [14] WRONG_TABLE | DB: concert_singer | EX: β Q : Find the number of concerts happened in the stadium with the highest capacity Pred: SELECT COUNT(*) FROM stadium ORDER BY capacity DESC LIMIT 1 Gold: SELECT COUNT(*) FROM concert WHERE stadium_id = (SELECT stadium_id FROM stadium ORDER BY capacity DESC LIMIT 1) Type: ORDER_BY, LIMIT, NESTED, AGGREGATION [15] WRONG_TABLE | DB: concert_singer | EX: β Q : What are the number of concerts that occurred in the stadium with the largest capacity Pred: SELECT COUNT(*) FROM stadium AS T1 JOIN concert AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.capacity = (SELECT MAX(capacity) FROM stadium) Gold: SELECT COUNT(*) FROM concert WHERE stadium_id = (SELECT stadium_id FROM stadium ORDER BY capacity DESC LIMIT 1) Type: ORDER_BY, LIMIT, NESTED, AGGREGATION [16] OTHER | DB: pets_1 | EX: β Q : Find the weight of the youngest dog Pred: SELECT Weight FROM pets ORDER BY Pet_age ASC LIMIT 1 Gold: SELECT weight FROM pets ORDER BY pet_age LIMIT 1 Type: ORDER_BY, LIMIT [17] OTHER | DB: pets_1 | EX: β Q : How much does the youngest dog weigh Pred: SELECT Weight FROM pets ORDER BY Pet_age ASC LIMIT 1 Gold: SELECT weight FROM pets ORDER BY pet_age LIMIT 1 Type: ORDER_BY, LIMIT [18] WRONG_COLUMNS | DB: pets_1 | EX: β Q : List the maximum weight and type for each type of pet Pred: SELECT MAX(weight), TYPE FROM pets GROUP BY TYPE Gold: SELECT MAX(weight), petType FROM pets GROUP BY petType Type: GROUP_BY, AGGREGATION [19] WRONG_TABLE | DB: pets_1 | EX: β Q : Find number of pets owned by students who are older than 20 Pred: SELECT COUNT(*) FROM pets AS T1 JOIN has_pet AS T2 ON T1.petid = T2.petid JOIN student AS T3 ON T3.stuid = T2.stuid WHERE T3.age > 20 Gold: SELECT COUNT(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20 Type: JOIN, AGGREGATION [20] WRONG_TABLE | DB: pets_1 | EX: β Q : How many pets are owned by students that have an age greater than 20 Pred: SELECT COUNT(*) FROM has_pet AS T1 JOIN pets AS T2 ON T1.petid = T2.petid JOIN student AS T3 ON T1.stuid = T3.stuid WHERE T3.pet_age > 20 Gold: SELECT COUNT(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20 Type: JOIN, AGGREGATION [21] WRONG_TABLE | DB: pets_1 | EX: β Q : Find the number of dog pets that are raised by female students (with sex F) Pred: SELECT COUNT(*) FROM Pets AS T1 JOIN Has_pet AS T2 ON T1.petid = T2.petid JOIN Student AS T3 ON T3.StuID = T2.StuID WHERE T3.sex = 'F' Gold: SELECT COUNT(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T2.petid = T3.petid WHERE T1.sex = 'F' AND T3.pettype = 'dog' Type: JOIN, AGGREGATION [22] WRONG_TABLE | DB: pets_1 | EX: β Q : How many dog pets are raised by female students Pred: SELECT COUNT(*) FROM Pets AS T1 JOIN Has_pet AS T2 ON T1.petid = T2.petid JOIN Student AS T3 ON T3.StuID = T2.StuID WHERE T3.sex = 'F' Gold: SELECT COUNT(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T2.petid = T3.petid WHERE T1.sex = 'F' AND T3.pettype = 'dog' Type: JOIN, AGGREGATION [23] OTHER | DB: pets_1 | EX: β Q : Find the first name of students who have cat or dog pet Pred: SELECT DISTINCT T1.fname FROM Student AS T1 JOIN Has_Pet AS T2 ON T1.StuID = T2.StuID WHERE T2.pettype = "cat" OR T2.pettype = "dog" Gold: SELECT DISTINCT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' OR T3.pettype = 'dog' Type: JOIN [24] WRONG_COLUMNS | DB: pets_1 | EX: β Q : What are the first names of every student who has a cat or dog as a pet Pred: SELECT T1.fname FROM Student AS T1 JOIN Has_Pet AS T2 ON T1.StuID = T2.StuID WHERE T2.pettype = "cat" OR T2.pettype = "dog" Gold: SELECT DISTINCT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' OR T3.pettype = 'dog' Type: JOIN [25] WRONG_COLUMNS | DB: pets_1 | EX: β Q : Find the first name of students who have both cat and dog pets Pred: SELECT DISTINCT T1.fname FROM Student AS T1 JOIN Has_Pet AS T2 ON T1.StuID = T2.StuID WHERE T2.pettype = "Cat" INTERSECT SELECT T1.Fname FROM Student AS T1 JOIN Has_Pet AS T2 ON T1.StuID = T2.StuID WHERE T2.pettype = "Dog" Gold: SELECT t1.fname FROM student AS t1 JOIN has_pet AS t2 ON t1.stuid = t2.stuid JOIN pets AS t3 ON t3.petid = t2.petid WHERE t3.pettype = 'cat' INTERSECT SELECT t1.fname FROM student AS t1 JOIN has_pet AS t2 ON t1.stuid = t2.stuid JOIN pets AS t3 ON t3.petid = t2.petid WHERE t3.pettype = 'dog' Type: JOIN [26] WRONG_COLUMNS | DB: pets_1 | EX: β Q : What are the students' first names who have both cats and dogs as pets Pred: SELECT DISTINCT T1.fname FROM Student AS T1 JOIN Has_Pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T2.petid = T3.petid WHERE T3.pettype = "cat" INTERSECT SELECT T1.fname FROM Student AS T1 JOIN Has_Pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T2.pet Gold: SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' INTERSECT SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog' Type: JOIN [27] WRONG_TABLE | DB: pets_1 | EX: β Q : Find the major and age of students who do not have a cat pet Pred: SELECT major, age FROM Student WHERE NOT StuID IN (SELECT StuID FROM Has_pet) Gold: SELECT major, age FROM student WHERE NOT stuid IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat') Type: JOIN, NESTED [28] WRONG_TABLE | DB: pets_1 | EX: β Q : What major is every student who does not own a cat as a pet, and also how old are they Pred: SELECT major, age FROM Student WHERE NOT StuID IN (SELECT StuID FROM Has_pet WHERE petType = "Cat") Gold: SELECT major, age FROM student WHERE NOT stuid IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat') Type: JOIN, NESTED [29] WRONG_TABLE | DB: pets_1 | EX: β Q : Find the id of students who do not have a cat pet Pred: SELECT StuID FROM Student EXCEPT SELECT StuID FROM Has_pet Gold: SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' Type: JOIN [30] WRONG_TABLE | DB: pets_1 | EX: β Q : What are the ids of the students who do not own cats as pets Pred: SELECT StuID FROM Student EXCEPT SELECT StuID FROM Has_pet Gold: SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' Type: JOIN [31] WRONG_TABLE | DB: pets_1 | EX: β Q : Find the first name and age of students who have a dog but do not have a cat as a pet Pred: SELECT fname, age FROM Student WHERE StuID IN (SELECT StuID FROM Has_pet WHERE petType = "dog") EXCEPT SELECT StuID FROM Has_pet WHERE petType = "cat") Gold: SELECT T1.fname, T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog' AND NOT T1.stuid IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat') Type: JOIN, NESTED [32] WRONG_TABLE | DB: pets_1 | EX: β Q : What is the first name of every student who has a dog but does not have a cat Pred: SELECT fname FROM Student WHERE StuID IN (SELECT StuID FROM Has_pet WHERE petType = "dog") EXCEPT SELECT StuID FROM Has_pet WHERE petType = "cat") Gold: SELECT T1.fname, T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog' AND NOT T1.stuid IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat') Type: JOIN, NESTED [33] OTHER | DB: pets_1 | EX: β Q : Find the type and weight of the youngest pet Pred: SELECT pettype, weight FROM pets ORDER BY pet_age ASC LIMIT 1 Gold: SELECT pettype, weight FROM pets ORDER BY pet_age LIMIT 1 Type: ORDER_BY, LIMIT [34] OTHER | DB: pets_1 | EX: β Q : What type of pet is the youngest animal, and how much does it weigh Pred: SELECT pettype, weight FROM pets ORDER BY pet_age ASC LIMIT 1 Gold: SELECT pettype, weight FROM pets ORDER BY pet_age LIMIT 1 Type: ORDER_BY, LIMIT [35] WRONG_COLUMNS | DB: pets_1 | EX: β Q : Find the average and maximum age for each type of pet Pred: SELECT pettype, AVG(pet_age), MAX(pet_age) FROM pets GROUP BY pettype Gold: SELECT AVG(pet_age), MAX(pet_age), pettype FROM pets GROUP BY pettype Type: GROUP_BY, AGGREGATION [36] WRONG_COLUMNS | DB: pets_1 | EX: β Q : What is the average and maximum age for each pet type Pred: SELECT pettype, AVG(pet_age), MAX(pet_age) FROM pets GROUP BY pettype Gold: SELECT AVG(pet_age), MAX(pet_age), pettype FROM pets GROUP BY pettype Type: GROUP_BY, AGGREGATION [37] WRONG_COLUMNS | DB: pets_1 | EX: β Q : Find the average weight for each pet type Pred: SELECT pettype, AVG(weight) FROM pets GROUP BY pettype Gold: SELECT AVG(weight), pettype FROM pets GROUP BY pettype Type: GROUP_BY, AGGREGATION [38] WRONG_COLUMNS | DB: pets_1 | EX: β Q : What is the average weight for each type of pet Pred: SELECT pettype, AVG(weight) FROM pets GROUP BY pettype Gold: SELECT AVG(weight), pettype FROM pets GROUP BY pettype Type: GROUP_BY, AGGREGATION [39] WRONG_TABLE | DB: pets_1 | EX: β Q : Find the id of the pet owned by student whose last name is βSmithβ Pred: SELECT T2.petid FROM Has_pet AS T1 JOIN pets AS T2 ON T1.petid = T2.petid JOIN student AS T3 ON T1.stuid = T3.stuid WHERE T3.lname = 'Smith' Gold: SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith' Type: JOIN [40] WRONG_TABLE | DB: pets_1 | EX: β Q : What is the id of the pet owned by the student whose last name is 'Smith' Pred: SELECT T2.petid FROM Has_pet AS T1 JOIN pets AS T2 ON T1.petid = T2.petid JOIN student AS T3 ON T1.stuid = T3.stuid WHERE T3.lname = 'Smith' Gold: SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith' Type: JOIN [41] WRONG_TABLE | DB: pets_1 | EX: β Q : Find the number of pets for each student who has any pet and student id Pred: SELECT COUNT(*), T1.StuID FROM Has_pet AS T1 JOIN pets AS T2 ON T1.PetId = T2.PetID GROUP BY T1.StuID Gold: SELECT COUNT(*), T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid Type: JOIN, GROUP_BY, AGGREGATION [42] WRONG_TABLE | DB: pets_1 | EX: β Q : For students who have pets , how many pets does each student have ? list their ids instead of names Pred: SELECT COUNT(*), T1.StuID FROM Has_pet AS T1 JOIN pets AS T2 ON T1.PetId = T2.PetID GROUP BY T1.StuID Gold: SELECT COUNT(*), t1.stuid FROM student AS t1 JOIN has_pet AS t2 ON t1.stuid = t2.stuid GROUP BY t1.stuid Type: JOIN, GROUP_BY, AGGREGATION [43] WRONG_TABLE | DB: pets_1 | EX: β Q : Find the last name of the student who has a cat that is age 3 Pred: SELECT lname FROM Student WHERE StuID IN (SELECT StuID FROM Has_pet WHERE Pet_age = 3) Gold: SELECT T1.lname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pet_age = 3 AND T3.pettype = 'cat' Type: JOIN [44] WRONG_TABLE | DB: pets_1 | EX: β Q : What is the last name of the student who has a cat that is 3 years old Pred: SELECT T2.Lname FROM Has_pet AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.Pet_age = 3 Gold: SELECT T1.lname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pet_age = 3 AND T3.pettype = 'cat' Type: JOIN [45] WRONG_TABLE | DB: pets_1 | EX: β Q : What is the average age for all students who do not own any pets Pred: SELECT AVG(T1.age) FROM Student AS T1 JOIN Has_Pet AS T2 ON T1.StuID = T2.StuID WHERE NOT T2.pet_age IN (SELECT T1.age FROM Student AS T1 JOIN Has_Pet AS T2 ON T1.StuID = T2.petid) Gold: SELECT AVG(age) FROM student WHERE NOT stuid IN (SELECT stuid FROM has_pet) Type: NESTED, AGGREGATION [46] WRONG_COLUMNS | DB: car_1 | EX: β Q : How many countries does each continent have? List the continent id, continent name and the number of countries Pred: SELECT T1.continent, COUNT(*) FROM continents AS T1 JOIN countries AS T2 ON T1.contid = T2.continent GROUP BY T1.contid Gold: SELECT T1.ContId, T1.Continent, COUNT(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.Continent GROUP BY T1.ContId Type: JOIN, GROUP_BY, AGGREGATION [47] WRONG_COLUMNS | DB: car_1 | EX: β Q : For each continent, list its id, name, and how many countries it has Pred: SELECT T1.continent, T1.countryname, COUNT(*) FROM continents AS T1 JOIN countries AS T2 ON T1.contid = T2.continent GROUP BY T1.contid Gold: SELECT T1.ContId, T1.Continent, COUNT(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.Continent GROUP BY T1.ContId Type: JOIN, GROUP_BY, AGGREGATION [48] WRONG_COLUMNS | DB: car_1 | EX: β Q : How many models does each car maker produce? List maker full name, id and the number Pred: SELECT COUNT(*), T1.maker FROM car_makers AS T1 JOIN model_list AS T2 ON T1.id = T2.maker GROUP BY T1.maker Gold: SELECT T1.FullName, T1.Id, COUNT(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id Type: JOIN, GROUP_BY, AGGREGATION [49] WRONG_COLUMNS | DB: car_1 | EX: β Q : What is the full name of each car maker, along with its id and how many models it produces Pred: SELECT T1.fullname, T1.make, COUNT(*) FROM car_makers AS T1 JOIN model_list AS T2 ON T1.id = T2.model GROUP BY T1.makemaker Gold: SELECT T1.FullName, T1.Id, COUNT(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id Type: JOIN, GROUP_BY, AGGREGATION [50] WRONG_TABLE | DB: car_1 | EX: β Q : Which model of the car has the minimum horsepower Pred: SELECT t1.model FROM model_list AS t1 JOIN car_names AS t2 ON t1.model = t2.model WHERE horsepower = (SELECT MIN(horsepower) FROM cars_data) Gold: SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.horsepower ASC LIMIT 1 Type: JOIN, ORDER_BY, LIMIT [51] WRONG_COLUMNS | DB: car_1 | EX: β Q : What is the model of the car with the smallest amount of horsepower Pred: SELECT t3.model FROM car_names AS t1 JOIN model_list AS t2 ON t1.model = t2.model ORDER BY t1.horsepower LIMIT 1 Gold: SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.horsepower ASC LIMIT 1 Type: JOIN, ORDER_BY, LIMIT [52] MISSING_JOIN | DB: car_1 | EX: β Q : Find the model of the car whose weight is below the average weight Pred: SELECT DISTINCT model FROM car_names WHERE weight (SELECT AVG(weight) FROM cars_data) Gold: SELECT T1.model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Weight < (SELECT AVG(Weight) FROM CARS_DATA) Type: JOIN, NESTED, AGGREGATION [53] MISSING_JOIN | DB: car_1 | EX: β Q : What is the model for the car with a weight smaller than the average Pred: SELECT model FROM car_names WHERE weight (SELECT AVG(weight) FROM cars_data) Gold: SELECT T1.model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Weight < (SELECT AVG(Weight) FROM CARS_DATA) Type: JOIN, NESTED, AGGREGATION [54] WRONG_COLUMNS | DB: car_1 | EX: β Q : Find the name of the makers that produced some cars in the year of 1970 Pred: SELECT T1.maker FROM car_makers AS T1 JOIN model_list AS T2 ON T1.id = T2.model WHERE T2.year = 1970 Gold: SELECT DISTINCT T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model JOIN CARS_DATA AS T4 ON T3.MakeId = T4.id WHERE T4.year = '1970' Type: JOIN [55] OTHER | DB: car_1 | EX: β Q : What is the name of the different car makers who produced a car in 1970 Pred: SELECT DISTINCT T1.maker FROM car_makers AS T1 JOIN model_list AS T2 ON T1.id = T2.model WHERE T2.year = 1970 Gold: SELECT DISTINCT T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model JOIN CARS_DATA AS T4 ON T3.MakeId = T4.id WHERE T4.year = '1970' Type: JOIN [56] WRONG_TABLE | DB: car_1 | EX: β Q : Find the make and production time of the cars that were produced in the earliest year Pred: SELECT T1.make, T2.year FROM car_names AS T1 JOIN make AS T2 ON T1.makeid = T2.id ORDER BY T1.year LIMIT 1 Gold: SELECT T2.Make, T1.Year FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T1.Year = (SELECT MIN(YEAR) FROM CARS_DATA) Type: JOIN, NESTED, AGGREGATION [57] WRONG_TABLE | DB: car_1 | EX: β Q : What is the maker of the carr produced in the earliest year and what year was it Pred: SELECT T1.maker, T1.year FROM car_makers AS T1 JOIN model_list AS T2 ON T1.id = T2.maker ORDER BY T2.year LIMIT 1 Gold: SELECT T2.Make, T1.Year FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T1.Year = (SELECT MIN(YEAR) FROM CARS_DATA) Type: JOIN, NESTED, AGGREGATION [58] WRONG_TABLE | DB: car_1 | EX: β Q : Which distinct car models are the produced after 1980 Pred: SELECT DISTINCT model FROM car_names WHERE YEAR > 1980 Gold: SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.model = T2.model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.id WHERE T3.year > 1980 Type: JOIN [59] WRONG_COLUMNS | DB: car_1 | EX: β Q : What are the different models for the cards produced after 1980 Pred: SELECT DISTINCT T2.model FROM model_list AS T1 JOIN car_makers AS T2 ON T1.make = T2.makeid WHERE T2.year > 1980 Gold: SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.model = T2.model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.id WHERE T3.year > 1980 Type: JOIN [60] OTHER | DB: car_1 | EX: β Q : How many car makers are there in each continents? List the continent name and the count Pred: SELECT T1.continent, COUNT(*) FROM continents AS T1 JOIN car_makers AS T2 ON T1.contid = T2.id GROUP BY T1.contid Gold: SELECT T1.Continent, COUNT(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.continent JOIN car_makers AS T3 ON T2.CountryId = T3.Country GROUP BY T1.Continent Type: JOIN, GROUP_BY, AGGREGATION [61] OTHER | DB: car_1 | EX: β Q : What is the name of each continent and how many car makers are there in each one Pred: SELECT T1.continent, COUNT(*) FROM continents AS T1 JOIN car_makers AS T2 ON T1.contid = T2.contid GROUP BY T1.continent Gold: SELECT T1.Continent, COUNT(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.continent JOIN car_makers AS T3 ON T2.CountryId = T3.Country GROUP BY T1.Continent Type: JOIN, GROUP_BY, AGGREGATION [62] WRONG_TABLE | DB: car_1 | EX: β Q : Which of the countries has the most car makers? List the country name Pred: SELECT T1.countryname FROM countries AS T1 JOIN car_makers AS T2 ON T1.country = T2.countryid GROUP BY T1.countryname ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T2.CountryName FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId GROUP BY T1.Country ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [63] WRONG_TABLE | DB: car_1 | EX: β Q : What is the name of the country with the most car makers Pred: SELECT T1.countryname FROM countries AS T1 JOIN car_makers AS T2 ON T1.country = T2.countryid GROUP BY T1.countryname ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T2.CountryName FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId GROUP BY T1.Country ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [64] WRONG_TABLE | DB: car_1 | EX: β Q : How many car models are produced by each maker ? Only list the count and the maker full name Pred: SELECT COUNT(*), T1.maker FROM car_makers AS T1 JOIN model_list AS T2 ON T1.id = T2.model GROUP BY T1.maker Gold: SELECT COUNT(*), t2.fullname FROM model_list AS t1 JOIN car_makers AS t2 ON t1.maker = t2.id GROUP BY t2.id Type: JOIN, GROUP_BY, AGGREGATION [65] WRONG_TABLE | DB: car_1 | EX: β Q : What is the number of car models that are produced by each maker and what is the id and full name of each maker Pred: SELECT COUNT(*), T1.make, T1.fullname FROM car_makers AS T1 JOIN model_list AS T2 ON T1.id = T2.model GROUP BY T1.makemaker Gold: SELECT COUNT(*), T2.FullName, T2.id FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id GROUP BY T2.id Type: JOIN, GROUP_BY, AGGREGATION [66] WRONG_TABLE | DB: car_1 | EX: β Q : What is the accelerate of the car make amc hornet sportabout (sw) Pred: SELECT Accelerate FROM car_names WHERE make = 'amc hornet sportabout (sw)' Gold: SELECT T1.Accelerate FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Make = 'amc hornet sportabout (sw)' Type: JOIN [67] WRONG_TABLE | DB: car_1 | EX: β Q : How much does the car accelerate that makes amc hornet sportabout (sw) Pred: SELECT Accelerate FROM car_names WHERE make = 'amc hornet sportabout (sw)' Gold: SELECT T1.Accelerate FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Make = 'amc hornet sportabout (sw)' Type: JOIN [68] WRONG_TABLE | DB: car_1 | EX: β Q : How many car makers are there in france Pred: SELECT COUNT(*) FROM countries AS T1 JOIN car_makers AS T2 ON T1.country = T2.countryid WHERE T1.countryname = "France" Gold: SELECT COUNT(*) FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId WHERE T2.CountryName = 'france' Type: JOIN, AGGREGATION [69] WRONG_TABLE | DB: car_1 | EX: β Q : What is the number of makers of care in France Pred: SELECT COUNT(*) FROM countries AS T1 JOIN model_list AS T2 ON T1.country = T2.countryid WHERE T1.countryname = "France" Gold: SELECT COUNT(*) FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId WHERE T2.CountryName = 'france' Type: JOIN, AGGREGATION [70] WRONG_TABLE | DB: car_1 | EX: β Q : How many car models are produced in the usa Pred: SELECT COUNT(*) FROM car_makers AS T1 JOIN countries AS T2 ON T1.country = T2.countryid WHERE T2.countryname = "USA" Gold: SELECT COUNT(*) FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id JOIN COUNTRIES AS T3 ON T2.Country = T3.CountryId WHERE T3.CountryName = 'usa' Type: JOIN, AGGREGATION [71] WRONG_TABLE | DB: car_1 | EX: β Q : What is the count of the car models produced in the United States Pred: SELECT COUNT(*) FROM car_makers AS T1 JOIN countries AS T2 ON T1.country = T2.countryid WHERE T2.countryname = "United States" Gold: SELECT COUNT(*) FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id JOIN COUNTRIES AS T3 ON T2.Country = T3.CountryId WHERE T3.CountryName = 'usa' Type: JOIN, AGGREGATION [72] WRONG_TABLE | DB: car_1 | EX: β Q : What is the smallest weight of the car produced with 8 cylinders on 1974 Pred: SELECT MIN(weight) FROM car_names AS T1 JOIN make AS T2 ON T1.make = T2.makeid WHERE T2.cylinders = 8 AND YEAR = 1974 Gold: SELECT MIN(weight) FROM cars_data WHERE cylinders = 8 AND year = 1974 Type: AGGREGATION [73] EXTRA_JOIN | DB: car_1 | EX: β Q : What are all the makers and models Pred: SELECT T1.maker, T1.model FROM model_list AS T1 JOIN car_makers AS T2 ON T1.id = T2.maker Gold: SELECT Maker, Model FROM MODEL_LIST Type: SIMPLE [74] EXTRA_JOIN | DB: car_1 | EX: β Q : What are the makers and models Pred: SELECT T1.maker, T1.model FROM model_list AS T1 JOIN car_makers AS T2 ON T1.id = T2.maker Gold: SELECT Maker, Model FROM MODEL_LIST Type: SIMPLE [75] OTHER | DB: car_1 | EX: β Q : What are the countries having at least one car maker? List name and id Pred: SELECT T1.countryname, T1.countryid FROM countries AS T1 JOIN car_makers AS T2 ON T1.country = T2.countryid GROUP BY T1.countryid HAVING COUNT(*) >= 1 Gold: SELECT T1.CountryName, T1.CountryId FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING COUNT(*) >= 1 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [76] OTHER | DB: car_1 | EX: β Q : What are the names and ids of all countries with at least one car maker Pred: SELECT T1.countryname, T1.countryid FROM countries AS T1 JOIN car_makers AS T2 ON T1.country = T2.countryid GROUP BY T1.countryid HAVING COUNT(*) >= 1 Gold: SELECT T1.CountryName, T1.CountryId FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING COUNT(*) >= 1 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [77] WRONG_TABLE | DB: car_1 | EX: β Q : What is the number of the cars with horsepower more than 150 Pred: SELECT COUNT(*) FROM car_names WHERE horsepower > 150 Gold: SELECT COUNT(*) FROM CARS_DATA WHERE horsepower > 150 Type: AGGREGATION [78] OTHER | DB: car_1 | EX: β Q : Which countries in europe have at least 3 car manufacturers Pred: SELECT T1.countryname FROM countries AS T1 JOIN car_makers AS T2 ON T1.country = T2.countryid WHERE T1.country = "Europe" GROUP BY T1.countryname HAVING COUNT(*) >= 3 Gold: SELECT T1.CountryName FROM COUNTRIES AS T1 JOIN CONTINENTS AS T2 ON T1.Continent = T2.ContId JOIN CAR_MAKERS AS T3 ON T1.CountryId = T3.Country WHERE T2.Continent = 'europe' GROUP BY T1.CountryName HAVING COUNT(*) >= 3 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [79] MISSING_JOIN | DB: car_1 | EX: β Q : What are the names of all European countries with at least 3 manufacturers Pred: SELECT countryname FROM countries WHERE countryname = 'Europe' GROUP BY countryname HAVING COUNT(*) >= 3 Gold: SELECT T1.CountryName FROM COUNTRIES AS T1 JOIN CONTINENTS AS T2 ON T1.Continent = T2.ContId JOIN CAR_MAKERS AS T3 ON T1.CountryId = T3.Country WHERE T2.Continent = 'europe' GROUP BY T1.CountryName HAVING COUNT(*) >= 3 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [80] MISSING_JOIN | DB: car_1 | EX: β Q : What is the maximum horsepower and the make of the car models with 3 cylinders Pred: SELECT MAX(horsepower), MAX(make) FROM car_names WHERE cylinders = 3 Gold: SELECT T2.horsepower, T1.Make FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.cylinders = 3 ORDER BY T2.horsepower DESC LIMIT 1 Type: JOIN, ORDER_BY, LIMIT [81] WRONG_TABLE | DB: car_1 | EX: β Q : What is the largest amount of horsepower for the models with 3 cylinders and what make is it Pred: SELECT MAX(HPV), T1.make FROM car_makers AS T1 JOIN model_list AS T2 ON T1.id = T2.modelId WHERE T2.cylinders = 3 GROUP BY T1.make Gold: SELECT T2.horsepower, T1.Make FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.cylinders = 3 ORDER BY T2.horsepower DESC LIMIT 1 Type: JOIN, ORDER_BY, LIMIT [82] WRONG_TABLE | DB: car_1 | EX: β Q : Which model saves the most gasoline? That is to say, have the maximum miles per gallon Pred: SELECT t1.model FROM model_list AS t1 JOIN cars_data AS t2 ON t1.model = t2.model WHERE t2.mpg = (SELECT MAX(mpg) FROM cars_data) Gold: SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.mpg DESC LIMIT 1 Type: JOIN, ORDER_BY, LIMIT [83] OTHER | DB: car_1 | EX: β Q : What is the car model with the highest mpg Pred: SELECT t1.model FROM car_names AS t1 JOIN model_list AS t2 ON t1.model = t2.model ORDER BY t2.mpg DESC LIMIT 1 Gold: SELECT t1.model FROM car_names AS t1 JOIN cars_data AS t2 ON t1.makeid = t2.id ORDER BY t2.mpg DESC LIMIT 1 Type: JOIN, ORDER_BY, LIMIT [84] OTHER | DB: car_1 | EX: β Q : What is the average horsepower of the cars before 1980 Pred: SELECT AVG(horsepower) FROM cars_data WHERE YEAR 1980 Gold: SELECT AVG(horsepower) FROM CARS_DATA WHERE YEAR < 1980 Type: AGGREGATION [85] WRONG_TABLE | DB: car_1 | EX: β Q : What is the average horsepower for all cars produced before 1980 Pred: SELECT AVG(horsepower) FROM car_names WHERE YEAR 1980 Gold: SELECT AVG(horsepower) FROM cars_data WHERE year < 1980 Type: AGGREGATION [86] WRONG_TABLE | DB: car_1 | EX: β Q : What is the average edispl of the cars of model volvo Pred: SELECT AVG(T2.edispl) FROM model_list AS T1 JOIN car_names AS T2 ON T1.model = T2.model WHERE T1.make = "Volvo" Gold: SELECT AVG(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T1.Model = 'volvo' Type: JOIN, AGGREGATION [87] WRONG_TABLE | DB: car_1 | EX: β Q : What is the average edispl for all volvos Pred: SELECT AVG(edispl) FROM cars_data WHERE make = "Volvo" Gold: SELECT AVG(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T1.Model = 'volvo' Type: JOIN, AGGREGATION [88] WRONG_COLUMNS | DB: car_1 | EX: β Q : What is the maximum accelerate for different number of cylinders Pred: SELECT MAX(accurate), COUNT(*) FROM cars_data GROUP BY cylinders Gold: SELECT MAX(Accelerate), Cylinders FROM CARS_DATA GROUP BY Cylinders Type: GROUP_BY, AGGREGATION [89] WRONG_COLUMNS | DB: car_1 | EX: β Q : What is the maximum accelerate for all the different cylinders Pred: SELECT MAX(accurate), cylinders FROM cars_data GROUP BY cylinders Gold: SELECT MAX(Accelerate), Cylinders FROM CARS_DATA GROUP BY Cylinders Type: GROUP_BY, AGGREGATION [90] EXTRA_JOIN | DB: car_1 | EX: β Q : Which model has the most version(make) of cars Pred: SELECT T2.model FROM car_names AS T1 JOIN model_list AS T2 ON T1.model = T2.model GROUP BY T2.model ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY COUNT(*) DESC LIMIT 1 Type: GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [91] WRONG_TABLE | DB: car_1 | EX: β Q : What model has the most different versions Pred: SELECT model FROM model_list GROUP BY model ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY COUNT(*) DESC LIMIT 1 Type: GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [92] WRONG_TABLE | DB: car_1 | EX: β Q : how many cars were produced in 1980 Pred: SELECT COUNT(*) FROM car_names WHERE YEAR = 1980 Gold: SELECT COUNT(*) FROM CARS_DATA WHERE YEAR = 1980 Type: AGGREGATION [93] WRONG_TABLE | DB: car_1 | EX: β Q : In 1980, how many cars were made Pred: SELECT COUNT(*) FROM car_makers WHERE YEAR = 1980 Gold: SELECT COUNT(*) FROM CARS_DATA WHERE YEAR = 1980 Type: AGGREGATION [94] OTHER | DB: car_1 | EX: β Q : How many car models were produced by the maker with full name American Motor Company Pred: SELECT COUNT(*) FROM car_makers AS T1 JOIN model_list AS T2 ON T1.maker = T2.id WHERE T1.fullname = 'American Motor Company' Gold: SELECT COUNT(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker WHERE T1.FullName = 'American Motor Company' Type: JOIN, AGGREGATION [95] OTHER | DB: car_1 | EX: β Q : What is the number of car models created by the car maker American Motor Company Pred: SELECT COUNT(*) FROM car_makers AS T1 JOIN model_list AS T2 ON T1.id = T2.model WHERE T1.maker = "American Motor Company" Gold: SELECT COUNT(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker WHERE T1.FullName = 'American Motor Company' Type: JOIN, AGGREGATION [96] WRONG_COLUMNS | DB: car_1 | EX: β Q : Which makers designed more than 3 car models? List full name and the id Pred: SELECT T1.maker, T1.fullname, T1.id FROM car_makers AS T1 JOIN model_list AS T2 ON T1.maker = T2.id GROUP BY T1.maker HAVING COUNT(*) > 3 Gold: SELECT T1.FullName, T1.Id FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING COUNT(*) > 3 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [97] WRONG_COLUMNS | DB: car_1 | EX: β Q : What are the names and ids of all makers with more than 3 models Pred: SELECT T1.maker, T1.id FROM car_makers AS T1 JOIN model_list AS T2 ON T1.id = T2.modelid GROUP BY T1.maker HAVING COUNT(*) > 3 Gold: SELECT T1.FullName, T1.Id FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING COUNT(*) > 3 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [98] WRONG_TABLE | DB: car_1 | EX: β Q : Which distinctive models are produced by maker with the full name General Motors or weighing more than 3500 Pred: SELECT DISTINCT T2.model FROM car_makers AS T1 JOIN model_list AS T2 ON T1.make = T2.makeid WHERE T1.fullname = "General Motors" OR T1.weight > 3500 Gold: SELECT DISTINCT T2.Model FROM CAR_NAMES AS T1 JOIN MODEL_LIST AS T2 ON T1.Model = T2.Model JOIN CAR_MAKERS AS T3 ON T2.Maker = T3.Id JOIN CARS_DATA AS T4 ON T1.MakeId = T4.Id WHERE T3.FullName = 'General Motors' OR T4.weight > 3500 Type: JOIN [99] WRONG_TABLE | DB: car_1 | EX: β Q : What are the different models created by either the car maker General Motors or weighed more than 3500 Pred: SELECT DISTINCT T2.model FROM car_makers AS T1 JOIN model_list AS T2 ON T1.id = T2.model WHERE T1.maker = "General Motors" OR T1.weight > 3500 Gold: SELECT DISTINCT T2.Model FROM CAR_NAMES AS T1 JOIN MODEL_LIST AS T2 ON T1.Model = T2.Model JOIN CAR_MAKERS AS T3 ON T2.Maker = T3.Id JOIN CARS_DATA AS T4 ON T1.MakeId = T4.Id WHERE T3.FullName = 'General Motors' OR T4.weight > 3500 Type: JOIN [100] WRONG_TABLE | DB: car_1 | EX: β Q : In which years cars were produced weighing no less than 3000 and no more than 4000 Pred: SELECT YEAR FROM car_makers WHERE weight 3000 INTERSECT SELECT YEAR FROM car_makers WHERE weight 4000 Gold: SELECT DISTINCT year FROM cars_data WHERE weight BETWEEN 3000 AND 4000 Type: SIMPLE [101] WRONG_TABLE | DB: car_1 | EX: β Q : What are the different years in which there were cars produced that weighed less than 4000 and also cars that weighted more than 3000 Pred: SELECT DISTINCT YEAR FROM car_makers WHERE weight 4000 INTERSECT SELECT DISTINCT YEAR FROM car_makers WHERE weight > 3000 Gold: SELECT DISTINCT year FROM cars_data WHERE weight BETWEEN 3000 AND 4000 Type: SIMPLE [102] WRONG_COLUMNS | DB: car_1 | EX: β Q : What is the horsepower of the car with the largest accelerate Pred: SELECT horsepower FROM cars_data ORDER BY accelerate DESC LIMIT 1 Gold: SELECT T1.horsepower FROM CARS_DATA AS T1 ORDER BY T1.accelerate DESC LIMIT 1 Type: ORDER_BY, LIMIT [103] WRONG_COLUMNS | DB: car_1 | EX: β Q : What is the horsepower of the car with the greatest accelerate Pred: SELECT horsepower FROM cars_data ORDER BY accelerate DESC LIMIT 1 Gold: SELECT T1.horsepower FROM CARS_DATA AS T1 ORDER BY T1.accelerate DESC LIMIT 1 Type: ORDER_BY, LIMIT [104] WRONG_TABLE | DB: car_1 | EX: β Q : For model volvo, how many cylinders does the car with the least accelerate have Pred: SELECT COUNT(*), T1.model FROM car_names AS T1 JOIN model_list AS T2 ON T1.model = T2.model WHERE T1.make = "Volvo" GROUP BY T1.model ORDER BY SUM(T1.accelerated) LIMIT 1 Gold: SELECT T1.cylinders FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Model = 'volvo' ORDER BY T1.accelerate ASC LIMIT 1 Type: JOIN, ORDER_BY, LIMIT [105] WRONG_TABLE | DB: car_1 | EX: β Q : For a volvo model, how many cylinders does the version with least accelerate have Pred: SELECT t2.cylinders FROM model_list AS t1 JOIN car_names AS t2 ON t1.model = t2.model WHERE t2.make = "Volvo" ORDER BY t2.accurate LIMIT 1 Gold: SELECT T1.cylinders FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Model = 'volvo' ORDER BY T1.accelerate ASC LIMIT 1 Type: JOIN, ORDER_BY, LIMIT [106] MISSING_ORDER_BY | DB: car_1 | EX: β Q : How many cars have a larger accelerate than the car with the largest horsepower Pred: SELECT COUNT(*) FROM cars_data WHERE accelerate > (SELECT MAX(horsepower) FROM cars_data) Gold: SELECT COUNT(*) FROM CARS_DATA WHERE Accelerate > (SELECT Accelerate FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1) Type: ORDER_BY, LIMIT, NESTED, AGGREGATION [107] MISSING_ORDER_BY | DB: car_1 | EX: β Q : What is the number of cars with a greater accelerate than the one with the most horsepower Pred: SELECT COUNT(*) FROM cars_data WHERE accelerate > (SELECT MAX(horsepower) FROM cars_data) Gold: SELECT COUNT(*) FROM CARS_DATA WHERE Accelerate > (SELECT Accelerate FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1) Type: ORDER_BY, LIMIT, NESTED, AGGREGATION [108] WRONG_TABLE | DB: car_1 | EX: β Q : How many countries has more than 2 car makers Pred: SELECT COUNT(*) FROM countries WHERE countryID IN (SELECT countryID FROM car_makers GROUP BY countryID HAVING COUNT(*) > 2) Gold: SELECT COUNT(*) FROM countries AS t1 JOIN car_makers AS t2 ON t1.countryid = t2.country GROUP BY t1.countryid HAVING COUNT(*) > 2 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [109] MISSING_JOIN | DB: car_1 | EX: β Q : What is the number of countries with more than 2 car makers Pred: SELECT COUNT(*) FROM countries WHERE maker > 2 Gold: SELECT COUNT(*) FROM countries AS t1 JOIN car_makers AS t2 ON t1.countryid = t2.country GROUP BY t1.countryid HAVING COUNT(*) > 2 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [110] WRONG_TABLE | DB: car_1 | EX: β Q : For the cars with 4 cylinders, which model has the largest horsepower Pred: SELECT t3.model FROM cars_data AS t1 JOIN model_list AS t2 ON t1.model = t2.model WHERE t1.cylinders = 4 AND horsepower = (SELECT MAX(horsepower) FROM car_names) Gold: SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Cylinders = 4 ORDER BY T2.horsepower DESC LIMIT 1 Type: JOIN, ORDER_BY, LIMIT [111] MISSING_ORDER_BY | DB: car_1 | EX: β Q : For all of the 4 cylinder cars, which model has the most horsepower Pred: SELECT t1.model FROM car_names AS t1 JOIN model_list AS t2 ON t1.model = t2.model WHERE t1.cylinders = 4 AND horsepower = (SELECT MAX(horsepower) FROM car_names) Gold: SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Cylinders = 4 ORDER BY T2.horsepower DESC LIMIT 1 Type: JOIN, ORDER_BY, LIMIT [112] WRONG_TABLE | DB: car_1 | EX: β Q : Among the cars with more than lowest horsepower, which ones do not have more than 3 cylinders? List the car makeid and make name Pred: SELECT T1.make, T1.make FROM car_names AS T1 JOIN cars_data AS T2 ON T1.id = T2.makeid WHERE T2.horsepower > 3 EXCEPT SELECT T1.make, T1.make FROM car_names AS T1 JOIN cars_data AS T2 ON T1.id = T2.makeid WHERE T2.horsepower > 3 Gold: SELECT T2.MakeId, T2.Make FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T1.Horsepower > (SELECT MIN(Horsepower) FROM CARS_DATA) AND T1.Cylinders <= 3 Type: JOIN, NESTED, AGGREGATION [113] WRONG_TABLE | DB: car_1 | EX: β Q : Among the cars that do not have the minimum horsepower , what are the make ids and names of all those with less than 4 cylinders Pred: SELECT DISTINCT T1.make, T1.make FROM car_names AS T1 JOIN cars_data AS T2 ON T1.id = T2.makeid WHERE T2.horsepower 4 Gold: SELECT t2.makeid, t2.make FROM cars_data AS t1 JOIN car_names AS t2 ON t1.id = t2.makeid WHERE t1.horsepower > (SELECT MIN(horsepower) FROM cars_data) AND t1.cylinders < 4 Type: JOIN, NESTED, AGGREGATION [114] OTHER | DB: car_1 | EX: β Q : What is the maximum miles per gallon of the car with 8 cylinders or produced before 1980 Pred: SELECT MAX(mpg) FROM cars_data WHERE cylinders = 8 OR YEAR 1980 Gold: SELECT MAX(mpg) FROM cars_data WHERE cylinders = 8 OR year < 1980 Type: AGGREGATION [115] WRONG_COLUMNS | DB: car_1 | EX: β Q : What is the maximum mpg of the cars that had 8 cylinders or that were produced before 1980 Pred: SELECT MAX(mpg) FROM cars_data WHERE cylinders = 8 UNION SELECT MPG FROM cars_data WHERE YEAR 1980 Gold: SELECT MAX(mpg) FROM cars_data WHERE cylinders = 8 OR year < 1980 Type: AGGREGATION [116] MISSING_JOIN | DB: car_1 | EX: β Q : Which models are lighter than 3500 but not built by the 'Ford Motor Company' Pred: SELECT model FROM model_list WHERE weight 3500 EXCEPT SELECT model FROM model_list WHERE maker = 'Ford Motor Company' Gold: SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.Model = T2.Model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.Id JOIN CAR_MAKERS AS T4 ON T1.Maker = T4.Id WHERE T3.weight < 3500 AND T4.FullName <> 'Ford Motor Company' Type: JOIN [117] WRONG_TABLE | DB: car_1 | EX: β Q : What are the different models wthat are lighter than 3500 but were not built by the Ford Motor Company Pred: SELECT DISTINCT T2.model FROM car_names AS T1 JOIN model_list AS T2 ON T1.model = T2.model WHERE T1.weight 3500 EXCEPT SELECT DISTINCT T2.model FROM car_makers AS T1 JOIN model_list AS T2 ON T1.model = T2.model WHERE T1.maker = "Ford Motor Company" Gold: SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.Model = T2.Model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.Id JOIN CAR_MAKERS AS T4 ON T1.Maker = T4.Id WHERE T3.weight < 3500 AND T4.FullName <> 'Ford Motor Company' Type: JOIN [118] OTHER | DB: car_1 | EX: β Q : What are the name of the countries where there is not a single car maker Pred: SELECT countryname FROM countries EXCEPT SELECT T1.countryname FROM countries AS T1 JOIN car_makers AS T2 ON T1.country = T2.countryid Gold: SELECT CountryName FROM countries EXCEPT SELECT T1.CountryName FROM countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.countryId = T2.Country Type: JOIN [119] WRONG_TABLE | DB: car_1 | EX: β Q : What are the names of the countries with no car makers Pred: SELECT countryname FROM countries WHERE NOT countryid IN (SELECT countryid FROM car_makers) Gold: SELECT CountryName FROM countries EXCEPT SELECT T1.CountryName FROM countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.countryId = T2.Country Type: JOIN [120] OTHER | DB: car_1 | EX: β Q : Which are the car makers which produce at least 2 models and more than 3 car makers ? List the id and the maker Pred: SELECT T1.id, T1.maker FROM car_makers AS T1 JOIN model_list AS T2 ON T1.id = T2.model GROUP BY T1.id HAVING COUNT(*) >= 2 INTERSECT SELECT T1.id, T1.maker FROM car_makers AS T1 JOIN model_list AS T2 ON T1.id = T2.model GROUP BY T1.id HAVING COUNT(*) >= 3 Gold: SELECT t1.id, t1.maker FROM car_makers AS t1 JOIN model_list AS t2 ON t1.id = t2.maker GROUP BY t1.id HAVING COUNT(*) >= 2 INTERSECT SELECT t1.id, t1.maker FROM car_makers AS t1 JOIN model_list AS t2 ON t1.id = t2.maker JOIN car_names AS t3 ON t2.model = t3.model GROUP BY t1.id HAVING COUNT(*) > 3 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [121] OTHER | DB: car_1 | EX: β Q : What are the ids and makers of all car makers that produce at least 2 models and make more than 3 cars Pred: SELECT T1.id, T1.maker FROM car_makers AS T1 JOIN model_list AS T2 ON T1.id = T2.model GROUP BY T1.maker HAVING COUNT(*) >= 2 INTERSECT SELECT T1.id, T1.maker FROM car_makers AS T1 JOIN model_list AS T2 ON T1.id = T2.model GROUP BY T1.maker HAVING COUNT(*) >= 3 Gold: SELECT T1.Id, T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING COUNT(*) >= 2 INTERSECT SELECT T1.Id, T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model GROUP BY T1.Id HAVING COUNT(*) > 3 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [122] OTHER | DB: car_1 | EX: β Q : What are the id and names of the countries which have more than 3 car makers or produce the 'fiat' model Pred: SELECT T1.countryid, T1.countryname FROM countries AS T1 JOIN car_makers AS T2 ON T1.country = T2.countryid WHERE T2.make = 'Fiat' GROUP BY T1.countryid HAVING COUNT(*) > 3 UNION SELECT T1.countryid, T1.countryname FROM countries AS T1 JOIN model_list AS T2 ON T1.country = T2.model WHERE T2.model = 'Fiat' Gold: SELECT T1.countryId, T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.countryId HAVING COUNT(*) > 3 UNION SELECT T1.countryId, T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country JOIN MODEL_LIST AS T3 ON T2.Id = T3.Maker WHERE T3.Model = 'fiat' Type: JOIN, GROUP_BY, HAVING, AGGREGATION [123] OTHER | DB: car_1 | EX: β Q : What are the ids and names of all countries that either have more than 3 car makers or produce fiat model Pred: SELECT T1.countryid, T1.countryname FROM countries AS T1 JOIN car_makers AS T2 ON T1.country = T2.countryid GROUP BY T1.countryid HAVING COUNT(*) > 3 UNION SELECT T1.countryid, T1.countryname FROM countries AS T1 JOIN model_list AS T2 ON T1.country = T2.modelid WHERE T2.make = "Fiat" Gold: SELECT t1.countryid, t1.countryname FROM countries AS t1 JOIN car_makers AS t2 ON t1.countryid = t2.country GROUP BY t1.countryid HAVING COUNT(*) > 3 UNION SELECT t1.countryid, t1.countryname FROM countries AS t1 JOIN car_makers AS t2 ON t1.countryid = t2.country JOIN model_list AS t3 ON t2.id = t3.maker WHERE t3.model = 'fiat' Type: JOIN, GROUP_BY, HAVING, AGGREGATION [124] OTHER | DB: flight_2 | EX: β Q : Which abbreviation corresponds to Jetblue Airways Pred: SELECT abbreviation FROM airlines WHERE airline = 'Jitblue Airways' Gold: SELECT Abbreviation FROM AIRLINES WHERE Airline = "JetBlue Airways" Type: SIMPLE [125] OTHER | DB: flight_2 | EX: β Q : Which city and country is the Alton airport at Pred: SELECT city, country FROM airports WHERE airportname = 'Altons' Gold: SELECT City, Country FROM AIRPORTS WHERE AirportName = "Alton" Type: SIMPLE [126] OTHER | DB: flight_2 | EX: β Q : What is the airport name for airport 'AKO' Pred: SELECT airportname FROM airports WHERE airportname = 'AKO' Gold: SELECT AirportName FROM AIRPORTS WHERE AirportCode = "AKO" Type: SIMPLE [127] OTHER | DB: flight_2 | EX: β Q : How many flights depart from 'APG' Pred: SELECT COUNT(*) FROM flights WHERE abbreviation = 'APG' Gold: SELECT COUNT(*) FROM FLIGHTS WHERE SourceAirport = "APG" Type: AGGREGATION [128] OTHER | DB: flight_2 | EX: β Q : Count the number of flights departing from 'APG' Pred: SELECT COUNT(*) FROM flights WHERE abbreviation = 'APG' Gold: SELECT COUNT(*) FROM FLIGHTS WHERE SourceAirport = "APG" Type: AGGREGATION [129] EXTRA_JOIN | DB: flight_2 | EX: β Q : How many flights have destination ATO Pred: SELECT COUNT(*) FROM flights AS T1 JOIN airports AS T2 ON T1.airportcode = T2.sourceairport WHERE T2.country = "ATO" Gold: SELECT COUNT(*) FROM FLIGHTS WHERE DestAirport = "ATO" Type: AGGREGATION [130] OTHER | DB: flight_2 | EX: β Q : Count the number of flights into ATO Pred: SELECT COUNT(*) FROM flights WHERE airportcode = 'ATO' Gold: SELECT COUNT(*) FROM FLIGHTS WHERE DestAirport = "ATO" Type: AGGREGATION [131] WRONG_TABLE | DB: flight_2 | EX: β Q : How many flights depart from City Aberdeen Pred: SELECT COUNT(*) FROM airports WHERE city = "Aberdeen" Gold: SELECT COUNT(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = "Aberdeen" Type: JOIN, AGGREGATION [132] MISSING_JOIN | DB: flight_2 | EX: β Q : Return the number of flights departing from Aberdeen Pred: SELECT COUNT(*) FROM flights WHERE airports = "Aberdeen" Gold: SELECT COUNT(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = "Aberdeen" Type: JOIN, AGGREGATION [133] WRONG_TABLE | DB: flight_2 | EX: β Q : How many flights arriving in Aberdeen city Pred: SELECT COUNT(*) FROM airports WHERE city = 'Aberdeen' Gold: SELECT COUNT(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = "Aberdeen" Type: JOIN, AGGREGATION [134] WRONG_TABLE | DB: flight_2 | EX: β Q : Return the number of flights arriving in Aberdeen Pred: SELECT COUNT(*) FROM airports AS T1 JOIN flights AS T2 ON T1.airport = T2.sourceairport WHERE T1.city = "Aberdeen" Gold: SELECT COUNT(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = "Aberdeen" Type: JOIN, AGGREGATION [135] OTHER | DB: flight_2 | EX: β Q : How many flights depart from City 'Aberdeen' and have destination City 'Ashley' Pred: SELECT COUNT(*) FROM flights AS T1 JOIN airports AS T2 ON T1.airport = T2.sourceairport WHERE T2.city = 'Aberdeen' AND T2.airportcode = 'Ashley' Gold: SELECT COUNT(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRPORTS AS T3 ON T1.SourceAirport = T3.AirportCode WHERE T2.City = "Ashley" AND T3.City = "Aberdeen" Type: JOIN, AGGREGATION [136] WRONG_TABLE | DB: flight_2 | EX: β Q : How many flights fly from Aberdeen to Ashley Pred: SELECT COUNT(*) FROM airports AS T1 JOIN flights AS T2 ON T1.airport = T2.sourceairport WHERE T1.airportcode = "Ashley" AND T1.city = "Aberdeen" Gold: SELECT COUNT(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRPORTS AS T3 ON T1.SourceAirport = T3.AirportCode WHERE T2.City = "Ashley" AND T3.City = "Aberdeen" Type: JOIN, AGGREGATION [137] WRONG_TABLE | DB: flight_2 | EX: β Q : How many flights does airline 'JetBlue Airways' have Pred: SELECT COUNT(*) FROM airlines AS T1 JOIN flights AS T2 ON T1.uid = T2.sourceairport WHERE T1.airline = 'JetBlue Airways' Gold: SELECT COUNT(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline = T2.uid WHERE T2.Airline = "JetBlue Airways" Type: JOIN, AGGREGATION [138] WRONG_TABLE | DB: flight_2 | EX: β Q : Give the number of Jetblue Airways flights Pred: SELECT COUNT(*) FROM airlines AS T1 JOIN flights AS T2 ON T1.uid = T2.sourceairport WHERE T1.abbreviation = "Jitblue Airways" Gold: SELECT COUNT(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline = T2.uid WHERE T2.Airline = "JetBlue Airways" Type: JOIN, AGGREGATION [139] OTHER | DB: flight_2 | EX: β Q : How many 'United Airlines' flights go to Airport 'ASY' Pred: SELECT COUNT(*) FROM airlines AS T1 JOIN flights AS T2 ON T1.uid = T2.unitedairport WHERE T1.airportname = 'ASY' Gold: SELECT COUNT(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = "United Airlines" AND T2.DestAirport = "ASY" Type: JOIN, AGGREGATION [140] WRONG_TABLE | DB: flight_2 | EX: β Q : Count the number of United Airlines flights arriving in ASY Airport Pred: SELECT COUNT(*) FROM airports AS T1 JOIN flights AS T2 ON T1.airport = T2.sourceairport WHERE T1.airportname = "ASY" AND T2.abbreviation = "United Airlines" Gold: SELECT COUNT(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = "United Airlines" AND T2.DestAirport = "ASY" Type: JOIN, AGGREGATION [141] WRONG_TABLE | DB: flight_2 | EX: β Q : How many 'United Airlines' flights depart from Airport 'AHD' Pred: SELECT COUNT(*) FROM flights AS T1 JOIN airports AS T2 ON T1.airport = T2.sourceairport WHERE T2.airportcode = 'AHD' AND T1.uid = 'United Airlines' Gold: SELECT COUNT(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = "United Airlines" AND T2.SourceAirport = "AHD" Type: JOIN, AGGREGATION [142] WRONG_TABLE | DB: flight_2 | EX: β Q : Return the number of United Airlines flights leaving from AHD Airport Pred: SELECT COUNT(*) FROM flights AS T1 JOIN airports AS T2 ON T1.airport = T2.airportcode JOIN airlines AS T3 ON T1.uid = T3.uid WHERE T2.airportname = 'AHD Airport' AND T3.airportname = 'United Airlines' Gold: SELECT COUNT(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = "United Airlines" AND T2.SourceAirport = "AHD" Type: JOIN, AGGREGATION [143] WRONG_TABLE | DB: flight_2 | EX: β Q : How many United Airlines flights go to City 'Aberdeen' Pred: SELECT COUNT(*) FROM airlines AS T1 JOIN flights AS T2 ON T1.uid = T2.united airlines WHERE T1.city = 'Aberdeen' Gold: SELECT COUNT(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRLINES AS T3 ON T3.uid = T1.Airline WHERE T2.City = "Aberdeen" AND T3.Airline = "United Airlines" Type: JOIN, AGGREGATION [144] OTHER | DB: flight_2 | EX: β Q : Count the number of United Airlines flights that arrive in Aberdeen Pred: SELECT COUNT(*) FROM flights AS T1 JOIN airports AS T2 ON T1.airport = T2.sourceairport WHERE T2.airportcode = "Aberdeen" AND T1.uid = "United Airlines" Gold: SELECT COUNT(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRLINES AS T3 ON T3.uid = T1.Airline WHERE T2.City = "Aberdeen" AND T3.Airline = "United Airlines" Type: JOIN, AGGREGATION [145] WRONG_TABLE | DB: flight_2 | EX: β Q : Which city has most number of arriving flights Pred: SELECT city FROM flights GROUP BY city ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport GROUP BY T1.City ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [146] MISSING_JOIN | DB: flight_2 | EX: β Q : Which city has the most frequent destination airport Pred: SELECT city FROM airports ORDER BY airportname DESC LIMIT 1 Gold: SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport GROUP BY T1.City ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [147] WRONG_TABLE | DB: flight_2 | EX: β Q : Which city has most number of departing flights Pred: SELECT T1.city FROM airports AS T1 JOIN flights AS T2 ON T1.airportcode = T2.sourceairport WHERE T2.flightno = (SELECT MAX(flightno) FROM flights) Gold: SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.SourceAirport GROUP BY T1.City ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [148] OTHER | DB: flight_2 | EX: β Q : Which city is the most frequent source airport Pred: SELECT T1.city FROM airports AS T1 JOIN flights AS T2 ON T1.airport = T2.sourceairport GROUP BY T2.city ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.SourceAirport GROUP BY T1.City ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [149] MISSING_JOIN | DB: flight_2 | EX: β Q : What is the code of airport that has the highest number of flights Pred: SELECT airportcode FROM airports GROUP BY airportcode ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [150] MISSING_JOIN | DB: flight_2 | EX: β Q : What is the airport code of the airport with the most flights Pred: SELECT airportcode FROM airports GROUP BY airportcode ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [151] MISSING_JOIN | DB: flight_2 | EX: β Q : What is the code of airport that has fewest number of flights Pred: SELECT airportcode FROM airports ORDER BY flightno ASC LIMIT 1 Gold: SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY COUNT(*) LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [152] MISSING_JOIN | DB: flight_2 | EX: β Q : Give the code of the airport with the least flights Pred: SELECT airportcode FROM airports GROUP BY airportcode ORDER BY COUNT(*) LIMIT 1 Gold: SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY COUNT(*) LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [153] OTHER | DB: flight_2 | EX: β Q : Which airline has most number of flights Pred: SELECT T1.Airline FROM airlines AS T1 JOIN flights AS T2 ON T1.Airline = T2.Airline GROUP BY T1.Airline ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [154] OTHER | DB: flight_2 | EX: β Q : What airline serves the most flights Pred: SELECT T1.Airline FROM airlines AS T1 JOIN flights AS T2 ON T1.Airline = T2.Airline GROUP BY T1.Airline ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [155] MISSING_JOIN | DB: flight_2 | EX: β Q : Find the abbreviation and country of the airline that has fewest number of flights Pred: SELECT abbreviation, country FROM airlines GROUP BY abbreviation ORDER BY COUNT(*) LIMIT 1 Gold: SELECT T1.Abbreviation, T1.Country FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY COUNT(*) LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [156] WRONG_TABLE | DB: flight_2 | EX: β Q : What is the abbreviation of the airilne has the fewest flights and what country is it in Pred: SELECT abbreviation, country FROM flights GROUP BY abbreviation ORDER BY COUNT(*) ASC LIMIT 1 Gold: SELECT T1.Abbreviation, T1.Country FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY COUNT(*) LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [157] OTHER | DB: flight_2 | EX: β Q : What are airlines that have some flight departing from airport 'AHD' Pred: SELECT T1.airline FROM airlines AS T1 JOIN flights AS T2 ON T1.uid = T2.flightno WHERE T2.airportname = 'AHD' Gold: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "AHD" Type: JOIN [158] OTHER | DB: flight_2 | EX: β Q : Which airlines have a flight with source airport AHD Pred: SELECT T1.airline FROM airlines AS T1 JOIN flights AS T2 ON T1.uid = T2.flightno WHERE T2.sourceairport = 'AHD' Gold: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "AHD" Type: JOIN [159] OTHER | DB: flight_2 | EX: β Q : What are airlines that have flights arriving at airport 'AHD' Pred: SELECT T1.airline FROM airlines AS T1 JOIN flights AS T2 ON T1.uid = T2.flightno JOIN airports AS T3 ON T2.airportcode = T3.airportcode WHERE T3.airportname = 'AHD' Gold: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.DestAirport = "AHD" Type: JOIN [160] OTHER | DB: flight_2 | EX: β Q : Which airlines have a flight with destination airport AHD Pred: SELECT T1.airline FROM airlines AS T1 JOIN flights AS T2 ON T1.uid = T2.flightno JOIN airports AS T3 ON T2.sourceairport = T3.airportcode WHERE T3.airportname = 'AHD' Gold: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.DestAirport = "AHD" Type: JOIN [161] OTHER | DB: flight_2 | EX: β Q : Find all airlines that have flights from both airports 'APG' and 'CVO' Pred: SELECT T1.airline FROM airlines AS T1 JOIN flights AS T2 ON T1.uid = T2.flightno WHERE T2.airportname = 'APG' INTERSECT SELECT T1.airline FROM airlines AS T1 JOIN airports AS T2 ON T1.airportcode = T2.airportcode WHERE T2.airportname = 'CVO' Gold: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "APG" INTERSECT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "CVO" Type: JOIN [162] OTHER | DB: flight_2 | EX: β Q : Which airlines have departing flights from both APG and CVO airports Pred: SELECT T1.airline FROM airlines AS T1 JOIN flights AS T2 ON T1.uid = T2.flightno WHERE T2.airportcode = 'APG' INTERSECT SELECT T1.airline FROM airlines AS T1 JOIN airports AS T2 ON T1.airport = T2.airportcode WHERE T2.airportname = 'CVO' Gold: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "APG" INTERSECT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "CVO" Type: JOIN [163] OTHER | DB: flight_2 | EX: β Q : Find all airlines that have flights from airport 'CVO' but not from 'APG' Pred: SELECT T1.airline FROM airlines AS T1 JOIN flights AS T2 ON T1.uid = T2.flightno WHERE T2.airportcode = 'CVO' EXCEPT SELECT T1.airline FROM airlines AS T1 JOIN airports AS T2 ON T1.airportcode = T2.sourceairport WHERE T2.airportname = 'APG' Gold: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "CVO" EXCEPT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "APG" Type: JOIN [164] OTHER | DB: flight_2 | EX: β Q : Which airlines have departures from CVO but not from APG airports Pred: SELECT T1.airline FROM airlines AS T1 JOIN airports AS T2 ON T1.uid = T2.sourceairport WHERE T2.airportcode = "CVO" EXCEPT SELECT T1.airline FROM airlines AS T1 JOIN airports AS T2 ON T1.uid = T2.sourceairport WHERE T2.airportcode = "APG" Gold: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "CVO" EXCEPT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "APG" Type: JOIN [165] OTHER | DB: flight_2 | EX: β Q : Find all airlines that have at least 10 flights Pred: SELECT T1.Airline FROM airlines AS T1 JOIN flights AS T2 ON T1.UID = T2.FlightNo GROUP BY T1.Airline HAVING COUNT(*) >= 10 Gold: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING COUNT(*) > 10 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [166] OTHER | DB: flight_2 | EX: β Q : Which airlines have at least 10 flights Pred: SELECT T1.Airline FROM airlines AS T1 JOIN flights AS T2 ON T1.UID = T2.FlightNo GROUP BY T1.Airline HAVING COUNT(*) >= 10 Gold: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING COUNT(*) > 10 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [167] WRONG_TABLE | DB: flight_2 | EX: β Q : Find all airlines that have fewer than 200 flights Pred: SELECT airline FROM flights GROUP BY airline HAVING COUNT(*) 200 Gold: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING COUNT(*) < 200 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [168] WRONG_TABLE | DB: flight_2 | EX: β Q : Which airlines have less than 200 flights Pred: SELECT airline FROM flights GROUP BY airline HAVING COUNT(*) 200 Gold: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING COUNT(*) < 200 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [169] OTHER | DB: flight_2 | EX: β Q : What are flight numbers of Airline "United Airlines" Pred: SELECT T1.flightno FROM flights AS T1 JOIN airlines AS T2 ON T1.uid = T2.airline WHERE T2.name = "United Airlines" Gold: SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T2.uid = T1.Airline WHERE T2.Airline = "United Airlines" Type: JOIN [170] OTHER | DB: flight_2 | EX: β Q : Which flight numbers correspond to United Airlines flights Pred: SELECT T1.flightno FROM flights AS T1 JOIN airlines AS T2 ON T1.uid = T2.airline WHERE T2.name = 'United Airlines' Gold: SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T2.uid = T1.Airline WHERE T2.Airline = "United Airlines" Type: JOIN [171] EXTRA_JOIN | DB: flight_2 | EX: β Q : What are flight numbers of flights departing from Airport "APG" Pred: SELECT T1.FlightNo FROM flights AS T1 JOIN airports AS T2 ON T1.Airport = T2.AirportCode WHERE T2.AirportName = "APG" Gold: SELECT FlightNo FROM FLIGHTS WHERE SourceAirport = "APG" Type: SIMPLE [172] EXTRA_JOIN | DB: flight_2 | EX: β Q : What are flight numbers of flights arriving at Airport "APG" Pred: SELECT T1.flightno FROM flights AS T1 JOIN airports AS T2 ON T1.airport = T2.airportcode WHERE T2.airportname = "APG" Gold: SELECT FlightNo FROM FLIGHTS WHERE DestAirport = "APG" Type: SIMPLE [173] EXTRA_JOIN | DB: flight_2 | EX: β Q : Give the flight numbers of flights landing at APG Pred: SELECT T1.FlightNo FROM flights AS T1 JOIN airports AS T2 ON T1.Airport = T2.AirportCode WHERE T2.AirportName = "APG" Gold: SELECT FlightNo FROM FLIGHTS WHERE DestAirport = "APG" Type: SIMPLE [174] OTHER | DB: flight_2 | EX: β Q : Give the flight numbers of flights leaving from Aberdeen Pred: SELECT T1.FlightNo FROM flights AS T1 JOIN airports AS T2 ON T1.Airport = T2.AirportCode WHERE T2.AirportName = "Aberdeen" Gold: SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = "Aberdeen" Type: JOIN [175] OTHER | DB: flight_2 | EX: β Q : What are flight numbers of flights arriving at City "Aberdeen" Pred: SELECT T1.flightno FROM flights AS T1 JOIN airports AS T2 ON T1.airport = T2.airportcode WHERE T2.city = "Aberdeen" Gold: SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = "Aberdeen" Type: JOIN [176] OTHER | DB: flight_2 | EX: β Q : Give the flight numbers of flights arriving in Aberdeen Pred: SELECT T1.FlightNo FROM flights AS T1 JOIN airports AS T2 ON T1.Airport = T2.AirportCode WHERE T2.AirportName = "Aberdeen" Gold: SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = "Aberdeen" Type: JOIN [177] WRONG_TABLE | DB: flight_2 | EX: β Q : Find the number of flights landing in the city of Aberdeen or Abilene Pred: SELECT COUNT(*) FROM airports AS T1 JOIN flights AS T2 ON T1.airport = T2.sourceairport WHERE T1.city = "Aberdeen" OR T1.airportcode = "Abilene" Gold: SELECT COUNT(*) FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.city = "Aberdeen" OR T2.city = "Abilene" Type: JOIN, AGGREGATION [178] WRONG_TABLE | DB: flight_2 | EX: β Q : How many flights land in Aberdeen or Abilene Pred: SELECT COUNT(*) FROM airports AS T1 JOIN flights AS T2 ON T1.airport = T2.sourceairport WHERE T1.city = "Aberdeen" OR T1.airportcode = "Abilene" Gold: SELECT COUNT(*) FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.city = "Aberdeen" OR T2.city = "Abilene" Type: JOIN, AGGREGATION [179] WRONG_COLUMNS | DB: flight_2 | EX: β Q : Find the name of airports which do not have any flight in and out Pred: SELECT airportname FROM airports WHERE NOT airportcode IN (SELECT airportcode FROM flights) Gold: SELECT AirportName FROM Airports WHERE NOT AirportCode IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights) Type: NESTED [180] WRONG_COLUMNS | DB: flight_2 | EX: β Q : Which airports do not have departing or arriving flights Pred: SELECT airportname FROM airports WHERE NOT airportcode IN (SELECT airportcode FROM flights WHERE flightno > 0) OR flightno > 0 Gold: SELECT AirportName FROM Airports WHERE NOT AirportCode IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights) Type: NESTED [181] OTHER | DB: employee_hire_evaluation | EX: β Q : Sort employee names by their age in ascending order Pred: SELECT Name FROM employee ORDER BY Age ASC Gold: SELECT name FROM employee ORDER BY age Type: ORDER_BY [182] OTHER | DB: employee_hire_evaluation | EX: β Q : List the names of employees and sort in ascending order of age Pred: SELECT Name FROM employee ORDER BY Age ASC Gold: SELECT name FROM employee ORDER BY age Type: ORDER_BY [183] WRONG_COLUMNS | DB: employee_hire_evaluation | EX: β Q : What is the number of employees from each city Pred: SELECT City, COUNT(*) FROM employee GROUP BY City Gold: SELECT COUNT(*), city FROM employee GROUP BY city Type: GROUP_BY, AGGREGATION [184] OTHER | DB: employee_hire_evaluation | EX: β Q : Which cities do more than one employee under age 30 come from Pred: SELECT city FROM employee WHERE age 30 GROUP BY city HAVING COUNT(*) > 1 Gold: SELECT city FROM employee WHERE age < 30 GROUP BY city HAVING COUNT(*) > 1 Type: GROUP_BY, HAVING, AGGREGATION [185] OTHER | DB: employee_hire_evaluation | EX: β Q : Find the cities that have more than one employee under age 30 Pred: SELECT city FROM employee WHERE age 30 GROUP BY city HAVING COUNT(*) > 1 Gold: SELECT city FROM employee WHERE age < 30 GROUP BY city HAVING COUNT(*) > 1 Type: GROUP_BY, HAVING, AGGREGATION [186] WRONG_COLUMNS | DB: employee_hire_evaluation | EX: β Q : Find the number of shops in each location Pred: SELECT LOCATION, COUNT(*) FROM shop GROUP BY LOCATION Gold: SELECT COUNT(*), LOCATION FROM shop GROUP BY LOCATION Type: GROUP_BY, AGGREGATION [187] WRONG_COLUMNS | DB: employee_hire_evaluation | EX: β Q : How many shops are there in each location Pred: SELECT LOCATION, COUNT(*) FROM shop GROUP BY LOCATION Gold: SELECT COUNT(*), LOCATION FROM shop GROUP BY LOCATION Type: GROUP_BY, AGGREGATION [188] EXTRA_JOIN | DB: employee_hire_evaluation | EX: β Q : Find the manager name and district of the shop whose number of products is the largest Pred: SELECT T2.manager_name, T2.District FROM shop AS T1 JOIN employee AS T2 ON T1.Shop_ID = T2.Shop_ID ORDER BY T1.Number_Products DESC LIMIT 1 Gold: SELECT manager_name, district FROM shop ORDER BY number_products DESC LIMIT 1 Type: ORDER_BY, LIMIT [189] EXTRA_JOIN | DB: employee_hire_evaluation | EX: β Q : What are the manager name and district of the shop that sells the largest number of products Pred: SELECT T2.manager_name, T2.District FROM shop AS T1 JOIN employee AS T2 ON T1.Shop_ID = T2.Shop_ID ORDER BY T1.Number_Products DESC LIMIT 1 Gold: SELECT manager_name, district FROM shop ORDER BY number_products DESC LIMIT 1 Type: ORDER_BY, LIMIT [190] WRONG_TABLE | DB: employee_hire_evaluation | EX: β Q : Which employee received the most awards in evaluations? Give me the employee name Pred: SELECT T1.name FROM employee AS T1 JOIN evaluation AS T2 ON T1.employee_id = T2.employee_id WHERE T2.year_awarded = (SELECT MAX(year_awarded) FROM evaluation) Gold: SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID GROUP BY t2.Employee_ID ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [191] WRONG_TABLE | DB: employee_hire_evaluation | EX: β Q : Find the name of the employee who got the highest one time bonus Pred: SELECT T1.name FROM employee AS T1 JOIN evaluation AS T2 ON T1.employee_id = T2.employee_id WHERE T2.bonus = (SELECT MAX(bonus) FROM evaluation) Gold: SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID ORDER BY t2.bonus DESC LIMIT 1 Type: JOIN, ORDER_BY, LIMIT [192] WRONG_TABLE | DB: employee_hire_evaluation | EX: β Q : Which employee received the biggest bonus? Give me the employee name Pred: SELECT T1.name FROM employee AS T1 JOIN evaluation AS T2 ON T1.employee_id = T2.employee_id WHERE T2.bonus = (SELECT MAX(bonus) FROM evaluation) Gold: SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID ORDER BY t2.bonus DESC LIMIT 1 Type: JOIN, ORDER_BY, LIMIT [193] WRONG_TABLE | DB: employee_hire_evaluation | EX: β Q : Which shop has the most employees? Give me the shop name Pred: SELECT T2.Name FROM employee AS T1 JOIN hiring AS T2 ON T1.Employee_ID = T2.Employee_ID JOIN shop AS T3 ON T3.Shop_ID = T2.Shop_ID GROUP BY T3.Name ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t1.shop_id ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [194] WRONG_TABLE | DB: employee_hire_evaluation | EX: β Q : Which shops run with no employees? Find the shop names Pred: SELECT name FROM shop WHERE NOT shop_id IN (SELECT shop_id FROM employee) Gold: SELECT name FROM shop WHERE NOT shop_id IN (SELECT shop_id FROM hiring) Type: NESTED [195] WRONG_COLUMNS | DB: employee_hire_evaluation | EX: β Q : Find the number of employees hired in each shop; show the shop name as well Pred: SELECT T2.Name, COUNT(*) FROM hiring AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID Gold: SELECT COUNT(*), t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t2.name Type: JOIN, GROUP_BY, AGGREGATION [196] WRONG_TABLE | DB: employee_hire_evaluation | EX: β Q : For each shop, return the number of employees working there and the name of the shop Pred: SELECT T2.Name, COUNT(*) FROM employee AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID Gold: SELECT COUNT(*), t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t2.name Type: JOIN, GROUP_BY, AGGREGATION [197] OTHER | DB: employee_hire_evaluation | EX: β Q : Which district has both stores with less than 3000 products and stores with more than 10000 products Pred: SELECT District FROM shop WHERE Number_Products 3000 INTERSECT SELECT District FROM shop WHERE Number_Products > 10000 Gold: SELECT district FROM shop WHERE Number_products < 3000 INTERSECT SELECT district FROM shop WHERE Number_products > 10000 Type: SIMPLE [198] OTHER | DB: employee_hire_evaluation | EX: β Q : Find the districts in which there are both shops selling less than 3000 products and shops selling more than 10000 products Pred: SELECT District FROM shop WHERE Number_Products 3000 INTERSECT SELECT District FROM shop WHERE Number_Products > 10000 Gold: SELECT district FROM shop WHERE Number_products < 3000 INTERSECT SELECT district FROM shop WHERE Number_products > 10000 Type: SIMPLE [199] EXTRA_JOIN | DB: cre_Doc_Template_Mgt | EX: β Q : What is the document id, template id and description for document named "Robbin CV" Pred: SELECT T1.document_id, T2.template_id, T1.document_description FROM Documents AS T1 JOIN Templates AS T2 ON T1.template_id = T2.template_id WHERE T1.document_name = "Robbin CV" Gold: SELECT document_id, template_id, Document_Description FROM Documents WHERE document_name = "Robbin CV" Type: SIMPLE [200] EXTRA_JOIN | DB: cre_Doc_Template_Mgt | EX: β Q : Return the document id, template id, and description for the document with the name Robbin CV Pred: SELECT T1.document_id, T2.template_id, T1.document_description FROM Documents AS T1 JOIN Templates AS T2 ON T1.template_id = T2.template_id WHERE T1.document_name = "Robbin CV" Gold: SELECT document_id, template_id, Document_Description FROM Documents WHERE document_name = "Robbin CV" Type: SIMPLE [201] MISSING_JOIN | DB: cre_Doc_Template_Mgt | EX: β Q : Count the number of documents that use the PPT template type Pred: SELECT COUNT(*) FROM Documents WHERE template_type_code = "PPT" Gold: SELECT COUNT(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT' Type: JOIN, AGGREGATION [202] WRONG_COLUMNS | DB: cre_Doc_Template_Mgt | EX: β Q : What are all different template ids used for documents, and how many times were each of them used Pred: SELECT DISTINCT template_id, COUNT(*) FROM documents GROUP BY template_id Gold: SELECT template_id, COUNT(*) FROM Documents GROUP BY template_id Type: GROUP_BY, AGGREGATION [203] WRONG_TABLE | DB: cre_Doc_Template_Mgt | EX: β Q : What are the different template type codes Pred: SELECT DISTINCT template_type_code Gold: SELECT DISTINCT template_type_code FROM Templates Type: SIMPLE [204] EXTRA_JOIN | DB: cre_Doc_Template_Mgt | EX: β Q : What is the version number and template type code for the template with version number later than 5 Pred: SELECT T1.version_number, T2.template_type_code FROM Templates AS T1 JOIN Templates AS T2 ON T1.template_id = T2.template_id WHERE T1.version_number > 5 Gold: SELECT version_number, template_type_code FROM Templates WHERE version_number > 5 Type: SIMPLE [205] EXTRA_JOIN | DB: cre_Doc_Template_Mgt | EX: β Q : Return the version numbers and template type codes of templates with a version number greater than 5 Pred: SELECT T1.version_number, T2.template_type_code FROM Templates AS T1 JOIN Templates AS T2 ON T1.template_id = T2.template_id WHERE T1.version_number > 5 Gold: SELECT version_number, template_type_code FROM Templates WHERE version_number > 5 Type: SIMPLE [206] WRONG_TABLE | DB: cre_Doc_Template_Mgt | EX: β Q : Return the type code of the template type that the most templates belong to Pred: SELECT T1.template_type_code FROM Ref_template_types AS T1 JOIN templates AS T2 ON T1.template_type_code = T2.template_type_code GROUP BY T1.template_type_code ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY COUNT(*) DESC LIMIT 1 Type: GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [207] OTHER | DB: cre_Doc_Template_Mgt | EX: β Q : Show all template type codes with less than three templates Pred: SELECT template_type_code FROM Templates GROUP BY template_type_code HAVING COUNT(*) 3 Gold: SELECT template_type_code FROM Templates GROUP BY template_type_code HAVING COUNT(*) < 3 Type: GROUP_BY, HAVING, AGGREGATION [208] OTHER | DB: cre_Doc_Template_Mgt | EX: β Q : What are the codes of template types that have fewer than 3 templates Pred: SELECT template_type_code FROM Templates GROUP BY template_type_code HAVING COUNT(*) 3 Gold: SELECT template_type_code FROM Templates GROUP BY template_type_code HAVING COUNT(*) < 3 Type: GROUP_BY, HAVING, AGGREGATION [209] WRONG_TABLE | DB: cre_Doc_Template_Mgt | EX: β Q : What is the template type code of the template used by document with the name "Data base" Pred: SELECT T2.template_type_code FROM documents AS T1 JOIN templates AS T2 ON T1.template_id = T2.template_id WHERE T1.document_name = "Data base" Gold: SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T2.document_name = "Data base" Type: JOIN [210] WRONG_TABLE | DB: cre_Doc_Template_Mgt | EX: β Q : Return the template type code of the template that is used by a document named Data base Pred: SELECT T2.template_type_code FROM documents AS T1 JOIN templates AS T2 ON T1.template_id = T2.template_id WHERE T1.document_name = "Data base" Gold: SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T2.document_name = "Data base" Type: JOIN [211] WRONG_TABLE | DB: cre_Doc_Template_Mgt | EX: β Q : Show all document names using templates with template type code BK Pred: SELECT document_name FROM documents WHERE template_type_code = "BK" Gold: SELECT T2.document_name FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T1.template_type_code = "BK" Type: JOIN [212] WRONG_TABLE | DB: cre_Doc_Template_Mgt | EX: β Q : What are the names of documents that use templates with the code BK Pred: SELECT document_name FROM documents WHERE template_id IN (SELECT template_id FROM Templates WHERE template_type_code = "BK") Gold: SELECT T2.document_name FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T1.template_type_code = "BK" Type: JOIN [213] WRONG_COLUMNS | DB: cre_Doc_Template_Mgt | EX: β Q : Show all template type codes and the number of documents using each type Pred: SELECT T2.template_type_code, COUNT(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T2.template_type_code Gold: SELECT T1.template_type_code, COUNT(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code Type: JOIN, GROUP_BY, AGGREGATION [214] WRONG_TABLE | DB: cre_Doc_Template_Mgt | EX: β Q : What are the different template type codes, and how many documents use each type Pred: SELECT T1.template_type_code, COUNT(*) FROM Ref_template_types AS T1 JOIN templates AS T2 ON T1.template_type_code = T2.template_type_code GROUP BY T1.template_type_code Gold: SELECT T1.template_type_code, COUNT(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code Type: JOIN, GROUP_BY, AGGREGATION [215] WRONG_TABLE | DB: cre_Doc_Template_Mgt | EX: β Q : Which template type code is used by most number of documents Pred: SELECT template_type_code FROM Documents GROUP BY template_type_code ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [216] MISSING_JOIN | DB: cre_Doc_Template_Mgt | EX: β Q : Return the code of the template type that is most commonly used in documents Pred: SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [217] MISSING_JOIN | DB: cre_Doc_Template_Mgt | EX: β Q : Show all template type codes that are not used by any document Pred: SELECT template_type_code FROM Templates EXCEPT SELECT template_type_code FROM Templates Gold: SELECT template_type_code FROM Templates EXCEPT SELECT template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id Type: JOIN [218] MISSING_JOIN | DB: cre_Doc_Template_Mgt | EX: β Q : What are the codes of template types that are not used for any document Pred: SELECT template_type_code FROM Templates EXCEPT SELECT template_type_code FROM Templates Gold: SELECT template_type_code FROM Templates EXCEPT SELECT template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id Type: JOIN [219] EXTRA_JOIN | DB: cre_Doc_Template_Mgt | EX: β Q : What is the template type code for template type description "Book" Pred: SELECT T1.template_type_code FROM Ref_template_types AS T1 JOIN templates AS T2 ON T1.template_type_code = T2.template_type_code WHERE T2.template_type_description = "Book" Gold: SELECT template_type_code FROM Ref_template_types WHERE template_type_description = "Book" Type: SIMPLE [220] OTHER | DB: cre_Doc_Template_Mgt | EX: β Q : What are the distinct template type descriptions for the templates ever used by any document Pred: SELECT DISTINCT T1.template_type_description FROM Ref_template_types AS T1 JOIN templates AS T2 ON T1.template_type_code = T2.template_type_code Gold: SELECT DISTINCT T1.template_type_description FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code JOIN Documents AS T3 ON T2.Template_ID = T3.template_ID Type: JOIN [221] WRONG_TABLE | DB: cre_Doc_Template_Mgt | EX: β Q : Return the different descriptions for templates that have been used in a document Pred: SELECT DISTINCT template_type_description FROM templates Gold: SELECT DISTINCT T1.template_type_description FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code JOIN Documents AS T3 ON T2.Template_ID = T3.template_ID Type: JOIN [222] WRONG_TABLE | DB: cre_Doc_Template_Mgt | EX: β Q : What are the template ids with template type description "Presentation" Pred: SELECT template_id FROM Templates WHERE template_type_description = "Presentation" Gold: SELECT T2.template_id FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code WHERE T1.template_type_description = "Presentation" Type: JOIN [223] WRONG_TABLE | DB: cre_Doc_Template_Mgt | EX: β Q : Return the ids corresponding to templates with the description 'Presentation' Pred: SELECT template_id FROM Templates WHERE document_description = 'Presentation' Gold: SELECT T2.template_id FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code WHERE T1.template_type_description = "Presentation" Type: JOIN [224] OTHER | DB: cre_Doc_Template_Mgt | EX: β Q : Show paragraph details for paragraph with text 'Korea ' Pred: SELECT other_details FROM Paragraphs WHERE paragraph_text LIKE '%Korea%' Gold: SELECT other_details FROM paragraphs WHERE paragraph_text LIKE 'korea' Type: SIMPLE [225] OTHER | DB: cre_Doc_Template_Mgt | EX: β Q : What are the details for the paragraph that includes the text 'Korea ' Pred: SELECT other_details FROM Paragraphs WHERE paragraph_text LIKE '%Korea%' Gold: SELECT other_details FROM paragraphs WHERE paragraph_text LIKE 'korea' Type: SIMPLE [226] WRONG_TABLE | DB: cre_Doc_Template_Mgt | EX: β Q : What are the paragraph texts for the document with the name 'Customer reviews' Pred: SELECT t2.paragraph_text FROM documents AS t1 JOIN paragraphs AS t2 ON t1.document_id = t2.document_id WHERE t1.document_name = "Customer reviews" Gold: SELECT T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.document_name = "Customer reviews" Type: JOIN [227] OTHER | DB: cre_Doc_Template_Mgt | EX: β Q : Show all document ids and the number of paragraphs in each document. Order by document id Pred: SELECT document_id, COUNT(*) FROM paragraphs GROUP BY document_id ORDER BY COUNT(*) Gold: SELECT document_id, COUNT(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id Type: GROUP_BY, ORDER_BY, AGGREGATION [228] OTHER | DB: cre_Doc_Template_Mgt | EX: β Q : Return the different document ids along with the number of paragraphs corresponding to each, ordered by id Pred: SELECT document_id, COUNT(*) FROM paragraphs GROUP BY document_id ORDER BY COUNT(*) Gold: SELECT document_id, COUNT(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id Type: GROUP_BY, ORDER_BY, AGGREGATION [229] WRONG_TABLE | DB: cre_Doc_Template_Mgt | EX: β Q : Show all document ids, names and the number of paragraphs in each document Pred: SELECT T1.document_id, T1.document_name, COUNT(*) FROM Documents AS T1 JOIN Paragraphs AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id Gold: SELECT T1.document_id, T2.document_name, COUNT(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id Type: JOIN, GROUP_BY, AGGREGATION [230] WRONG_TABLE | DB: cre_Doc_Template_Mgt | EX: β Q : What are the ids and names of each document, as well as the number of paragraphs in each Pred: SELECT T1.document_id, T1.document_name, COUNT(*) FROM Documents AS T1 JOIN Paragraphs AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id Gold: SELECT T1.document_id, T2.document_name, COUNT(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id Type: JOIN, GROUP_BY, AGGREGATION [231] WRONG_TABLE | DB: cre_Doc_Template_Mgt | EX: β Q : What is the document id and name with greatest number of paragraphs Pred: SELECT T1.document_id, T1.document_name FROM Documents AS T1 JOIN Paragraphs AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T1.document_id, T2.document_name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [232] WRONG_TABLE | DB: cre_Doc_Template_Mgt | EX: β Q : Return the id and name of the document with the most paragraphs Pred: SELECT T1.document_id, T1.document_name FROM Documents AS T1 JOIN Paragraphs AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T1.document_id, T2.document_name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [233] WRONG_TABLE | DB: cre_Doc_Template_Mgt | EX: β Q : Return the id of the document with the fewest paragraphs Pred: SELECT t1.document_id FROM Documents AS t1 JOIN Paragraphs AS t2 ON t1.document_id = t2.document_id GROUP BY t1.document_id ORDER BY COUNT(*) LIMIT 1 Gold: SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY COUNT(*) ASC LIMIT 1 Type: GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [234] WRONG_TABLE | DB: cre_Doc_Template_Mgt | EX: β Q : Show the document id with paragraph text 'Brazil' and 'Ireland' Pred: SELECT T1.document_id FROM Documents AS T1 JOIN Paragraphs AS T2 ON T1.document_id = T2.document_id WHERE T2.paragraph_text = 'Brazil' INTERSECT SELECT T1.document_id FROM Documents AS T1 JOIN Paragraphs AS T2 ON T1.paragraph_id = T2.document_id WHERE T2.paragraph_text = 'Irland' Gold: SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Ireland' Type: SIMPLE [235] WRONG_TABLE | DB: cre_Doc_Template_Mgt | EX: β Q : What are the ids of documents that contain the paragraph text 'Brazil' and 'Ireland' Pred: SELECT T1.document_id FROM Documents AS T1 JOIN Paragraphs AS T2 ON T1.document_id = T2.document_id WHERE T2.paragraph_text = 'Brazil' INTERSECT SELECT T1.document_id FROM Documents AS T1 JOIN Paragraphs AS T2 ON T1.document_id = T2.document_id WHERE T2.paragraph_text LIKE '%Ireland%' Gold: SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Ireland' Type: SIMPLE [236] OTHER | DB: course_teach | EX: β Q : List the name of teachers whose hometown is not `` Little Lever Urban District '' Pred: SELECT Name FROM teacher WHERE Hometown > ' Little Lever Urban District ''' Gold: SELECT name FROM teacher WHERE hometown <> "little lever urban district" Type: SIMPLE [237] OTHER | DB: course_teach | EX: β Q : What are the names of the teachers whose hometown is not `` Little Lever Urban District '' Pred: SELECT Name FROM teacher WHERE Hometown > ' Little Lever Urban District ''' Gold: SELECT name FROM teacher WHERE hometown <> "little lever urban district" Type: SIMPLE [238] WRONG_COLUMNS | DB: course_teach | EX: β Q : Show names of teachers and the courses they are arranged to teach Pred: SELECT T3.Name, T1.Course FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID Gold: SELECT T3.Name, T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID Type: JOIN [239] WRONG_COLUMNS | DB: course_teach | EX: β Q : What is the name of each teacher and what course they teach Pred: SELECT T2.Name, T1.Course FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID Gold: SELECT T3.Name, T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID Type: JOIN [240] WRONG_COLUMNS | DB: course_teach | EX: β Q : Show names of teachers and the courses they are arranged to teach in ascending alphabetical order of the teacher's name Pred: SELECT T3.Name, T1.Course FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID ORDER BY T2.Name ASC Gold: SELECT T3.Name, T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID ORDER BY T3.Name Type: JOIN, ORDER_BY [241] WRONG_COLUMNS | DB: course_teach | EX: β Q : What are the names of the teachers and the courses they teach in ascending alphabetical order by the name of the teacher Pred: SELECT T3.Name, T1.Course FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID ORDER BY T2.Name ASC Gold: SELECT T3.Name, T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID ORDER BY T3.Name Type: JOIN, ORDER_BY [242] OTHER | DB: course_teach | EX: β Q : Show the name of the teacher for the math course Pred: SELECT T3.Name FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID JOIN course AS T3 ON T1.Course_ID = T3.Course_ID WHERE T3.course = 'Math' Gold: SELECT T3.Name FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID WHERE T2.Course = "Math" Type: JOIN [243] OTHER | DB: course_teach | EX: β Q : What are the names of the people who teach math courses Pred: SELECT T3.Name FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID JOIN course AS T3 ON T1.Course_ID = T3.Course_ID WHERE T3.Computer = "Math" Gold: SELECT T3.Name FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID WHERE T2.Course = "Math" Type: JOIN [244] OTHER | DB: museum_visit | EX: β Q : How many visitors below age 30 are there Pred: SELECT COUNT(*) FROM visitor WHERE age 30 Gold: SELECT COUNT(*) FROM visitor WHERE age < 30 Type: AGGREGATION [245] OTHER | DB: museum_visit | EX: β Q : Find the names of the visitors whose membership level is higher than 4, and order the results by the level from high to low Pred: SELECT name FROM visitor WHERE level_of_membership > 4 ORDER BY level_of_membership Gold: SELECT name FROM visitor WHERE Level_of_membership > 4 ORDER BY Level_of_membership DESC Type: ORDER_BY [246] OTHER | DB: museum_visit | EX: β Q : What is the average age of the visitors whose membership level is not higher than 4 Pred: SELECT AVG(age) FROM visitor WHERE level_of_membership 4 Gold: SELECT AVG(age) FROM visitor WHERE Level_of_membership <= 4 Type: AGGREGATION [247] EXTRA_JOIN | DB: museum_visit | EX: β Q : Find the id and name of the museum that has the most staff members Pred: SELECT T1.museum_id, T1.name FROM museum AS T1 JOIN visitor AS T2 ON T1.museum_id = T2.museum_id GROUP BY T1.museum_id ORDER BY SUM(T2.num_of_staff) DESC LIMIT 1 Gold: SELECT museum_id, name FROM museum ORDER BY num_of_staff DESC LIMIT 1 Type: ORDER_BY, LIMIT [248] OTHER | DB: museum_visit | EX: β Q : Find the average number of staff working for the museums that were open before 2009 Pred: SELECT AVG(Num_of_staff) FROM museum WHERE open_year 2009 Gold: SELECT AVG(num_of_staff) FROM museum WHERE open_year < 2009 Type: AGGREGATION [249] WRONG_COLUMNS | DB: museum_visit | EX: β Q : What are the opening year and staff number of the museum named Plaza Museum Pred: SELECT open_year, num_of_staff FROM museum WHERE name = 'Place Museum' Gold: SELECT Num_of_Staff, Open_Year FROM museum WHERE name = 'Plaza Museum' Type: SIMPLE [250] OTHER | DB: museum_visit | EX: β Q : find the id, name and age for visitors who visited some museums more than once Pred: SELECT T1.id, T1.name, T1.age FROM visitor AS T1 JOIN visit AS T2 ON T1.id = T2.visitor_id GROUP BY T2.visitor_id HAVING COUNT(*) > 1 Gold: SELECT t1.id, t1.name, t1.age FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id GROUP BY t1.id HAVING COUNT(*) > 1 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [251] MISSING_GROUP_BY | DB: museum_visit | EX: β Q : What are the id, name and membership level of visitors who have spent the largest amount of money in total in all museum tickets Pred: SELECT T1.id, T1.name, T1.level_of_membership FROM visitor AS T1 JOIN visit AS T2 ON T1.id = T2.visitor_id ORDER BY SUM(T2.num_of_ticket) DESC LIMIT 1 Gold: SELECT t2.visitor_id, t1.name, t1.Level_of_membership FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id GROUP BY t2.visitor_id ORDER BY SUM(t2.Total_spent) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [252] WRONG_TABLE | DB: museum_visit | EX: β Q : What are the id and name of the museum visited most times Pred: SELECT T1.id, T1.name FROM visitor AS T1 JOIN visit AS T2 ON T1.id = T2.visitor_id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT t2.Museum_ID, t1.name FROM museum AS t1 JOIN visit AS t2 ON t1.Museum_ID = t2.Museum_ID GROUP BY t2.Museum_ID ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [253] WRONG_COLUMNS | DB: museum_visit | EX: β Q : What is the name of the museum that had no visitor yet Pred: SELECT name FROM museum WHERE NOT museum_id IN (SELECT visitor_id FROM visit) Gold: SELECT name FROM museum WHERE NOT Museum_ID IN (SELECT museum_id FROM visit) Type: NESTED [254] OTHER | DB: museum_visit | EX: β Q : Find the name and age of the visitor who bought the most tickets at once Pred: SELECT T1.name, T1.age FROM visitor AS T1 JOIN visit AS T2 ON T1.id = T2.visitor_id GROUP BY T2.visitor_id ORDER BY SUM(T2.num_of_ticket) DESC LIMIT 1 Gold: SELECT t1.name, t1.age FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id ORDER BY t2.num_of_ticket DESC LIMIT 1 Type: JOIN, ORDER_BY, LIMIT [255] WRONG_TABLE | DB: museum_visit | EX: β Q : What are the average and maximum number of tickets bought in all visits Pred: SELECT AVG(Num_of_ticket), MAX(Num_of_ticket) FROM visitor Gold: SELECT AVG(num_of_ticket), MAX(num_of_ticket) FROM visit Type: AGGREGATION [256] WRONG_COLUMNS | DB: museum_visit | EX: β Q : What is the total ticket expense of the visitors whose membership level is 1 Pred: SELECT SUM(T1.num_of_ticket) FROM visitor AS T1 JOIN visit AS T2 ON T1.id = T2.visitor_id WHERE T1.level_of_membership = 1 Gold: SELECT SUM(t2.Total_spent) FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id WHERE t1.Level_of_membership = 1 Type: JOIN, AGGREGATION [257] OTHER | DB: museum_visit | EX: β Q : What is the name of the visitor who visited both a museum opened before 2009 and a museum opened after 2011 Pred: SELECT T1.name FROM visitor AS T1 JOIN visit AS T2 ON T1.id = T2.visitor_id WHERE T2.open_year 2009 INTERSECT SELECT T1.name FROM visitor AS T1 JOIN visit AS T2 ON T1.id = T2.visitor_id WHERE T2.open_year > 2011 Gold: SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id JOIN museum AS t3 ON t3.Museum_ID = t2.Museum_ID WHERE t3.open_year < 2009 INTERSECT SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id JOIN museum AS t3 ON t3.Museum_ID = t2.Museum_ID WHERE t3.open_year > 2011 Type: JOIN [258] WRONG_TABLE | DB: museum_visit | EX: β Q : Find the number of visitors who did not visit any museum opened after 2010 Pred: SELECT COUNT(*) FROM visitor WHERE NOT visitor_id IN (SELECT visitor_id FROM visit WHERE open_year > 2010) Gold: SELECT COUNT(*) FROM visitor WHERE NOT id IN (SELECT t2.visitor_id FROM museum AS t1 JOIN visit AS t2 ON t1.Museum_ID = t2.Museum_ID WHERE t1.open_year > 2010) Type: JOIN, NESTED, AGGREGATION [259] OTHER | DB: museum_visit | EX: β Q : How many museums were opened after 2013 or before 2008 Pred: SELECT COUNT(*) FROM museum WHERE open_year > 2013 OR open_year 2008 Gold: SELECT COUNT(*) FROM museum WHERE open_year > 2013 OR open_year < 2008 Type: AGGREGATION [260] EXTRA_JOIN | DB: wta_1 | EX: β Q : Find the average age of losers and winners of all matches Pred: SELECT AVG(T1.loser_age), AVG(T2.winner_age) FROM matches AS T1 JOIN players AS T2 ON T1.winner_id = T2.player_id Gold: SELECT AVG(loser_age), AVG(winner_age) FROM matches Type: AGGREGATION [261] EXTRA_JOIN | DB: wta_1 | EX: β Q : What are the average ages of losers and winners across matches Pred: SELECT AVG(T1.loser_age), AVG(T2.winner_age) FROM matches AS T1 JOIN players AS T2 ON T1.winner_id = T2.player_id Gold: SELECT AVG(loser_age), AVG(winner_age) FROM matches Type: AGGREGATION [262] WRONG_COLUMNS | DB: wta_1 | EX: β Q : Find the highest rank of losers in all matches Pred: SELECT MAX(Loser_rank) FROM matches Gold: SELECT MIN(loser_rank) FROM matches Type: AGGREGATION [263] EXTRA_JOIN | DB: wta_1 | EX: β Q : What is the best rank of losers across all matches Pred: SELECT DISTINCT T1.loser_rank, MAX(T2.loser_rank) FROM matches AS T1 JOIN rankings AS T2 ON T1.loser_id = T2.loser_id GROUP BY T1.loser_rank Gold: SELECT MIN(loser_rank) FROM matches Type: AGGREGATION [264] WRONG_TABLE | DB: wta_1 | EX: β Q : Find the number of distinct name of losers Pred: SELECT COUNT(DISTINCT loser_name) FROM players Gold: SELECT COUNT(DISTINCT loser_name) FROM matches Type: AGGREGATION [265] WRONG_TABLE | DB: wta_1 | EX: β Q : How many different loser names are there Pred: SELECT COUNT(DISTINCT loser_name) FROM players Gold: SELECT COUNT(DISTINCT loser_name) FROM matches Type: AGGREGATION [266] EXTRA_JOIN | DB: wta_1 | EX: β Q : Find the name of tourney that has more than 10 matches Pred: SELECT T2.Tournament_Name FROM matches AS T1 JOIN tournament AS T2 ON T1.Tournament_ID = T2.Tournament_ID GROUP BY T2.Tournament_Name HAVING COUNT(*) > 10 Gold: SELECT tourney_name FROM matches GROUP BY tourney_name HAVING COUNT(*) > 10 Type: GROUP_BY, HAVING, AGGREGATION [267] EXTRA_JOIN | DB: wta_1 | EX: β Q : What are the names of tournaments that have more than 10 matches Pred: SELECT T2.Tournament_Name FROM matches AS T1 JOIN tournaments AS T2 ON T1.Tournament_ID = T2.Tournament_ID GROUP BY T2.Tournament_Name HAVING COUNT(*) > 10 Gold: SELECT tourney_name FROM matches GROUP BY tourney_name HAVING COUNT(*) > 10 Type: GROUP_BY, HAVING, AGGREGATION [268] WRONG_TABLE | DB: wta_1 | EX: β Q : List the names of all winners who played in both 2013 and 2016 Pred: SELECT winner_name FROM players WHERE YEAR = 2013 INTERSECT SELECT winner_name FROM players WHERE YEAR = 2016 Gold: SELECT winner_name FROM matches WHERE YEAR = 2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR = 2016 Type: SIMPLE [269] WRONG_TABLE | DB: wta_1 | EX: β Q : What are the names of players who won in both 2013 and 2016 Pred: SELECT T2.winner_name FROM matches AS T1 JOIN players AS T2 ON T1.player_id = T2.winner_id WHERE T1.year = 2013 INTERSECT SELECT T2.winner_name FROM rankings AS T1 JOIN players AS T2 ON T1.player_id = T2.winner_id WHERE T1.year = 2016 Gold: SELECT winner_name FROM matches WHERE YEAR = 2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR = 2016 Type: SIMPLE [270] OTHER | DB: wta_1 | EX: β Q : What are the country code and first name of the players who won in both tourney WTA Championships and Australian Open Pred: SELECT T1.country_code, T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tournament_name = 'WTA Championships' INTERSECT SELECT T1.country_code, T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id WHERE T2.tournament_name = 'Australian Open' Gold: SELECT T1.country_code, T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'WTA Championships' INTERSECT SELECT T1.country_code, T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'Australian Open' Type: JOIN [271] WRONG_TABLE | DB: wta_1 | EX: β Q : What are the first names and country codes for players who won both the WTA Championships and the Australian Open Pred: SELECT T2.first_name, T2.country_code FROM rankings AS T1 JOIN players AS T2 ON T1.player_id = T2.player_id JOIN tournaments AS T3 ON T1.tournament_name = T3.tournament_name JOIN players AS T4 ON T3.player_id = T4.player_id WHERE T3.tournament_name = 'WTA Championships' INTERSECT SELECT T2.country_code = 'Australian Open' Gold: SELECT T1.country_code, T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'WTA Championships' INTERSECT SELECT T1.country_code, T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'Australian Open' Type: JOIN [272] OTHER | DB: wta_1 | EX: β Q : Find the first name and country code of the oldest player Pred: SELECT first_name, country_code FROM players ORDER BY birth_date DESC LIMIT 1 Gold: SELECT first_name, country_code FROM players ORDER BY birth_date LIMIT 1 Type: ORDER_BY, LIMIT [273] OTHER | DB: wta_1 | EX: β Q : What is the first name and country code of the oldest player Pred: SELECT first_name, country_code FROM players ORDER BY birth_date DESC LIMIT 1 Gold: SELECT first_name, country_code FROM players ORDER BY birth_date LIMIT 1 Type: ORDER_BY, LIMIT [274] OTHER | DB: wta_1 | EX: β Q : List the first and last name of all players who are left / L hand in the order of birth date Pred: SELECT first_name, last_name FROM players WHERE hand = 'left' ORDER BY birth_date Gold: SELECT first_name, last_name FROM players WHERE hand = 'L' ORDER BY birth_date Type: ORDER_BY [275] WRONG_COLUMNS | DB: wta_1 | EX: β Q : What are the full names of all left handed players, in order of birth date Pred: SELECT first_name, last_name, birth_date FROM players WHERE hand = 'left' ORDER BY birth_date Gold: SELECT first_name, last_name FROM players WHERE hand = 'L' ORDER BY birth_date Type: ORDER_BY [276] WRONG_COLUMNS | DB: wta_1 | EX: β Q : Find the first name and country code of the player who did the most number of tours Pred: SELECT T1.first_name, T1.country_code FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T1.country_code, T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id ORDER BY T2.tours DESC LIMIT 1 Type: JOIN, ORDER_BY, LIMIT [277] WRONG_COLUMNS | DB: wta_1 | EX: β Q : What is the first name and country code of the player with the most tours Pred: SELECT T1.first_name, T1.country_code FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY SUM(T2.tours) DESC LIMIT 1 Gold: SELECT T1.country_code, T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id ORDER BY T2.tours DESC LIMIT 1 Type: JOIN, ORDER_BY, LIMIT [278] WRONG_TABLE | DB: wta_1 | EX: β Q : Find the name and rank points of the winner who won the most times Pred: SELECT T1.winner_name, T1.winner_rank_points FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.winner_id GROUP BY T1.winner_rank_points ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT winner_name, winner_rank_points FROM matches GROUP BY winner_name ORDER BY COUNT(*) DESC LIMIT 1 Type: GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [279] WRONG_TABLE | DB: wta_1 | EX: β Q : What is the name of the winner who has won the most matches, and how many rank points does this player have Pred: SELECT T1.winner_name, T1.winner_rank_points FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id GROUP BY T1.player_id ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT winner_name, winner_rank_points FROM matches GROUP BY winner_name ORDER BY COUNT(*) DESC LIMIT 1 Type: GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [280] WRONG_TABLE | DB: wta_1 | EX: β Q : Find the name of the winner who has the highest rank points and participated in the Australian Open tourney Pred: SELECT T1.winner_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id JOIN tourneys AS T3 ON T2.tournament_name = T3.tournament_name WHERE T3.tournament_name = 'Australian Open' ORDER BY T1.winner_rank_points DESC LIMIT 1 Gold: SELECT winner_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1 Type: ORDER_BY, LIMIT [281] WRONG_TABLE | DB: wta_1 | EX: β Q : What is the name of the winner with the most rank points who participated in the Australian Open tournament Pred: SELECT T1.winner_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id JOIN tournaments AS T3 ON T2.tournament_name = T3.Tournament_name WHERE T3.Tournament_name = "Australian Open" GROUP BY T1.winner_rank_points ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT winner_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1 Type: ORDER_BY, LIMIT [282] EXTRA_JOIN | DB: wta_1 | EX: β Q : find the names of loser and winner who played in the match with greatest number of minutes Pred: SELECT T2.loser_name, T2.winner_name FROM matches AS T1 JOIN players AS T2 ON T1.player_id = T2.winner_id ORDER BY T1.minutes DESC LIMIT 1 Gold: SELECT winner_name, loser_name FROM matches ORDER BY minutes DESC LIMIT 1 Type: ORDER_BY, LIMIT [283] WRONG_TABLE | DB: wta_1 | EX: β Q : What are the names of the winner and loser who played in the longest match Pred: SELECT T1.winner_name, T1.loser_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id ORDER BY T2.match_number DESC LIMIT 1 Gold: SELECT winner_name, loser_name FROM matches ORDER BY minutes DESC LIMIT 1 Type: ORDER_BY, LIMIT [284] OTHER | DB: wta_1 | EX: β Q : Find the average ranking for each player and their first name Pred: SELECT AVG(ranking), T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id Gold: SELECT AVG(ranking), T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name Type: JOIN, GROUP_BY, AGGREGATION [285] WRONG_COLUMNS | DB: wta_1 | EX: β Q : What are the first names of all players, and their average rankings Pred: SELECT T1.first_name, AVG(T2.ranking) FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id Gold: SELECT AVG(ranking), T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name Type: JOIN, GROUP_BY, AGGREGATION [286] MISSING_JOIN | DB: wta_1 | EX: β Q : Find the total ranking points for each player and their first name Pred: SELECT SUM(ranking_points), first_name FROM players Gold: SELECT SUM(ranking_points), T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name Type: JOIN, GROUP_BY, AGGREGATION [287] WRONG_COLUMNS | DB: wta_1 | EX: β Q : What are the first names of all players, and their total ranking points Pred: SELECT T1.first_name, SUM(T2.ranking_points) FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id Gold: SELECT SUM(ranking_points), T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name Type: JOIN, GROUP_BY, AGGREGATION [288] WRONG_COLUMNS | DB: wta_1 | EX: β Q : find the number of players for each country Pred: SELECT country_code, COUNT(*) FROM players GROUP BY country_code Gold: SELECT COUNT(*), country_code FROM players GROUP BY country_code Type: GROUP_BY, AGGREGATION [289] WRONG_COLUMNS | DB: wta_1 | EX: β Q : How many players are from each country Pred: SELECT country_code, COUNT(*) FROM players GROUP BY country_code Gold: SELECT COUNT(*), country_code FROM players GROUP BY country_code Type: GROUP_BY, AGGREGATION [290] WRONG_COLUMNS | DB: wta_1 | EX: β Q : Find the total number of tours for each ranking date Pred: SELECT ranking_date, COUNT(*) FROM rankings GROUP BY ranking_date Gold: SELECT SUM(tours), ranking_date FROM rankings GROUP BY ranking_date Type: GROUP_BY, AGGREGATION [291] WRONG_COLUMNS | DB: wta_1 | EX: β Q : How many matches were played in each year Pred: SELECT YEAR, COUNT(*) FROM matches GROUP BY YEAR Gold: SELECT COUNT(*), YEAR FROM matches GROUP BY YEAR Type: GROUP_BY, AGGREGATION [292] WRONG_TABLE | DB: wta_1 | EX: β Q : Find the name and rank of the 3 youngest winners across all matches Pred: SELECT T1.winner_name, T1.winner_rank FROM players AS T1 JOIN matches AS T2 ON T1.winner_id = T2.winner_id ORDER BY T2.winner_age LIMIT 3 Gold: SELECT DISTINCT winner_name, winner_rank FROM matches ORDER BY winner_age LIMIT 3 Type: ORDER_BY, LIMIT [293] WRONG_TABLE | DB: wta_1 | EX: β Q : What are the names and ranks of the three youngest winners across all matches Pred: SELECT T1.winner_name, T1.winner_rank FROM players AS T1 JOIN matches AS T2 ON T1.winner_id = T2.winner_id ORDER BY T2.winner_age LIMIT 3 Gold: SELECT DISTINCT winner_name, winner_rank FROM matches ORDER BY winner_age LIMIT 3 Type: ORDER_BY, LIMIT [294] WRONG_TABLE | DB: wta_1 | EX: β Q : How many different winners both participated in the WTA Championships and were left handed Pred: SELECT COUNT(DISTINCT T1.Winner_Name) FROM players AS T1 JOIN matches AS T2 ON T1.Winner_ID = T2.Winner_ID WHERE T1.hand = "left" AND T2.Tournament_name = "WTA Championships" Gold: SELECT COUNT(DISTINCT winner_name) FROM matches WHERE tourney_name = 'WTA Championships' AND winner_hand = 'L' Type: AGGREGATION [295] WRONG_TABLE | DB: wta_1 | EX: β Q : Find the number of left handed winners who participated in the WTA Championships Pred: SELECT COUNT(*) FROM players WHERE winner_hand = "left" AND JOIN matches AS T1 JOIN players AS T2 ON T1.player_id = T2.player_id WHERE T1.tournament_name = "WTA Championships" Gold: SELECT COUNT(DISTINCT winner_name) FROM matches WHERE tourney_name = 'WTA Championships' AND winner_hand = 'L' Type: AGGREGATION [296] WRONG_COLUMNS | DB: wta_1 | EX: β Q : Find the first name, country code and birth date of the winner who has the highest rank points in all matches Pred: SELECT T1.winner_name, T1.country_code, T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.winner_id = T2.winner_id ORDER BY T2.winner_rank_points DESC LIMIT 1 Gold: SELECT T1.first_name, T1.country_code, T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id ORDER BY T2.winner_rank_points DESC LIMIT 1 Type: JOIN, ORDER_BY, LIMIT [297] OTHER | DB: wta_1 | EX: β Q : What is the first name, country code, and birth date of the player with the most winner rank points across all matches Pred: SELECT T1.first_name, T1.country_code, T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id GROUP BY T1.player_id ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T1.first_name, T1.country_code, T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id ORDER BY T2.winner_rank_points DESC LIMIT 1 Type: JOIN, ORDER_BY, LIMIT [298] WRONG_COLUMNS | DB: wta_1 | EX: β Q : Find the number of players for each hand type Pred: SELECT hand, COUNT(*) FROM players GROUP BY hand Gold: SELECT COUNT(*), hand FROM players GROUP BY hand Type: GROUP_BY, AGGREGATION [299] WRONG_COLUMNS | DB: wta_1 | EX: β Q : How many players are there for each hand type Pred: SELECT DISTINCT hand, COUNT(*) FROM players GROUP BY hand Gold: SELECT COUNT(*), hand FROM players GROUP BY hand Type: GROUP_BY, AGGREGATION [300] WRONG_COLUMNS | DB: battle_death | EX: β Q : List the name, date and result of each battle Pred: SELECT name, date, result FROM battle Gold: SELECT name, date FROM battle Type: SIMPLE [301] WRONG_COLUMNS | DB: battle_death | EX: β Q : What is maximum and minimum death toll caused each time Pred: SELECT MAX(dead), MIN(dead) FROM death Gold: SELECT MAX(killed), MIN(killed) FROM death Type: AGGREGATION [302] OTHER | DB: battle_death | EX: β Q : What is the average number of injuries caused each time Pred: SELECT AVG(Injured) FROM death GROUP BY Injured Gold: SELECT AVG(injured) FROM death Type: AGGREGATION [303] OTHER | DB: battle_death | EX: β Q : What are the name and results of the battles when the bulgarian commander is not 'Boril' Pred: SELECT name, result FROM battle WHERE bulgarian_commander > 'Boril' Gold: SELECT name, RESULT FROM battle WHERE bulgarian_commander <> 'Boril' Type: SIMPLE [304] OTHER | DB: battle_death | EX: β Q : What are the different ids and names of the battles that lost any 'Brig' type shipes Pred: SELECT DISTINCT T1.id, T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.lost_in_battle = T2.id WHERE T2.ship_type = 'Brig' Gold: SELECT DISTINCT T1.id, T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.ship_type = 'Brig' Type: JOIN [305] OTHER | DB: battle_death | EX: β Q : What are the ids and names of the battles that led to more than 10 people killed in total Pred: SELECT T1.id, T1.name FROM battle AS T1 JOIN death AS T2 ON T1.id = T2.caused_by_ship_id GROUP BY T1.id HAVING COUNT(*) > 10 Gold: SELECT T1.id, T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle JOIN death AS T3 ON T2.id = T3.caused_by_ship_id GROUP BY T1.id HAVING SUM(T3.killed) > 10 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [306] WRONG_TABLE | DB: battle_death | EX: β Q : What is the ship id and name that caused most total injuries Pred: SELECT T1.id, T1.name FROM ship AS T1 JOIN death AS T2 ON T1.id = T2.caused_by_ship_id GROUP BY T1.id ORDER BY SUM(T2.injured) DESC LIMIT 1 Gold: SELECT T2.id, T2.name FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id = T2.id GROUP BY T2.id ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [307] EXTRA_JOIN | DB: battle_death | EX: β Q : What are the distinct battle names which are between bulgarian commander 'Kaloyan' and latin commander 'Baldwin I' Pred: SELECT DISTINCT T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.bulgarian_commander = 'Kaloyan' INTERSECT SELECT DISTINCT T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.latin_commander = 'Baldwin I' Gold: SELECT name FROM battle WHERE bulgarian_commander = 'Kaloyan' AND latin_commander = 'Baldwin I' Type: SIMPLE [308] OTHER | DB: battle_death | EX: β Q : List the name and date the battle that has lost the ship named 'Lettice' and the ship named 'HMS Atalanta' Pred: SELECT T1.name, T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.lost_in_battle = T2.id JOIN battle AS T3 ON T2.battle = T3.id WHERE T2.name = 'Lettice' INTERSECT SELECT T1.name, T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'HMS Atalanta' Gold: SELECT T1.name, T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'Lettice' INTERSECT SELECT T1.name, T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'HMS Atalanta' Type: JOIN [309] WRONG_TABLE | DB: battle_death | EX: β Q : Show names, results and bulgarian commanders of the battles with no ships lost in the 'English Channel' Pred: SELECT name, result, bulgarian_commander FROM battle WHERE NOT id IN (SELECT lost_in_battle FROM ship WHERE location = 'English Channel') Gold: SELECT name, RESULT, bulgarian_commander FROM battle EXCEPT SELECT T1.name, T1.result, T1.bulgarian_commander FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.location = 'English Channel' Type: JOIN [310] WRONG_COLUMNS | DB: student_transcripts_tracking | EX: β Q : what are all the addresses including line 1 and line 2 Pred: SELECT address FROM addresses WHERE line_1 LIKE '%2' AND line_2 LIKE '%2' Gold: SELECT line_1, line_2 FROM addresses Type: SIMPLE [311] EXTRA_JOIN | DB: student_transcripts_tracking | EX: β Q : What is the first and second line for all addresses Pred: SELECT T1.line_1, T1.line_2 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.address_id Gold: SELECT line_1, line_2 FROM addresses Type: SIMPLE [312] WRONG_COLUMNS | DB: student_transcripts_tracking | EX: β Q : How many departments offer any degree Pred: SELECT COUNT(*) FROM degree_programs Gold: SELECT COUNT(DISTINCT department_id) FROM Degree_Programs Type: AGGREGATION [313] WRONG_COLUMNS | DB: student_transcripts_tracking | EX: β Q : How many different departments offer degrees Pred: SELECT COUNT(DISTINCT department_name) FROM degree_programs Gold: SELECT COUNT(DISTINCT department_id) FROM Degree_Programs Type: AGGREGATION [314] WRONG_COLUMNS | DB: student_transcripts_tracking | EX: β Q : How many different degree names are offered Pred: SELECT COUNT(DISTINCT degree_program_name) FROM degree_programs Gold: SELECT COUNT(DISTINCT degree_summary_name) FROM Degree_Programs Type: AGGREGATION [315] WRONG_COLUMNS | DB: student_transcripts_tracking | EX: β Q : How many different degrees are offered Pred: SELECT COUNT(DISTINCT degree_program_id) FROM degree_programs Gold: SELECT COUNT(DISTINCT degree_summary_name) FROM Degree_Programs Type: AGGREGATION [316] WRONG_TABLE | DB: student_transcripts_tracking | EX: β Q : How many degrees does the engineering department offer Pred: SELECT COUNT(*) FROM degree_programs AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T2.department_name = "engineering" Gold: SELECT COUNT(*) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id = T2.department_id WHERE T1.department_name = 'engineer' Type: JOIN, AGGREGATION [317] WRONG_TABLE | DB: student_transcripts_tracking | EX: β Q : How many degrees does the engineering department have Pred: SELECT COUNT(*) FROM degree_programs AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T2.department_name = "engineering" Gold: SELECT COUNT(*) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id = T2.department_id WHERE T1.department_name = 'engineer' Type: JOIN, AGGREGATION [318] OTHER | DB: student_transcripts_tracking | EX: β Q : What are the names and id of courses having at most 2 sections Pred: SELECT T1.course_name, T1.course_id FROM Courses AS T1 JOIN Sections AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_id HAVING COUNT(*) = 2 Gold: SELECT T1.course_name, T1.course_id FROM Courses AS T1 JOIN Sections AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_id HAVING COUNT(*) <= 2 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [319] OTHER | DB: student_transcripts_tracking | EX: β Q : What are the names and ids of every course with less than 2 sections Pred: SELECT T1.course_name, T1.course_id FROM Courses AS T1 JOIN Sections AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_id HAVING COUNT(*) 2 Gold: SELECT T1.course_name, T1.course_id FROM Courses AS T1 JOIN Sections AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_id HAVING COUNT(*) <= 2 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [320] OTHER | DB: student_transcripts_tracking | EX: β Q : What are the names of the sections in reverse alphabetical order Pred: SELECT section_name FROM SECTIONS ORDER BY section_name ASC Gold: SELECT section_name FROM Sections ORDER BY section_name DESC Type: ORDER_BY [321] WRONG_TABLE | DB: student_transcripts_tracking | EX: β Q : What is the semester which most student registered in? Show both the name and the id Pred: SELECT T1.semester_name, T2.semester_id FROM Student_Enrolment AS T1 JOIN Semesters AS T2 ON T1.semester_id = T2.semester_id GROUP BY T2.semester_id ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T1.semester_name, T1.semester_id FROM Semesters AS T1 JOIN Student_Enrolment AS T2 ON T1.semester_id = T2.semester_id GROUP BY T1.semester_id ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [322] WRONG_TABLE | DB: student_transcripts_tracking | EX: β Q : Who are enrolled in 2 degree programs in one semester? List the first name, middle name and last name and the id Pred: SELECT T1.first_name, T1.middle_name, T1.last_name, T1.student_id FROM Student_Enrolment AS T1 JOIN Semesters AS T2 ON T1.semester_id = T2.semester_id GROUP BY T1.student_enrolment_id HAVING COUNT(*) = 2 Gold: SELECT T1.first_name, T1.middle_name, T1.last_name, T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) = 2 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [323] WRONG_TABLE | DB: student_transcripts_tracking | EX: β Q : What are the first, middle, and last names, along with the ids, of all students who enrolled in 2 degree programs in one semester Pred: SELECT T1.first_name, T1.middle_name, T1.last_name, T1.student_id FROM Student_Enrolment AS T1 JOIN Semesters AS T2 ON T1.student_id = T2.semester_id GROUP BY T1.student_id HAVING COUNT(*) = 2 Gold: SELECT T1.first_name, T1.middle_name, T1.last_name, T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) = 2 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [324] WRONG_TABLE | DB: student_transcripts_tracking | EX: β Q : Who is enrolled in a Bachelor degree program? List the first name, middle name, last name Pred: SELECT T1.first_name, T1.middle_name, T1.last_name FROM Student_Enrolment AS T1 JOIN Degree_Programs AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE T2.degree_summary_name = "Bachelor" Gold: SELECT DISTINCT T1.first_name, T1.middle_name, T1.last_name FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id JOIN Degree_Programs AS T3 ON T2.degree_program_id = T3.degree_program_id WHERE T3.degree_summary_name = 'Bachelor' Type: JOIN [325] WRONG_TABLE | DB: student_transcripts_tracking | EX: β Q : What are the first, middle, and last names for everybody enrolled in a Bachelors program Pred: SELECT T1.first_name, T1.middle_name, T1.last_name FROM Student_Enrolment AS T1 JOIN Degree_Programs AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE T2.degree_summary_name = "Bachelors" Gold: SELECT DISTINCT T1.first_name, T1.middle_name, T1.last_name FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id JOIN Degree_Programs AS T3 ON T2.degree_program_id = T3.degree_program_id WHERE T3.degree_summary_name = 'Bachelor' Type: JOIN [326] WRONG_COLUMNS | DB: student_transcripts_tracking | EX: β Q : Find the kind of program which most number of students are enrolled in Pred: SELECT T1.degree_program_id FROM degree_programs AS T1 JOIN student_enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_program_id ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_summary_name ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [327] WRONG_TABLE | DB: student_transcripts_tracking | EX: β Q : Find the program which most number of students are enrolled in. List both the id and the summary Pred: SELECT T1.degree_program_id, T2.degree_summary_name FROM Student_Enrolment AS T1 JOIN Courses AS T2 ON T1.student_id = T2.student_id GROUP BY T1.degree_program_id ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T1.degree_program_id, T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_program_id ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [328] WRONG_TABLE | DB: student_transcripts_tracking | EX: β Q : Which student has enrolled for the most times in any program? List the id, first name, middle name, last name, the number of enrollments and student id Pred: SELECT T1.student_id, T2.first_name, T2.middle_name, T2.last_name, COUNT(*) FROM Student_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T1.student_id, T1.first_name, T1.middle_name, T1.last_name, COUNT(*), T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [329] WRONG_TABLE | DB: student_transcripts_tracking | EX: β Q : What is the first, middle, and last name, along with the id and number of enrollments, for the student who enrolled the most in any program Pred: SELECT T1.first_name, T1.middle_name, T1.last_name, T1.student_enrolment_id, COUNT(*) FROM Student_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_enrolment_id ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T1.student_id, T1.first_name, T1.middle_name, T1.last_name, COUNT(*), T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [330] WRONG_TABLE | DB: student_transcripts_tracking | EX: β Q : What is the name of the semester with no students enrolled Pred: SELECT semester_name FROM Semesters EXCEPT SELECT T1.semester_name FROM Semesters AS T1 JOIN Student_Enrolment AS T2 ON T1.semester_id = T2.semester_id Gold: SELECT semester_name FROM Semesters WHERE NOT semester_id IN (SELECT semester_id FROM Student_Enrolment) Type: NESTED [331] WRONG_COLUMNS | DB: student_transcripts_tracking | EX: β Q : What are all the course names of the courses which ever have students enrolled in Pred: SELECT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id Gold: SELECT DISTINCT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id Type: JOIN [332] WRONG_COLUMNS | DB: student_transcripts_tracking | EX: β Q : What are the names of all courses that have some students enrolled Pred: SELECT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id Gold: SELECT DISTINCT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id Type: JOIN [333] WRONG_COLUMNS | DB: student_transcripts_tracking | EX: β Q : Find the last name of the students who currently live in the state of North Carolina but have not registered in any degree program Pred: SELECT last_name FROM Students WHERE current_address_id = 'A' AND state_province_county = "North Carolina" EXCEPT SELECT T1.last_name FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id Gold: SELECT T1.last_name FROM Students AS T1 JOIN Addresses AS T2 ON T1.current_address_id = T2.address_id WHERE T2.state_province_county = 'NorthCarolina' EXCEPT SELECT DISTINCT T3.last_name FROM Students AS T3 JOIN Student_Enrolment AS T4 ON T3.student_id = T4.student_id Type: JOIN [334] WRONG_COLUMNS | DB: student_transcripts_tracking | EX: β Q : What are the last name of the students who live in North Carolina but have not registered in any degree programs Pred: SELECT last_name FROM Students WHERE current_address_id = 'North Carolina' EXCEPT SELECT T1.last_name FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id JOIN Degrees AS T3 ON T2.degree_program_id = T3.degree_program_id WHERE T3.state_province_county = "North Carolina" Gold: SELECT T1.last_name FROM Students AS T1 JOIN Addresses AS T2 ON T1.current_address_id = T2.address_id WHERE T2.state_province_county = 'NorthCarolina' EXCEPT SELECT DISTINCT T3.last_name FROM Students AS T3 JOIN Student_Enrolment AS T4 ON T3.student_id = T4.student_id Type: JOIN [335] WRONG_TABLE | DB: student_transcripts_tracking | EX: β Q : Show the date and id of the transcript with at least 2 course results Pred: SELECT T1.transcript_date, T1.transcript_id FROM transcripts AS T1 JOIN courses AS T2 ON T1.course_id = T2.course_id GROUP BY T1.transcript_id HAVING COUNT(*) >= 2 Gold: SELECT T2.transcript_date, T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id HAVING COUNT(*) >= 2 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [336] WRONG_TABLE | DB: student_transcripts_tracking | EX: β Q : What is the date and id of the transcript with at least 2 courses listed Pred: SELECT T1.transcript_date, T1.transcript_id FROM transcripts AS T1 JOIN courses AS T2 ON T1.course_id = T2.course_id GROUP BY T1.transcript_id HAVING COUNT(*) >= 2 Gold: SELECT T2.transcript_date, T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id HAVING COUNT(*) >= 2 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [337] WRONG_TABLE | DB: student_transcripts_tracking | EX: β Q : What is the phone number of the man with the first name Timmothy and the last name Ward Pred: SELECT cell_mobile_number FROM Addresses WHERE first_name = "Timmothy" AND last_name = "Ward" Gold: SELECT cell_mobile_number FROM Students WHERE first_name = 'Timmothy' AND last_name = 'Ward' Type: SIMPLE [338] WRONG_TABLE | DB: student_transcripts_tracking | EX: β Q : Who is the first student to register? List the first name, middle name and last name Pred: SELECT first_name, middle_name, last_name FROM Student_Enrolment Gold: SELECT first_name, middle_name, last_name FROM Students ORDER BY date_first_registered ASC LIMIT 1 Type: ORDER_BY, LIMIT [339] EXTRA_JOIN | DB: student_transcripts_tracking | EX: β Q : What is the first, middle, and last name of the first student to register Pred: SELECT T1.first_name, T1.middle_name, T1.last_name FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id Gold: SELECT first_name, middle_name, last_name FROM Students ORDER BY date_first_registered ASC LIMIT 1 Type: ORDER_BY, LIMIT [340] WRONG_TABLE | DB: student_transcripts_tracking | EX: β Q : Who is the earliest graduate of the school? List the first name, middle name and last name Pred: SELECT first_name, middle_name, last_name FROM Student_Enrolment ORDER BY date_first_registered LIMIT 1 Gold: SELECT first_name, middle_name, last_name FROM Students ORDER BY date_left ASC LIMIT 1 Type: ORDER_BY, LIMIT [341] WRONG_TABLE | DB: student_transcripts_tracking | EX: β Q : What is the first, middle, and last name of the earliest school graduate Pred: SELECT first_name, middle_name, last_name FROM Student_Enrolment ORDER BY date_first_registered LIMIT 1 Gold: SELECT first_name, middle_name, last_name FROM Students ORDER BY date_left ASC LIMIT 1 Type: ORDER_BY, LIMIT [342] EXTRA_JOIN | DB: student_transcripts_tracking | EX: β Q : Whose permanent address is different from his or her current address? List his or her first name Pred: SELECT T1.first_name FROM Students AS T1 JOIN Addresses AS T2 ON T1.permanent_address_id = T2.address_id WHERE T2.current_address_id > T2.address_id Gold: SELECT first_name FROM Students WHERE current_address_id <> permanent_address_id Type: SIMPLE [343] EXTRA_JOIN | DB: student_transcripts_tracking | EX: β Q : What is the first name of the student whose permanent address is different from his or her current one Pred: SELECT T1.first_name FROM Students AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.permanent_address_id > T2.current_address_id Gold: SELECT first_name FROM Students WHERE current_address_id <> permanent_address_id Type: SIMPLE [344] WRONG_COLUMNS | DB: student_transcripts_tracking | EX: β Q : Which address holds the most number of students currently? List the address id and all lines Pred: SELECT T1.address_id, T1.line_3 FROM addresses AS T1 JOIN students AS T2 ON T1.address_id = T2.address_id GROUP BY T1.address_id ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T1.address_id, T1.line_1, T1.line_2 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.current_address_id GROUP BY T1.address_id ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [345] OTHER | DB: student_transcripts_tracking | EX: β Q : What is the id, line 1, and line 2 of the address with the most students Pred: SELECT T1.address_id, T1.line_1, T1.line_2 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.address_id GROUP BY T1.address_id ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T1.address_id, T1.line_1, T1.line_2 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.current_address_id GROUP BY T1.address_id ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [346] EXTRA_JOIN | DB: student_transcripts_tracking | EX: β Q : On average, when were the transcripts printed Pred: SELECT AVG(T1.transcript_date) FROM transcripts AS T1 JOIN transcripts AS T2 ON T1.transcript_id = T2.transcript_id Gold: SELECT AVG(transcript_date) FROM Transcripts Type: AGGREGATION [347] MISSING_ORDER_BY | DB: student_transcripts_tracking | EX: β Q : When is the first transcript released? List the date and details Pred: SELECT date_first_registered, date_first_details FROM transcripts Gold: SELECT transcript_date, other_details FROM Transcripts ORDER BY transcript_date ASC LIMIT 1 Type: ORDER_BY, LIMIT [348] MISSING_ORDER_BY | DB: student_transcripts_tracking | EX: β Q : What is the earliest date of a transcript release, and what details can you tell me Pred: SELECT MIN(transcript_date), other_details FROM transcripts Gold: SELECT transcript_date, other_details FROM Transcripts ORDER BY transcript_date ASC LIMIT 1 Type: ORDER_BY, LIMIT [349] MISSING_ORDER_BY | DB: student_transcripts_tracking | EX: β Q : What is the last transcript release date Pred: SELECT date_last FROM transcripts Gold: SELECT transcript_date FROM Transcripts ORDER BY transcript_date DESC LIMIT 1 Type: ORDER_BY, LIMIT [350] MISSING_ORDER_BY | DB: student_transcripts_tracking | EX: β Q : When was the last transcript released Pred: SELECT date_last FROM transcripts Gold: SELECT transcript_date FROM Transcripts ORDER BY transcript_date DESC LIMIT 1 Type: ORDER_BY, LIMIT [351] WRONG_TABLE | DB: student_transcripts_tracking | EX: β Q : How many times at most can a course enrollment result show in different transcripts? Also show the course enrollment id Pred: SELECT COUNT(*), T1.transcript_id FROM transcripts AS T1 JOIN student_enrolment AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id Gold: SELECT COUNT(*), student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY COUNT(*) DESC LIMIT 1 Type: GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [352] EXTRA_JOIN | DB: student_transcripts_tracking | EX: β Q : What is the maximum number of times that a course shows up in different transcripts and what is that course's enrollment id Pred: SELECT T1.course_id, MAX(T2.student_enrolment_id) FROM transcript_contents AS T1 JOIN courses AS T2 ON T1.course_id = T2.course_id GROUP BY T1.transcript_id Gold: SELECT COUNT(*), student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY COUNT(*) DESC LIMIT 1 Type: GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [353] WRONG_TABLE | DB: student_transcripts_tracking | EX: β Q : Show the date of the transcript which shows the least number of results, also list the id Pred: SELECT transcript_date, transcript_id FROM transcripts GROUP BY transcript_id ORDER BY COUNT(*) ASC LIMIT 1 Gold: SELECT T2.transcript_date, T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id ORDER BY COUNT(*) ASC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [354] WRONG_TABLE | DB: student_transcripts_tracking | EX: β Q : What is the date and id of the transcript with the least number of results Pred: SELECT transcript_date, transcript_id FROM transcripts GROUP BY transcript_id ORDER BY COUNT(*) ASC LIMIT 1 Gold: SELECT T2.transcript_date, T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id ORDER BY COUNT(*) ASC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [355] WRONG_TABLE | DB: student_transcripts_tracking | EX: β Q : Find the semester when both Master students and Bachelor students got enrolled in Pred: SELECT T1.semester_name FROM Semesters AS T1 JOIN Student_Enrolment AS T2 ON T1.semester_id = T2.semester_id WHERE T2.student_id = 'Master' INTERSECT SELECT T1.semester_name FROM Semesters AS T1 JOIN Student_Enrolment AS T2 ON T1.semester_id = T2.semester_id JOIN Student_Enrolment AS T3 ON Gold: SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Master' INTERSECT SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Bachelor' Type: JOIN [356] WRONG_TABLE | DB: student_transcripts_tracking | EX: β Q : What is the id of the semester that had both Masters and Bachelors students enrolled Pred: SELECT semester_id FROM Student_Enrolment WHERE student_id = (SELECT student_id FROM Student_Enrolment WHERE degree_program_id = "Masters") INTERSECT SELECT semester_id FROM Semesters WHERE degree_program_id = "Bachelors") Gold: SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Master' INTERSECT SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Bachelor' Type: JOIN [357] WRONG_COLUMNS | DB: student_transcripts_tracking | EX: β Q : How many different addresses do the students currently live Pred: SELECT COUNT(DISTINCT address_id) FROM Students Gold: SELECT COUNT(DISTINCT current_address_id) FROM Students Type: AGGREGATION [358] WRONG_TABLE | DB: student_transcripts_tracking | EX: β Q : What are the different addresses that have students living there Pred: SELECT DISTINCT T1.address FROM addresses AS T1 JOIN students AS T2 ON T1.address_id = T2.permanent_address_id Gold: SELECT COUNT(DISTINCT current_address_id) FROM Students Type: AGGREGATION [359] OTHER | DB: student_transcripts_tracking | EX: β Q : List all the student details in reversed lexicographical order Pred: SELECT other_student_details FROM STUDENTS ORDER BY other_student_details Gold: SELECT other_student_details FROM Students ORDER BY other_student_details DESC Type: ORDER_BY [360] WRONG_COLUMNS | DB: student_transcripts_tracking | EX: β Q : What other details can you tell me about students in reverse alphabetical order Pred: SELECT other_details FROM STUDENTS ORDER BY other_details Gold: SELECT other_student_details FROM Students ORDER BY other_student_details DESC Type: ORDER_BY [361] MISSING_JOIN | DB: student_transcripts_tracking | EX: β Q : Find the first name of the students who permanently live in the country Haiti or have the cell phone number 09700166582 Pred: SELECT first_name FROM Students WHERE permanent_address_id = 'Haiti' OR cell_mobile_number = '09700166582' Gold: SELECT t1.first_name FROM students AS t1 JOIN addresses AS t2 ON t1.permanent_address_id = t2.address_id WHERE t2.country = 'haiti' OR t1.cell_mobile_number = '09700166582' Type: JOIN [362] MISSING_JOIN | DB: student_transcripts_tracking | EX: β Q : What are the first names of the students who live in Haiti permanently or have the cell phone number 09700166582 Pred: SELECT first_name FROM Students WHERE permanent_address_id = 'Haiti' OR cell_mobile_number = '09700166582' Gold: SELECT t1.first_name FROM students AS t1 JOIN addresses AS t2 ON t1.permanent_address_id = t2.address_id WHERE t2.country = 'haiti' OR t1.cell_mobile_number = '09700166582' Type: JOIN [363] WRONG_COLUMNS | DB: tvshow | EX: β Q : List all cartoon directed by "Ben Jones" Pred: SELECT DISTINCT title FROM cartoon WHERE directed_by = "Ben Jones" Gold: SELECT Title FROM Cartoon WHERE Directed_by = "Ben Jones" Type: SIMPLE [364] WRONG_COLUMNS | DB: tvshow | EX: β Q : List the number of different series names and contents in the TV Channel table Pred: SELECT COUNT(DISTINCT series_name), content FROM tv_channel Gold: SELECT COUNT(DISTINCT series_name), COUNT(DISTINCT content) FROM TV_Channel Type: AGGREGATION [365] WRONG_COLUMNS | DB: tvshow | EX: β Q : How many different series and contents are listed in the TV Channel table Pred: SELECT COUNT(DISTINCT series_name), content FROM tv_channel Gold: SELECT COUNT(DISTINCT series_name), COUNT(DISTINCT content) FROM TV_Channel Type: AGGREGATION [366] WRONG_COLUMNS | DB: tvshow | EX: β Q : For each language, list the number of TV Channels that use it Pred: SELECT COUNT(*), language FROM tv_channel GROUP BY language Gold: SELECT LANGUAGE, COUNT(*) FROM TV_Channel GROUP BY LANGUAGE Type: GROUP_BY, AGGREGATION [367] WRONG_COLUMNS | DB: tvshow | EX: β Q : What is the TV Channel that shows the cartoon "The Rise of the Blue Beetle!"? List the TV Channel's series name Pred: SELECT DISTINCT T1.series_name FROM tv_channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.channel WHERE T2.title = "The Rise of the Blue Beetle!" Gold: SELECT T1.series_name FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Title = "The Rise of the Blue Beetle!" Type: JOIN [368] OTHER | DB: tvshow | EX: β Q : What is the series name of the TV Channel that shows the cartoon "The Rise of the Blue Beetle" Pred: SELECT t1.series_name FROM tv_channel AS t1 JOIN cartoon AS t2 ON t1.id = t2.channel WHERE t2.title = "The Rise of the Blue Beetle" Gold: SELECT T1.series_name FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Title = "The Rise of the Blue Beetle!" Type: JOIN [369] WRONG_TABLE | DB: tvshow | EX: β Q : List the title of all Cartoons showed on TV Channel with series name "Sky Radio" Pred: SELECT DISTINCT T1.title FROM cartoon AS T1 JOIN tv_channel AS T2 ON T1.id = T2.channel WHERE T2.series_name = "Sky Radio" Gold: SELECT T2.Title FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T1.series_name = "Sky Radio" Type: JOIN [370] WRONG_TABLE | DB: tvshow | EX: β Q : What is the title of all the cartools that are on the TV Channel with the series name "Sky Radio" Pred: SELECT t1.title FROM cartoon AS t1 JOIN tv_channel AS t2 ON t1.id = t2.channel WHERE t2.series_name = "Sky Radio" Gold: SELECT T2.Title FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T1.series_name = "Sky Radio" Type: JOIN [371] EXTRA_JOIN | DB: tvshow | EX: β Q : List top 3 highest Rating TV series. List the TV series's Episode and Rating Pred: SELECT T1.episode, T1.rating FROM tv_series AS T1 JOIN tv_series AS T2 ON T1.id = T2.series ORDER BY T2.rating DESC LIMIT 3 Gold: SELECT Episode, Rating FROM TV_series ORDER BY Rating DESC LIMIT 3 Type: ORDER_BY, LIMIT [372] EXTRA_JOIN | DB: tvshow | EX: β Q : What are 3 most highly rated episodes in the TV series table and what were those ratings Pred: SELECT t1.episode, t1.rating FROM tv_series AS t1 JOIN tv_series AS t2 ON t1.id = t2.series_id GROUP BY t1.id ORDER BY COUNT(*) DESC LIMIT 3 Gold: SELECT Episode, Rating FROM TV_series ORDER BY Rating DESC LIMIT 3 Type: ORDER_BY, LIMIT [373] WRONG_COLUMNS | DB: tvshow | EX: β Q : What is minimum and maximum share of TV series Pred: SELECT MIN(share), MAX(share) FROM tv_series Gold: SELECT MAX(SHARE), MIN(SHARE) FROM TV_series Type: AGGREGATION [374] EXTRA_JOIN | DB: tvshow | EX: β Q : What is the air date of TV series with Episode "A Love of a Lifetime" Pred: SELECT T1.air_date FROM tv_series AS T1 JOIN cartoon AS T2 ON T1.id = T2.channel WHERE T2.series_name = "A Love of a Lifetime" Gold: SELECT Air_Date FROM TV_series WHERE Episode = "A Love of a Lifetime" Type: SIMPLE [375] WRONG_TABLE | DB: tvshow | EX: β Q : When did the episode "A Love of a Lifetime" air Pred: SELECT air_date FROM cartoon WHERE title = "A Love of a Lifetime" Gold: SELECT Air_Date FROM TV_series WHERE Episode = "A Love of a Lifetime" Type: SIMPLE [376] WRONG_TABLE | DB: tvshow | EX: β Q : What is the weekly rank for the episode "A Love of a Lifetime" Pred: SELECT weekly_rank FROM cartoon WHERE title = "A Love of a Lifetime" Gold: SELECT Weekly_Rank FROM TV_series WHERE Episode = "A Love of a Lifetime" Type: SIMPLE [377] WRONG_COLUMNS | DB: tvshow | EX: β Q : What is the TV Channel of TV series with Episode "A Love of a Lifetime"? List the TV Channel's series name Pred: SELECT DISTINCT T1.series_name FROM tv_channel AS T1 JOIN tv_series AS T2 ON T1.id = T2.series WHERE T2.episode = "A Love of a Lifetime" Gold: SELECT T1.series_name FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T2.Episode = "A Love of a Lifetime" Type: JOIN [378] WRONG_TABLE | DB: tvshow | EX: β Q : What is the name of the series that has the episode "A Love of a Lifetime" Pred: SELECT tv_series_name FROM cartoon WHERE episode = "A Love of a Lifetime" Gold: SELECT T1.series_name FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T2.Episode = "A Love of a Lifetime" Type: JOIN [379] OTHER | DB: tvshow | EX: β Q : List the Episode of all TV series showed on TV Channel with series name "Sky Radio" Pred: SELECT T2.episode FROM tv_channel AS T1 JOIN tv_series AS T2 ON T1.id = T2.channel WHERE T2.series_name = "Sky Radio" Gold: SELECT T2.Episode FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T1.series_name = "Sky Radio" Type: JOIN [380] WRONG_TABLE | DB: tvshow | EX: β Q : What is the episode for the TV series named "Sky Radio" Pred: SELECT T1.episode FROM tv_series AS T1 JOIN cartoon AS T2 ON T1.id = T2.channel WHERE T2.series_name = "Sky Radio" Gold: SELECT T2.Episode FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T1.series_name = "Sky Radio" Type: JOIN [381] EXTRA_JOIN | DB: tvshow | EX: β Q : Find the package choice and series name of the TV channel that has high definition TV Pred: SELECT t2.package_option, t2.series_name FROM tv_channel AS t1 JOIN tv_series AS t2 ON t1.id = t2.series WHERE t1.hight_definition_tv = 'yes' Gold: SELECT package_option, series_name FROM TV_Channel WHERE hight_definition_TV = "yes" Type: SIMPLE [382] EXTRA_JOIN | DB: tvshow | EX: β Q : What are the package options and the name of the series for the TV Channel that supports high definition TV Pred: SELECT DISTINCT T1.package_option, T1.series_name FROM tv_channel AS T1 JOIN tv_series AS T2 ON T1.id = T2.series WHERE T1.hight_definition_tv = 'Hight' Gold: SELECT package_option, series_name FROM TV_Channel WHERE hight_definition_TV = "yes" Type: SIMPLE [383] WRONG_TABLE | DB: tvshow | EX: β Q : What are the countries that are not playing cartoons written by Todd Casey Pred: SELECT country FROM cartoon EXCEPT SELECT T1.country FROM cartoon AS T1 JOIN cartoon AS T2 ON T1.id = T2.channel WHERE T2.written_by = 'Todd Casey' Gold: SELECT country FROM TV_Channel EXCEPT SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey' Type: JOIN [384] OTHER | DB: tvshow | EX: β Q : Find the series name and country of the tv channel that is playing some cartoons directed by Ben Jones and Michael Chang Pred: SELECT T1.series_name, T1.country FROM tv_channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.channel WHERE T2.directed_by = 'Ben Jones' INTERSECT SELECT T1.series_name, T1.country FROM tv_channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.channel WHERE T2.directed_by = 'Michael Chang' Gold: SELECT T1.series_name, T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Michael Chang' INTERSECT SELECT T1.series_name, T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Ben Jones' Type: JOIN [385] OTHER | DB: tvshow | EX: β Q : What is the series name and country of all TV channels that are playing cartoons directed by Ben Jones and cartoons directed by Michael Chang Pred: SELECT T1.series_name, T1.country FROM tv_channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.channel WHERE T2.directed_by = 'Ben Jones' INTERSECT SELECT T1.series_name, T1.country FROM tv_channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.channel WHERE T2.directed_by = 'Michael Chang' Gold: SELECT T1.series_name, T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Michael Chang' INTERSECT SELECT T1.series_name, T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Ben Jones' Type: JOIN [386] OTHER | DB: tvshow | EX: β Q : find the pixel aspect ratio and nation of the tv channels that do not use English Pred: SELECT pixel_aspect_ratio_par, country FROM tv_channel WHERE language > "english" Gold: SELECT Pixel_aspect_ratio_PAR, country FROM tv_channel WHERE LANGUAGE <> 'English' Type: SIMPLE [387] OTHER | DB: tvshow | EX: β Q : What is the pixel aspect ratio and country of origin for all TV channels that do not use English Pred: SELECT pixel_aspect_ratio_par, country FROM tv_channel WHERE language > 'english' Gold: SELECT Pixel_aspect_ratio_PAR, country FROM tv_channel WHERE LANGUAGE <> 'English' Type: SIMPLE [388] EXTRA_JOIN | DB: tvshow | EX: β Q : find id of the tv channels that from the countries where have more than two tv channels Pred: SELECT t1.id FROM tv_channel AS t1 JOIN cartoon AS t2 ON t1.id = t2.channel GROUP BY t2.country HAVING COUNT(*) > 2 Gold: SELECT id FROM tv_channel GROUP BY country HAVING COUNT(*) > 2 Type: GROUP_BY, HAVING, AGGREGATION [389] OTHER | DB: tvshow | EX: β Q : What are the ids of all tv channels that have more than 2 TV channels Pred: SELECT id FROM tv_channel GROUP BY id HAVING COUNT(*) > 2 Gold: SELECT id FROM tv_channel GROUP BY country HAVING COUNT(*) > 2 Type: GROUP_BY, HAVING, AGGREGATION [390] WRONG_TABLE | DB: tvshow | EX: β Q : find the id of tv channels that do not play any cartoon directed by Ben Jones Pred: SELECT tv_channel FROM tv_channel EXCEPT SELECT t1.id FROM tv_channel AS t1 JOIN cartoon AS t2 ON t1.id = t2.channel WHERE t2.directed_by = "Ben Jones" Gold: SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones' Type: SIMPLE [391] WRONG_TABLE | DB: tvshow | EX: β Q : What are the ids of the TV channels that do not have any cartoons directed by Ben Jones Pred: SELECT tv_channel FROM tv_channel EXCEPT SELECT t1.id FROM tv_channel AS t1 JOIN cartoon AS t2 ON t1.id = t2.channel WHERE t2.directed_by = "Ben Jones" Gold: SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones' Type: SIMPLE [392] WRONG_TABLE | DB: tvshow | EX: β Q : find the package option of the tv channel that do not have any cartoon directed by Ben Jones Pred: SELECT package_option FROM tv_channel EXCEPT SELECT t1.channel FROM tv_channel AS t1 JOIN cartoon AS t2 ON t1.id = t2.channel WHERE t2.directed_by = "Ben Jones" Gold: SELECT package_option FROM TV_Channel WHERE NOT id IN (SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones') Type: NESTED [393] WRONG_TABLE | DB: tvshow | EX: β Q : What are the package options of all tv channels that are not playing any cartoons directed by Ben Jones Pred: SELECT package_option FROM tv_channel EXCEPT SELECT t1.channel FROM tv_channel AS t1 JOIN cartoon AS t2 ON t1.id = t2.channel WHERE t2.directed_by = "Ben Jones" Gold: SELECT package_option FROM TV_Channel WHERE NOT id IN (SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones') Type: NESTED [394] EXTRA_JOIN | DB: poker_player | EX: β Q : What are the final tables made and best finishes for all poker players Pred: SELECT T2.Final_Table_Made, T2.Best_finish FROM poker_player AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID Gold: SELECT Final_Table_Made, Best_Finish FROM poker_player Type: SIMPLE [395] EXTRA_JOIN | DB: poker_player | EX: β Q : What is the maximum number of final tables made among poker players with earnings less than 200000 Pred: SELECT MAX(T2.Final_Table_Made) FROM poker_player AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Earnings 200000 Gold: SELECT MAX(Final_Table_Made) FROM poker_player WHERE Earnings < 200000 Type: AGGREGATION [396] EXTRA_JOIN | DB: poker_player | EX: β Q : Return the maximum final tables made across all poker players who have earnings below 200000 Pred: SELECT MAX(T2.Final_Table_Made) FROM poker_player AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Earnings 200000 Gold: SELECT MAX(Final_Table_Made) FROM poker_player WHERE Earnings < 200000 Type: AGGREGATION [397] WRONG_TABLE | DB: poker_player | EX: β Q : What are the names of poker players Pred: SELECT T2.Name FROM poker_player AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID Gold: SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID Type: JOIN [398] WRONG_TABLE | DB: poker_player | EX: β Q : Return the names of all the poker players Pred: SELECT T2.Name FROM poker_player AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID Gold: SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID Type: JOIN [399] WRONG_TABLE | DB: poker_player | EX: β Q : What are the names of poker players whose earnings is higher than 300000 Pred: SELECT T2.Name FROM poker_player AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Earnings > 300000 Gold: SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Earnings > 300000 Type: JOIN [400] WRONG_TABLE | DB: poker_player | EX: β Q : Give the names of poker players who have earnings above 300000 Pred: SELECT T2.Name FROM poker_player AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Earnings > 300000 Gold: SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Earnings > 300000 Type: JOIN [401] WRONG_TABLE | DB: poker_player | EX: β Q : List the names of poker players ordered by the final tables made in ascending order Pred: SELECT T2.Name FROM poker_player AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Final_Table_Made ASC Gold: SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Final_Table_Made Type: JOIN, ORDER_BY [402] WRONG_TABLE | DB: poker_player | EX: β Q : What are the names of poker players, ordered ascending by the number of final tables they have made Pred: SELECT T2.Name FROM poker_player AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Final_Table_Made Gold: SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Final_Table_Made Type: JOIN, ORDER_BY [403] WRONG_TABLE | DB: poker_player | EX: β Q : What is the birth date of the poker player with the lowest earnings Pred: SELECT T2.Birth_Date FROM poker_player AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Earnings LIMIT 1 Gold: SELECT T1.Birth_Date FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings ASC LIMIT 1 Type: JOIN, ORDER_BY, LIMIT [404] WRONG_TABLE | DB: poker_player | EX: β Q : Return the birth date of the poker player with the lowest earnings Pred: SELECT T2.Birth_Date FROM poker_player AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Earnings LIMIT 1 Gold: SELECT T1.Birth_Date FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings ASC LIMIT 1 Type: JOIN, ORDER_BY, LIMIT [405] WRONG_TABLE | DB: poker_player | EX: β Q : What is the money rank of the tallest poker player Pred: SELECT Money_Rank FROM poker_player ORDER BY Height DESC LIMIT 1 Gold: SELECT T2.Money_Rank FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Height DESC LIMIT 1 Type: JOIN, ORDER_BY, LIMIT [406] WRONG_TABLE | DB: poker_player | EX: β Q : Return the money rank of the poker player with the greatest height Pred: SELECT Money_Rank FROM poker_player ORDER BY Height DESC LIMIT 1 Gold: SELECT T2.Money_Rank FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Height DESC LIMIT 1 Type: JOIN, ORDER_BY, LIMIT [407] WRONG_TABLE | DB: poker_player | EX: β Q : What is the average earnings of poker players with height higher than 200 Pred: SELECT AVG(Earnings) FROM poker_player WHERE Height > 200 Gold: SELECT AVG(T2.Earnings) FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Height > 200 Type: JOIN, AGGREGATION [408] WRONG_TABLE | DB: poker_player | EX: β Q : Give average earnings of poker players who are taller than 200 Pred: SELECT AVG(Earnings) FROM poker_player AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Height > 200 Gold: SELECT AVG(T2.Earnings) FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Height > 200 Type: JOIN, AGGREGATION [409] WRONG_TABLE | DB: poker_player | EX: β Q : What are the names of poker players in descending order of earnings Pred: SELECT T2.Name FROM poker_player AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Earnings DESC Gold: SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings DESC Type: JOIN, ORDER_BY [410] WRONG_TABLE | DB: poker_player | EX: β Q : Return the names of poker players sorted by their earnings descending Pred: SELECT T2.Name FROM poker_player AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Earnings DESC Gold: SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings DESC Type: JOIN, ORDER_BY [411] OTHER | DB: poker_player | EX: β Q : Show names of people whose nationality is not "Russia" Pred: SELECT Name FROM people WHERE Nationality > 'Russia' Gold: SELECT Name FROM people WHERE Nationality <> "Russia" Type: SIMPLE [412] OTHER | DB: poker_player | EX: β Q : What are the names of people who are not from Russia Pred: SELECT Name FROM people WHERE Nationality > 'Russia' Gold: SELECT Name FROM people WHERE Nationality <> "Russia" Type: SIMPLE [413] WRONG_TABLE | DB: voter_1 | EX: β Q : What are the maximum and minimum values of area codes Pred: SELECT MAX(area_code), MIN(area_code) FROM area_code Gold: SELECT MAX(area_code), MIN(area_code) FROM area_code_state Type: AGGREGATION [414] WRONG_COLUMNS | DB: voter_1 | EX: β Q : What is last date created of votes from the state 'CA' Pred: SELECT created FROM votes WHERE state = 'CA' Gold: SELECT MAX(created) FROM votes WHERE state = 'CA' Type: AGGREGATION [415] OTHER | DB: voter_1 | EX: β Q : What are the names of the contestants whose names are not 'Jessie Alloway' Pred: SELECT contestant_name FROM contestants EXCEPT SELECT contestant_name FROM contestants WHERE contestant_name = 'Jessie Alloway' Gold: SELECT contestant_name FROM contestants WHERE contestant_name <> 'Jessie Alloway' Type: SIMPLE [416] WRONG_TABLE | DB: voter_1 | EX: β Q : What are the contestant numbers and names of the contestants who had at least two votes Pred: SELECT T2.contestant_number, T2.contestant_name FROM votes AS T1 JOIN contestants AS T2 ON T1.contestant_number = T2.contestant_number GROUP BY T2.contestant_number HAVING COUNT(*) >= 2 Gold: SELECT T1.contestant_number, T1.contestant_name FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number GROUP BY T1.contestant_number HAVING COUNT(*) >= 2 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [417] WRONG_TABLE | DB: voter_1 | EX: β Q : Of all the contestants who got voted, what is the contestant number and name of the contestant who got least votes Pred: SELECT T2.contestant_number, T2.contestant_name FROM votes AS T1 JOIN contestants AS T2 ON T1.contestant_number = T2.contestant_number ORDER BY T1.votes ASC LIMIT 1 Gold: SELECT T1.contestant_number, T1.contestant_name FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number GROUP BY T1.contestant_number ORDER BY COUNT(*) ASC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [418] WRONG_TABLE | DB: voter_1 | EX: β Q : What is the area code in which the most voters voted Pred: SELECT area_code FROM votes GROUP BY area_code_state ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T1.area_code FROM area_code_state AS T1 JOIN votes AS T2 ON T1.state = T2.state GROUP BY T1.area_code ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [419] WRONG_TABLE | DB: voter_1 | EX: β Q : What are the create dates, states, and phone numbers of the votes that were for the contestant named 'Tabatha Gehling' Pred: SELECT T1.created, T1.state, T1.phone_number FROM votes AS T1 JOIN contestants AS T2 ON T1.contestant_number = T2.contestant_number WHERE T2.contestant_name = 'Tabatha Gehling' Gold: SELECT T2.created, T2.state, T2.phone_number FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number WHERE T1.contestant_name = 'Tabatha Gehling' Type: JOIN [420] WRONG_TABLE | DB: voter_1 | EX: β Q : List the area codes in which voters voted both for the contestant 'Tabatha Gehling' and the contestant 'Kelly Clauss' Pred: SELECT T1.area_code FROM votes AS T1 JOIN contestants AS T2 ON T1.contestant_number = T2.contestant_number WHERE T2.contestant_name = 'Tabatha Gehling' INTERSECT SELECT T1.area_code FROM votes AS T1 JOIN contestants AS T2 ON T1.contestant_number = T2.contestant_number WHERE T2.contestant_name = 'Kelly Clauss' Gold: SELECT T3.area_code FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number JOIN area_code_state AS T3 ON T2.state = T3.state WHERE T1.contestant_name = 'Tabatha Gehling' INTERSECT SELECT T3.area_code FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number JOIN area_code_state AS T3 ON T2.state = T3.state WHERE T1.contestant_name = 'Kelly Clauss' Type: JOIN [421] OTHER | DB: world_1 | EX: β Q : What is the total surface area of the countries in the Caribbean region Pred: SELECT SUM(surfacearea) FROM country WHERE region = 'Carribbean' Gold: SELECT SUM(SurfaceArea) FROM country WHERE Region = "Caribbean" Type: AGGREGATION [422] OTHER | DB: world_1 | EX: β Q : How much surface area do the countires in the Carribean cover together Pred: SELECT SUM(surfacearea) FROM country WHERE region = 'Carribean' Gold: SELECT SUM(SurfaceArea) FROM country WHERE Region = "Caribbean" Type: AGGREGATION [423] WRONG_TABLE | DB: world_1 | EX: β Q : Which region is the city Kabul located in Pred: SELECT region FROM city WHERE name = 'Kabul' Gold: SELECT Region FROM country AS T1 JOIN city AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = "Kabul" Type: JOIN [424] WRONG_TABLE | DB: world_1 | EX: β Q : What region is Kabul in Pred: SELECT region FROM city WHERE name = 'Kabul' Gold: SELECT Region FROM country AS T1 JOIN city AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = "Kabul" Type: JOIN [425] WRONG_COLUMNS | DB: world_1 | EX: β Q : Which language is the most popular in Aruba Pred: SELECT T1.language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.countrycode = T2.countrycode WHERE T2.name = 'Aruba' GROUP BY T1.language ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = "Aruba" ORDER BY Percentage DESC LIMIT 1 Type: JOIN, ORDER_BY, LIMIT [426] WRONG_TABLE | DB: world_1 | EX: β Q : What language is predominantly spoken in Aruba Pred: SELECT language FROM countrylanguage WHERE countrycode = 'Aruba' GROUP BY language HAVING COUNT(*) >= 1 Gold: SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = "Aruba" ORDER BY Percentage DESC LIMIT 1 Type: JOIN, ORDER_BY, LIMIT [427] WRONG_COLUMNS | DB: world_1 | EX: β Q : What are the region and population of Angola Pred: SELECT region, population FROM country WHERE countrycode = 'Angola' Gold: SELECT Population, Region FROM country WHERE Name = "Angola" Type: SIMPLE [428] EXTRA_JOIN | DB: world_1 | EX: β Q : What region does Angola belong to and what is its population Pred: SELECT T1.region, T2.population FROM country AS T1 JOIN city AS T2 ON T1.countrycode = T2.code WHERE T1.name = 'Angola' Gold: SELECT Population, Region FROM country WHERE Name = "Angola" Type: SIMPLE [429] MISSING_WHERE | DB: world_1 | EX: β Q : What is the name of country that has the shortest life expectancy in Asia Pred: SELECT name FROM country ORDER BY lifeexpectancy ASC LIMIT 1 Gold: SELECT Name FROM country WHERE Continent = "Asia" ORDER BY LifeExpectancy LIMIT 1 Type: ORDER_BY, LIMIT [430] OTHER | DB: world_1 | EX: β Q : Give the name of the country in Asia with the lowest life expectancy Pred: SELECT name FROM country WHERE region = 'Asia' ORDER BY lifeexpectancy LIMIT 1 Gold: SELECT Name FROM country WHERE Continent = "Asia" ORDER BY LifeExpectancy LIMIT 1 Type: ORDER_BY, LIMIT [431] OTHER | DB: world_1 | EX: β Q : What is the total population and maximum GNP in Asia Pred: SELECT SUM(population), MAX(gnp) FROM country WHERE region = 'Asie' Gold: SELECT SUM(Population), MAX(GNP) FROM country WHERE Continent = "Asia" Type: AGGREGATION [432] EXTRA_JOIN | DB: world_1 | EX: β Q : How many people live in Asia, and what is the largest GNP among them Pred: SELECT T1.population, T1.gnp FROM country AS T1 JOIN country AS T2 ON T1.countrycode = T2.code WHERE T2.region = 'Asia' ORDER BY T1.gnp DESC LIMIT 1 Gold: SELECT SUM(Population), MAX(GNP) FROM country WHERE Continent = "Asia" Type: AGGREGATION [433] WRONG_COLUMNS | DB: world_1 | EX: β Q : What is the average life expectancy in African countries that are republics Pred: SELECT AVG(lifeexpectancy) FROM country WHERE region = "Africa" INTERSECT SELECT countrycode FROM country WHERE region = "Republica" Gold: SELECT AVG(LifeExpectancy) FROM country WHERE Continent = "Africa" AND GovernmentForm = "Republic" Type: AGGREGATION [434] OTHER | DB: world_1 | EX: β Q : Give the average life expectancy for countries in Africa which are republics Pred: SELECT AVG(lifeexpectancy) FROM country WHERE region = 'Africa' AND region = 'Republica' Gold: SELECT AVG(LifeExpectancy) FROM country WHERE Continent = "Africa" AND GovernmentForm = "Republic" Type: AGGREGATION [435] OTHER | DB: world_1 | EX: β Q : What is the total surface area of the continents Asia and Europe Pred: SELECT SUM(surfacearea) FROM country WHERE continent = 'Asie' INTERSECT SELECT SUM(surfacearea) FROM country WHERE region = 'Europe' Gold: SELECT SUM(SurfaceArea) FROM country WHERE Continent = "Asia" OR Continent = "Europe" Type: AGGREGATION [436] OTHER | DB: world_1 | EX: β Q : Give the total surface area covered by countries in Asia or Europe Pred: SELECT SUM(surfacearea) FROM country WHERE region = 'Asie' OR region = 'Europe' Gold: SELECT SUM(SurfaceArea) FROM country WHERE Continent = "Asia" OR Continent = "Europe" Type: AGGREGATION [437] OTHER | DB: world_1 | EX: β Q : Give the mean GNP and total population of nations which are considered US territory Pred: SELECT AVG(gnp), SUM(population) FROM country WHERE countrycode = 'USA' Gold: SELECT AVG(GNP), SUM(population) FROM country WHERE GovernmentForm = "US Territory" Type: AGGREGATION [438] WRONG_COLUMNS | DB: world_1 | EX: β Q : What is the total number of languages used in Aruba Pred: SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.countrycode = T2.countrycode WHERE T1.name = 'Aruba' Gold: SELECT COUNT(T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = "Aruba" Type: JOIN, AGGREGATION [439] WRONG_COLUMNS | DB: world_1 | EX: β Q : How many languages are spoken in Aruba Pred: SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.countrycode = T2.countrycode WHERE T1.name = 'Aruba' Gold: SELECT COUNT(T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = "Aruba" Type: JOIN, AGGREGATION [440] OTHER | DB: world_1 | EX: β Q : How many official languages does Afghanistan have Pred: SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.countrycode = T2.code WHERE T1.region = "Afghanistan" Gold: SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = "Afghanistan" AND IsOfficial = "T" Type: JOIN, AGGREGATION [441] OTHER | DB: world_1 | EX: β Q : How many official languages are spoken in Afghanistan Pred: SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.countrycode = T2.code WHERE T1.region = "Afghanistan" Gold: SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = "Afghanistan" AND IsOfficial = "T" Type: JOIN, AGGREGATION [442] OTHER | DB: world_1 | EX: β Q : What is name of the country that speaks the largest number of languages Pred: SELECT T1.name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.countrycode = T2.code GROUP BY T1.name ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [443] OTHER | DB: world_1 | EX: β Q : Give the name of the nation that uses the greatest amount of languages Pred: SELECT T1.name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.countrycode = T2.code GROUP BY T1.countrycode ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [444] MISSING_JOIN | DB: world_1 | EX: β Q : Which continent has the most diverse languages Pred: SELECT continent FROM country GROUP BY continent ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Continent ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [445] MISSING_JOIN | DB: world_1 | EX: β Q : Which continent speaks the most languages Pred: SELECT continent FROM country GROUP BY continent ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Continent ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [446] WRONG_TABLE | DB: world_1 | EX: β Q : How many countries speak both English and Dutch Pred: SELECT COUNT(*) FROM countrylanguage WHERE language = 'english' INTERSECT SELECT COUNT(*) FROM countrylanguage WHERE language = 'Dutch' Gold: SELECT COUNT(*) FROM (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "Dutch") Type: JOIN, NESTED, AGGREGATION [447] WRONG_TABLE | DB: world_1 | EX: β Q : What is the number of nations that use English and Dutch Pred: SELECT COUNT(*) FROM countrylanguage WHERE language = 'english' INTERSECT SELECT COUNT(*) FROM countrylanguage WHERE language = 'Dutch' Gold: SELECT COUNT(*) FROM (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "Dutch") Type: JOIN, NESTED, AGGREGATION [448] WRONG_TABLE | DB: world_1 | EX: β Q : What are the names of nations speak both English and French Pred: SELECT name FROM countrylanguage WHERE language = 'english' INTERSECT SELECT name FROM countrylanguage WHERE language = 'french' Gold: SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "French" Type: JOIN [449] OTHER | DB: world_1 | EX: β Q : Give the names of nations that speak both English and French Pred: SELECT T1.name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.countrycode = T2.code WHERE T2.language = 'english' INTERSECT SELECT T1.name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.countrycode = T2.countrycode WHERE T2.language = 'french' Gold: SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "French" Type: JOIN [450] OTHER | DB: world_1 | EX: β Q : What are the names of nations where both English and French are official languages Pred: SELECT T1.name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.countrycode = T2.code WHERE T2.language = 'english' INTERSECT SELECT T1.name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.countrycode = T2.countrycode WHERE T2.language = 'french' Gold: SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English" AND T2.IsOfficial = "T" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "French" AND T2.IsOfficial = "T" Type: JOIN [451] OTHER | DB: world_1 | EX: β Q : Give the names of countries with English and French as official languages Pred: SELECT T1.name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.countrycode = T2.code WHERE T2.language = 'english' INTERSECT SELECT T1.name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.countrycode = T2.countrycode WHERE T2.language = 'french' Gold: SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English" AND T2.IsOfficial = "T" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "French" AND T2.IsOfficial = "T" Type: JOIN [452] MISSING_JOIN | DB: world_1 | EX: β Q : What is the number of distinct continents where Chinese is spoken Pred: SELECT COUNT(DISTINCT continent) FROM country WHERE language = 'Chinese' Gold: SELECT COUNT(DISTINCT Continent) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "Chinese" Type: JOIN, AGGREGATION [453] MISSING_JOIN | DB: world_1 | EX: β Q : How many continents speak Chinese Pred: SELECT COUNT(DISTINCT continent) FROM country WHERE language = 'Chinese' Gold: SELECT COUNT(DISTINCT Continent) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "Chinese" Type: JOIN, AGGREGATION [454] MISSING_JOIN | DB: world_1 | EX: β Q : What are the regions that use English or Dutch Pred: SELECT region FROM country WHERE language = "english" OR language = "Dutch" Gold: SELECT DISTINCT T1.Region FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English" OR T2.Language = "Dutch" Type: JOIN [455] MISSING_JOIN | DB: world_1 | EX: β Q : Which regions speak Dutch or English Pred: SELECT region FROM country WHERE language = 'Dutch' OR language = 'english' Gold: SELECT DISTINCT T1.Region FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English" OR T2.Language = "Dutch" Type: JOIN [456] OTHER | DB: world_1 | EX: β Q : What are the countries where either English or Dutch is the official language Pred: SELECT T1.name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.countrycode = T2.code WHERE T2.language = 'English' OR T2.language = 'Dutch' Gold: SELECT t1.name FROM country AS t1 JOIN countrylanguage AS t2 ON t1.code = t2.countrycode WHERE t2.language = "english" AND isofficial = "t" UNION SELECT t1.name FROM country AS t1 JOIN countrylanguage AS t2 ON t1.code = t2.countrycode WHERE t2.language = "dutch" AND isofficial = "t" Type: JOIN [457] WRONG_COLUMNS | DB: world_1 | EX: β Q : Which countries have either English or Dutch as an official language Pred: SELECT T1.name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.countrycode = T2.code WHERE T2.language = 'english' OR T2.language = 'Dutch' Gold: SELECT * FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English" AND IsOfficial = "T" UNION SELECT * FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "Dutch" AND IsOfficial = "T" Type: JOIN [458] MISSING_JOIN | DB: world_1 | EX: β Q : Which language is the most popular on the Asian continent Pred: SELECT language FROM country WHERE continent = 'Asian' GROUP BY language ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Continent = "Asia" GROUP BY T2.Language ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [459] WRONG_TABLE | DB: world_1 | EX: β Q : What is the language that is used by the largest number of Asian nations Pred: SELECT language FROM countrylanguage WHERE region = "Asian" GROUP BY language ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Continent = "Asia" GROUP BY T2.Language ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [460] MISSING_JOIN | DB: world_1 | EX: β Q : Which languages are spoken by only one country in republic governments Pred: SELECT countrylanguage FROM country WHERE governmentform = 'Republic' GROUP BY countrylanguage HAVING COUNT(*) = 1 Gold: SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.GovernmentForm = "Republic" GROUP BY T2.Language HAVING COUNT(*) = 1 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [461] MISSING_JOIN | DB: world_1 | EX: β Q : What languages are only used by a single country with a republic government Pred: SELECT countrylanguage FROM country WHERE governmentform = 'Republic' GROUP BY countrylanguage HAVING COUNT(*) = 1 Gold: SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.GovernmentForm = "Republic" GROUP BY T2.Language HAVING COUNT(*) = 1 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [462] MISSING_JOIN | DB: world_1 | EX: β Q : Find the city with the largest population that uses English Pred: SELECT name FROM city WHERE language = 'english' ORDER BY population DESC LIMIT 1 Gold: SELECT T1.Name, T1.Population FROM city AS T1 JOIN countrylanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Language = "English" ORDER BY T1.Population DESC LIMIT 1 Type: JOIN, ORDER_BY, LIMIT [463] MISSING_JOIN | DB: world_1 | EX: β Q : What is the most populace city that speaks English Pred: SELECT name FROM city WHERE language = "english" GROUP BY name ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T1.Name, T1.Population FROM city AS T1 JOIN countrylanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Language = "English" ORDER BY T1.Population DESC LIMIT 1 Type: JOIN, ORDER_BY, LIMIT [464] OTHER | DB: world_1 | EX: β Q : Find the name, population and expected life length of asian country with the largest area Pred: SELECT name, population, lifeexpectancy FROM country WHERE region = "Asian" ORDER BY surfacearea DESC LIMIT 1 Gold: SELECT Name, Population, LifeExpectancy FROM country WHERE Continent = "Asia" ORDER BY SurfaceArea DESC LIMIT 1 Type: ORDER_BY, LIMIT [465] OTHER | DB: world_1 | EX: β Q : What are the name, population, and life expectancy of the largest Asian country by land Pred: SELECT name, population, lifeexpectancy FROM country WHERE region = 'Asian' ORDER BY surfacearea DESC LIMIT 1 Gold: SELECT Name, Population, LifeExpectancy FROM country WHERE Continent = "Asia" ORDER BY SurfaceArea DESC LIMIT 1 Type: ORDER_BY, LIMIT [466] MISSING_JOIN | DB: world_1 | EX: β Q : What is average life expectancy in the countries where English is not the official language Pred: SELECT AVG(lifeexpectancy) FROM country WHERE language > 'english' Gold: SELECT AVG(LifeExpectancy) FROM country WHERE NOT Name IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English" AND T2.IsOfficial = "T") Type: JOIN, NESTED, AGGREGATION [467] MISSING_JOIN | DB: world_1 | EX: β Q : Give the mean life expectancy of countries in which English is not the official language Pred: SELECT AVG(lifeexpectancy) FROM country WHERE language > 'english' Gold: SELECT AVG(LifeExpectancy) FROM country WHERE NOT Name IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English" AND T2.IsOfficial = "T") Type: JOIN, NESTED, AGGREGATION [468] MISSING_JOIN | DB: world_1 | EX: β Q : What is the total number of people living in the nations that do not use English Pred: SELECT SUM(population) FROM country WHERE language > 'english' Gold: SELECT SUM(Population) FROM country WHERE NOT Name IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English") Type: JOIN, NESTED, AGGREGATION [469] MISSING_JOIN | DB: world_1 | EX: β Q : How many people live in countries that do not speak English Pred: SELECT COUNT(population) FROM country WHERE language > 'english' Gold: SELECT SUM(Population) FROM country WHERE NOT Name IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English") Type: JOIN, NESTED, AGGREGATION [470] WRONG_TABLE | DB: world_1 | EX: β Q : What is the official language spoken in the country whose head of state is Beatrix Pred: SELECT T1.language FROM countrylanguage AS T1 JOIN country AS T2 ON T1.countrycode = T2.code WHERE T2.headofstate = 'Beatrix' Gold: SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.HeadOfState = "Beatrix" AND T2.IsOfficial = "T" Type: JOIN [471] WRONG_TABLE | DB: world_1 | EX: β Q : What is the official language used in the country the name of whose head of state is Beatrix Pred: SELECT T1.language FROM countrylanguage AS T1 JOIN country AS T2 ON T1.countrycode = T2.code WHERE T2.headofstate = 'Beatrix' Gold: SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.HeadOfState = "Beatrix" AND T2.IsOfficial = "T" Type: JOIN [472] WRONG_COLUMNS | DB: world_1 | EX: β Q : What is the total number of unique official languages spoken in the countries that are founded before 1930 Pred: SELECT COUNT(DISTINCT T1.isofficial) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.countrycode = T2.code WHERE T1.indepyear 1930 Gold: SELECT COUNT(DISTINCT T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE IndepYear < 1930 AND T2.IsOfficial = "T" Type: JOIN, AGGREGATION [473] WRONG_TABLE | DB: world_1 | EX: β Q : For the countries founded before 1930, what is the total number of distinct official languages Pred: SELECT COUNT(DISTINCT language) FROM countrycode WHERE indepyear 1930 Gold: SELECT COUNT(DISTINCT T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE IndepYear < 1930 AND T2.IsOfficial = "T" Type: JOIN, AGGREGATION [474] WRONG_COLUMNS | DB: world_1 | EX: β Q : What are the countries that have greater surface area than any country in Europe Pred: SELECT name FROM country WHERE surfacearea > (SELECT MAX(surfacearea) FROM country WHERE continent = 'Europe') Gold: SELECT Name FROM country WHERE SurfaceArea > (SELECT MIN(SurfaceArea) FROM country WHERE Continent = "Europe") Type: NESTED, AGGREGATION [475] WRONG_COLUMNS | DB: world_1 | EX: β Q : Which countries have greater area than that of any country in Europe Pred: SELECT name FROM country WHERE surfacearea > (SELECT MAX(surfacearea) FROM country WHERE region = 'Europe') Gold: SELECT Name FROM country WHERE SurfaceArea > (SELECT MIN(SurfaceArea) FROM country WHERE Continent = "Europe") Type: NESTED, AGGREGATION [476] OTHER | DB: world_1 | EX: β Q : What are the African countries that have a population less than any country in Asia Pred: SELECT name FROM country WHERE region = "Asia" AND population (SELECT MAX(population) FROM country WHERE region = "Africa") Gold: SELECT Name FROM country WHERE Continent = "Africa" AND population < (SELECT MAX(population) FROM country WHERE Continent = "Asia") Type: NESTED, AGGREGATION [477] WRONG_COLUMNS | DB: world_1 | EX: β Q : Which African countries have a smaller population than that of any country in Asia Pred: SELECT name FROM country WHERE region = 'Asia' AND population (SELECT MAX(population) FROM country WHERE region = 'Africa') Gold: SELECT Name FROM country WHERE Continent = "Africa" AND population < (SELECT MIN(population) FROM country WHERE Continent = "Asia") Type: NESTED, AGGREGATION [478] OTHER | DB: world_1 | EX: β Q : Which Asian countries have a population that is larger than any country in Africa Pred: SELECT name FROM country WHERE region = "Asia" AND population > (SELECT MAX(population) FROM country WHERE continent = "Africa") Gold: SELECT Name FROM country WHERE Continent = "Asia" AND population > (SELECT MAX(population) FROM country WHERE Continent = "Africa") Type: NESTED, AGGREGATION [479] WRONG_COLUMNS | DB: world_1 | EX: β Q : What are the Asian countries which have a population larger than that of any country in Africa Pred: SELECT name FROM country WHERE region = "Asia" AND population > (SELECT MAX(population) FROM country WHERE continent = "Africa") Gold: SELECT Name FROM country WHERE Continent = "Asia" AND population > (SELECT MIN(population) FROM country WHERE Continent = "Africa") Type: NESTED, AGGREGATION [480] WRONG_TABLE | DB: world_1 | EX: β Q : What are the country codes for countries that do not speak English Pred: SELECT countrycode FROM country WHERE language > 'english' Gold: SELECT CountryCode FROM countrylanguage EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = "English" Type: SIMPLE [481] WRONG_TABLE | DB: world_1 | EX: β Q : Return the country codes for countries that do not speak English Pred: SELECT countrycode FROM country WHERE language > 'english' Gold: SELECT CountryCode FROM countrylanguage EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = "English" Type: SIMPLE [482] WRONG_TABLE | DB: world_1 | EX: β Q : What are the country codes of countries where people use languages other than English Pred: SELECT countrycode FROM country WHERE language > 'english' Gold: SELECT DISTINCT CountryCode FROM countrylanguage WHERE LANGUAGE <> "English" Type: SIMPLE [483] WRONG_COLUMNS | DB: world_1 | EX: β Q : Give the country codes for countries in which people speak langauges that are not English Pred: SELECT countrycode FROM countrylanguage WHERE language > 'english' Gold: SELECT DISTINCT CountryCode FROM countrylanguage WHERE LANGUAGE <> "English" Type: SIMPLE [484] WRONG_TABLE | DB: world_1 | EX: β Q : What are the codes of the countries that do not speak English and whose government forms are not Republic Pred: SELECT countrycode FROM country WHERE language > 'english' AND governmentform > 'Republic' Gold: SELECT Code FROM country WHERE GovernmentForm <> "Republic" EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = "English" Type: SIMPLE [485] WRONG_TABLE | DB: world_1 | EX: β Q : Return the codes of countries that do not speak English and do not have Republics for governments Pred: SELECT countrycode FROM country WHERE language > 'english' EXCEPT SELECT countrycode FROM country WHERE governmentform = 'Republic' Gold: SELECT Code FROM country WHERE GovernmentForm <> "Republic" EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = "English" Type: SIMPLE [486] WRONG_TABLE | DB: world_1 | EX: β Q : Which cities are in European countries where English is not the official language Pred: SELECT T1.name FROM city AS T1 JOIN country AS T2 ON T1.countrycode = T2.code WHERE T2.language = 'European' EXCEPT SELECT T1.name FROM city AS T1 JOIN countrylanguage AS T2 ON T1.countrycode = T2.countrycode WHERE T2.language = 'english' Gold: SELECT DISTINCT T2.Name FROM country AS T1 JOIN city AS T2 ON T2.CountryCode = T1.Code WHERE T1.Continent = 'Europe' AND NOT T1.Name IN (SELECT T3.Name FROM country AS T3 JOIN countrylanguage AS T4 ON T3.Code = T4.CountryCode WHERE T4.IsOfficial = 'T' AND T4.Language = 'English') Type: JOIN, NESTED [487] WRONG_TABLE | DB: world_1 | EX: β Q : What are the names of cities in Europe for which English is not the official language Pred: SELECT DISTINCT T1.localname FROM city AS T1 JOIN country AS T2 ON T1.countrycode = T2.code WHERE T2.name = 'Europe' AND T2.language > 'english' Gold: SELECT DISTINCT T2.Name FROM country AS T1 JOIN city AS T2 ON T2.CountryCode = T1.Code WHERE T1.Continent = 'Europe' AND NOT T1.Name IN (SELECT T3.Name FROM country AS T3 JOIN countrylanguage AS T4 ON T3.Code = T4.CountryCode WHERE T4.IsOfficial = 'T' AND T4.Language = 'English') Type: JOIN, NESTED [488] WRONG_TABLE | DB: world_1 | EX: β Q : Which unique cities are in Asian countries where Chinese is the official language Pred: SELECT DISTINCT T1.name FROM city AS T1 JOIN country AS T2 ON T1.countrycode = T2.code JOIN countrylanguage AS T3 ON T2.countrycode = T3.countrycode WHERE T3.language = 'Chinese' Gold: SELECT DISTINCT t3.name FROM country AS t1 JOIN countrylanguage AS t2 ON t1.code = t2.countrycode JOIN city AS t3 ON t1.code = t3.countrycode WHERE t2.isofficial = 't' AND t2.language = 'chinese' AND t1.continent = "asia" Type: JOIN [489] WRONG_TABLE | DB: world_1 | EX: β Q : Return the different names of cities that are in Asia and for which Chinese is the official language Pred: SELECT DISTINCT T1.localname FROM city AS T1 JOIN country AS T2 ON T1.countrycode = T2.code WHERE T2.region = "Asia" AND T2.language = "Chinese" Gold: SELECT DISTINCT T3.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode JOIN city AS T3 ON T1.Code = T3.CountryCode WHERE T2.IsOfficial = 'T' AND T2.Language = 'Chinese' AND T1.Continent = "Asia" Type: JOIN [490] WRONG_COLUMNS | DB: world_1 | EX: β Q : What are the name, independence year, and surface area of the country with the smallest population Pred: SELECT name, indepyear, surfacearea FROM country ORDER BY population ASC LIMIT 1 Gold: SELECT Name, SurfaceArea, IndepYear FROM country ORDER BY Population LIMIT 1 Type: ORDER_BY, LIMIT [491] WRONG_COLUMNS | DB: world_1 | EX: β Q : Give the name, year of independence, and surface area of the country that has the lowest population Pred: SELECT name, indepyear, surfacearea FROM country ORDER BY population LIMIT 1 Gold: SELECT Name, SurfaceArea, IndepYear FROM country ORDER BY Population LIMIT 1 Type: ORDER_BY, LIMIT [492] WRONG_COLUMNS | DB: world_1 | EX: β Q : What are the population, name and leader of the country with the largest area Pred: SELECT population, name, headofstate FROM country ORDER BY surfacearea DESC LIMIT 1 Gold: SELECT Name, population, HeadOfState FROM country ORDER BY SurfaceArea DESC LIMIT 1 Type: ORDER_BY, LIMIT [493] WRONG_COLUMNS | DB: world_1 | EX: β Q : Return the country name and the numbers of languages spoken for each country that speaks at least 3 languages Pred: SELECT T1.name, COUNT(*), T1.countrycode FROM country AS T1 JOIN countrylanguage AS T2 ON T1.countrycode = T2.code GROUP BY T1.countrycode HAVING COUNT(*) >= 3 Gold: SELECT COUNT(T2.Language), T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name HAVING COUNT(*) > 2 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [494] WRONG_COLUMNS | DB: world_1 | EX: β Q : What are the names of countries that speak more than 2 languages, as well as how many languages they speak Pred: SELECT T1.name, COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.countrycode = T2.code GROUP BY T1.countrycode HAVING COUNT(*) > 2 Gold: SELECT COUNT(T2.Language), T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name HAVING COUNT(*) > 2 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [495] MISSING_GROUP_BY | DB: world_1 | EX: β Q : Find the number of cities in each district whose population is greater than the average population of cities Pred: SELECT COUNT(*), district FROM city WHERE population > (SELECT AVG(population) FROM city) Gold: SELECT COUNT(*), District FROM city WHERE Population > (SELECT AVG(Population) FROM city) GROUP BY District Type: GROUP_BY, NESTED, AGGREGATION [496] MISSING_GROUP_BY | DB: world_1 | EX: β Q : How many cities in each district have a population that is above the average population across all cities Pred: SELECT COUNT(*), district FROM city WHERE population > (SELECT AVG(population) FROM city) Gold: SELECT COUNT(*), District FROM city WHERE Population > (SELECT AVG(Population) FROM city) GROUP BY District Type: GROUP_BY, NESTED, AGGREGATION [497] WRONG_COLUMNS | DB: world_1 | EX: β Q : Find the government form name and total population for each government form whose average life expectancy is longer than 72 Pred: SELECT governmentform, SUM(population) FROM country WHERE lifeexpectancy > 72 GROUP BY governmentform Gold: SELECT SUM(Population), GovernmentForm FROM country GROUP BY GovernmentForm HAVING AVG(LifeExpectancy) > 72 Type: GROUP_BY, HAVING, AGGREGATION [498] WRONG_COLUMNS | DB: world_1 | EX: β Q : What are the different government forms and what is the total population of each for government forms that have an average life expectancy greater than 72 Pred: SELECT governmentform, SUM(population) FROM country WHERE lifeexpectancy > 72 GROUP BY governmentform Gold: SELECT SUM(Population), GovernmentForm FROM country GROUP BY GovernmentForm HAVING AVG(LifeExpectancy) > 72 Type: GROUP_BY, HAVING, AGGREGATION [499] WRONG_COLUMNS | DB: world_1 | EX: β Q : Find the average life expectancy and total population for each continent where the average life expectancy is shorter than 72 Pred: SELECT AVG(lifeexpectancy), SUM(population) FROM country WHERE lifeexpectancy 72 GROUP BY continent Gold: SELECT SUM(Population), AVG(LifeExpectancy), Continent FROM country GROUP BY Continent HAVING AVG(LifeExpectancy) < 72 Type: GROUP_BY, HAVING, AGGREGATION [500] WRONG_COLUMNS | DB: world_1 | EX: β Q : What are the different continents and the total popuation and average life expectancy corresponding to each, for continents that have an average life expectancy less than 72 Pred: SELECT continent, AVG(lifeexpectancy), SUM(population) FROM country GROUP BY continent HAVING AVG(lifeexpectancy) 72 Gold: SELECT SUM(Population), AVG(LifeExpectancy), Continent FROM country GROUP BY Continent HAVING AVG(LifeExpectancy) < 72 Type: GROUP_BY, HAVING, AGGREGATION [501] WRONG_COLUMNS | DB: world_1 | EX: β Q : What are the names and areas of countries with the top 5 largest area Pred: SELECT name, area FROM country ORDER BY surfacearea DESC LIMIT 5 Gold: SELECT Name, SurfaceArea FROM country ORDER BY SurfaceArea DESC LIMIT 5 Type: ORDER_BY, LIMIT [502] OTHER | DB: world_1 | EX: β Q : Return the names and surface areas of the 5 largest countries Pred: SELECT name, surfacearea FROM country ORDER BY population DESC LIMIT 5 Gold: SELECT Name, SurfaceArea FROM country ORDER BY SurfaceArea DESC LIMIT 5 Type: ORDER_BY, LIMIT [503] OTHER | DB: world_1 | EX: β Q : how many countries are in Asia Pred: SELECT COUNT(*) FROM country WHERE region = 'Asia' Gold: SELECT COUNT(*) FROM country WHERE continent = "Asia" Type: AGGREGATION [504] OTHER | DB: world_1 | EX: β Q : Count the number of countries in Asia Pred: SELECT COUNT(*) FROM country WHERE region = 'Asie' Gold: SELECT COUNT(*) FROM country WHERE continent = "Asia" Type: AGGREGATION [505] OTHER | DB: world_1 | EX: β Q : What are the names of the countries that are in the continent of Europe and have a population of 80000 Pred: SELECT name FROM country WHERE continent = 'Europe' AND population = 80000 Gold: SELECT Name FROM country WHERE continent = "Europe" AND Population = "80000" Type: SIMPLE [506] OTHER | DB: world_1 | EX: β Q : Give the names of countries that are in Europe and have a population equal to 80000 Pred: SELECT name FROM country WHERE continent = 'Europe' AND population = 80000 Gold: SELECT Name FROM country WHERE continent = "Europe" AND Population = "80000" Type: SIMPLE [507] OTHER | DB: world_1 | EX: β Q : Give the total population and average surface area corresponding to countries in North America that have a surface area greater than 3000 Pred: SELECT SUM(population), AVG(surfacearea) FROM country WHERE region = 'North America' AND surfacearea > 3000 Gold: SELECT SUM(population), AVG(surfacearea) FROM country WHERE continent = "north america" AND surfacearea > 3000 Type: AGGREGATION [508] WRONG_TABLE | DB: world_1 | EX: β Q : What is the language spoken by the largest percentage of people in each country Pred: SELECT countrylanguage, MAX(Percentage) FROM country AS T1 JOIN countryAS T2 ON T1.countrycode = T2.code GROUP BY countrycode Gold: SELECT LANGUAGE, CountryCode, MAX(Percentage) FROM countrylanguage GROUP BY CountryCode Type: GROUP_BY, AGGREGATION [509] WRONG_TABLE | DB: world_1 | EX: β Q : What are the country codes of the different countries, and what are the languages spoken by the greatest percentage of people for each Pred: SELECT countrycode, T1.language, MAX(T1.population) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.countrycode = T2.code GROUP BY T1.countrycode Gold: SELECT LANGUAGE, CountryCode, MAX(Percentage) FROM countrylanguage GROUP BY CountryCode Type: GROUP_BY, AGGREGATION [510] WRONG_TABLE | DB: world_1 | EX: β Q : What is the total number of countries where Spanish is spoken by the largest percentage of people Pred: SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.countrycode = T2.code WHERE T2.language = 'Spanish' ORDER BY percentage DESC LIMIT 1 Gold: SELECT COUNT(*), MAX(Percentage) FROM countrylanguage WHERE LANGUAGE = "Spanish" GROUP BY CountryCode Type: GROUP_BY, AGGREGATION [511] WRONG_TABLE | DB: world_1 | EX: β Q : Count the number of countries for which Spanish is the predominantly spoken language Pred: SELECT COUNT(*) FROM country WHERE language = 'Spanish' Gold: SELECT COUNT(*), MAX(Percentage) FROM countrylanguage WHERE LANGUAGE = "Spanish" GROUP BY CountryCode Type: GROUP_BY, AGGREGATION [512] WRONG_TABLE | DB: world_1 | EX: β Q : What are the codes of countries where Spanish is spoken by the largest percentage of people Pred: SELECT T1.countrycode FROM country AS T1 JOIN countrylanguage AS T2 ON T1.countrycode = T2.code WHERE T2.language = 'Spanish' ORDER BY T1.population DESC LIMIT 1 Gold: SELECT CountryCode, MAX(Percentage) FROM countrylanguage WHERE LANGUAGE = "Spanish" GROUP BY CountryCode Type: GROUP_BY, AGGREGATION [513] WRONG_TABLE | DB: world_1 | EX: β Q : Return the codes of countries for which Spanish is the predominantly spoken language Pred: SELECT T1.countrycode FROM country AS T1 JOIN countrylanguage AS T2 ON T1.countrycode = T2.code WHERE T2.language = 'Spanish' Gold: SELECT CountryCode, MAX(Percentage) FROM countrylanguage WHERE LANGUAGE = "Spanish" GROUP BY CountryCode Type: GROUP_BY, AGGREGATION [514] OTHER | DB: orchestra | EX: β Q : What are the names of conductors, ordered by age Pred: SELECT Name FROM conductor ORDER BY Age Gold: SELECT Name FROM conductor ORDER BY Age ASC Type: ORDER_BY [515] OTHER | DB: orchestra | EX: β Q : What are the names of conductors whose nationalities are not "USA" Pred: SELECT Name FROM conductor WHERE Nationality > "USA" Gold: SELECT Name FROM conductor WHERE Nationality <> 'USA' Type: SIMPLE [516] OTHER | DB: orchestra | EX: β Q : Return the names of conductors that do not have the nationality "USA" Pred: SELECT Name FROM conductor WHERE Nationality > "USA" Gold: SELECT Name FROM conductor WHERE Nationality <> 'USA' Type: SIMPLE [517] OTHER | DB: orchestra | EX: β Q : What are the maximum and minimum share of performances whose type is not "Live final" Pred: SELECT MAX(Share), MIN(Share) FROM performance WHERE TYPE > "Live final" Gold: SELECT MAX(SHARE), MIN(SHARE) FROM performance WHERE TYPE <> "Live final" Type: AGGREGATION [518] WRONG_TABLE | DB: orchestra | EX: β Q : Return the maximum and minimum shares for performances that do not have the type "Live final" Pred: SELECT MAX(Share), MIN(Share) FROM performance WHERE NOT Performance_ID IN (SELECT Performance_ID FROM show WHERE Type > "Live final") Gold: SELECT MAX(SHARE), MIN(SHARE) FROM performance WHERE TYPE <> "Live final" Type: AGGREGATION [519] WRONG_TABLE | DB: orchestra | EX: β Q : What is the name of the conductor who has worked the greatest number of years Pred: SELECT T2.name FROM orchestra AS T1 JOIN conductor AS T2 ON T1.conductor_id = T2.conductor_id GROUP BY T2.conductor_id ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT Name FROM conductor ORDER BY Year_of_Work DESC LIMIT 1 Type: ORDER_BY, LIMIT [520] WRONG_TABLE | DB: orchestra | EX: β Q : Show the names of conductors and the orchestras they have conducted Pred: SELECT T3.Name, T2.Orchestra FROM performance AS T1 JOIN orchestra AS T2 ON T1.Orchestra_ID = T2.Orchestra_ID JOIN conductor AS T3 ON T1.Conductor_ID = T3.Conductor_ID Gold: SELECT T1.Name, T2.Orchestra FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID Type: JOIN [521] WRONG_TABLE | DB: orchestra | EX: β Q : What are the names of conductors as well as the corresonding orchestras that they have conducted Pred: SELECT T3.Name, T2.Orchestra FROM performance AS T1 JOIN orchestra AS T2 ON T1.Orchestra_ID = T2.Orchestra_ID JOIN conductor AS T3 ON T1.Conductor_ID = T3.Conductor_ID Gold: SELECT T1.Name, T2.Orchestra FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID Type: JOIN [522] OTHER | DB: orchestra | EX: β Q : Show the names of conductors that have conducted more than one orchestras Pred: SELECT T1.name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.conductor_id = T2.conductor_id GROUP BY T1.conductor_id HAVING COUNT(*) > 1 Gold: SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID GROUP BY T2.Conductor_ID HAVING COUNT(*) > 1 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [523] OTHER | DB: orchestra | EX: β Q : What are the names of conductors who have conducted at more than one orchestra Pred: SELECT T1.name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.conductor_id = T2.conductor_id GROUP BY T1.conductor_id HAVING COUNT(*) > 1 Gold: SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID GROUP BY T2.Conductor_ID HAVING COUNT(*) > 1 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [524] WRONG_TABLE | DB: orchestra | EX: β Q : Show the name of the conductor that has conducted the most number of orchestras Pred: SELECT T2.name FROM performance AS T1 JOIN conductor AS T2 ON T1.conductor_id = T2.conductor_id GROUP BY T2.conductor_id ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID GROUP BY T2.Conductor_ID ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [525] WRONG_TABLE | DB: orchestra | EX: β Q : What is the name of the conductor who has conducted the most orchestras Pred: SELECT T2.name FROM orchestra AS T1 JOIN conductor AS T2 ON T1.conductor_id = T2.conductor_id GROUP BY T2.conductor_id ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID GROUP BY T2.Conductor_ID ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [526] WRONG_TABLE | DB: orchestra | EX: β Q : Please show the name of the conductor that has conducted orchestras founded after 2008 Pred: SELECT T2.name FROM orchestra AS T1 JOIN conductor AS T2 ON T1.conductor_id = T2.conductor_id WHERE T1.year_of_founded > 2008 Gold: SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID WHERE Year_of_Founded > 2008 Type: JOIN [527] WRONG_TABLE | DB: orchestra | EX: β Q : What are the names of conductors who have conducted orchestras founded after the year 2008 Pred: SELECT T2.name FROM orchestra AS T1 JOIN conductor AS T2 ON T1.conductor_id = T2.conductor_id WHERE T1.year_of_founded > 2008 Gold: SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID WHERE Year_of_Founded > 2008 Type: JOIN [528] WRONG_COLUMNS | DB: orchestra | EX: β Q : How many orchestras does each record company manage Pred: SELECT COUNT(*), record_company FROM orchestra GROUP BY record_company Gold: SELECT Record_Company, COUNT(*) FROM orchestra GROUP BY Record_Company Type: GROUP_BY, AGGREGATION [529] MISSING_GROUP_BY | DB: orchestra | EX: β Q : Please show the record formats of orchestras in ascending order of count Pred: SELECT Major_Record_Format FROM orchestra ORDER BY COUNT(*) ASC Gold: SELECT Major_Record_Format FROM orchestra GROUP BY Major_Record_Format ORDER BY COUNT(*) ASC Type: GROUP_BY, ORDER_BY, AGGREGATION [530] MISSING_GROUP_BY | DB: orchestra | EX: β Q : What are the major record formats of orchestras, sorted by their frequency Pred: SELECT Major_Record_format FROM orchestra ORDER BY Major_Record_format Gold: SELECT Major_Record_Format FROM orchestra GROUP BY Major_Record_Format ORDER BY COUNT(*) ASC Type: GROUP_BY, ORDER_BY, AGGREGATION [531] WRONG_COLUMNS | DB: orchestra | EX: β Q : List the names of orchestras that have no performance Pred: SELECT Name FROM orchestra WHERE NOT Orchestra_ID IN (SELECT Orchestra_ID FROM performance) Gold: SELECT Orchestra FROM orchestra WHERE NOT Orchestra_ID IN (SELECT Orchestra_ID FROM performance) Type: NESTED [532] OTHER | DB: orchestra | EX: β Q : Show the record companies shared by orchestras founded before 2003 and after 2003 Pred: SELECT Record_Company FROM orchestra WHERE YEAR_of_founded 2003 INTERSECT SELECT Record_Company FROM orchestra WHERE YEAR_of_founded > 2003 Gold: SELECT Record_Company FROM orchestra WHERE Year_of_Founded < 2003 INTERSECT SELECT Record_Company FROM orchestra WHERE Year_of_Founded > 2003 Type: SIMPLE [533] OTHER | DB: orchestra | EX: β Q : What are the record companies that are used by both orchestras founded before 2003 and those founded after 2003 Pred: SELECT record_company FROM orchestra WHERE YEAR_of_founded 2003 INTERSECT SELECT record_company FROM orchestra WHERE YEAR_of_founded > 2003 Gold: SELECT Record_Company FROM orchestra WHERE Year_of_Founded < 2003 INTERSECT SELECT Record_Company FROM orchestra WHERE Year_of_Founded > 2003 Type: SIMPLE [534] WRONG_COLUMNS | DB: orchestra | EX: β Q : Show the years in which orchestras that have given more than one performance are founded Pred: SELECT T1.Year_of_founded FROM orchestra AS T1 JOIN performance AS T2 ON T1.Orchestra_ID = T2.Orchestra_ID GROUP BY T1.Orchestra_ID HAVING COUNT(*) > 1 Gold: SELECT Year_of_Founded FROM orchestra AS T1 JOIN performance AS T2 ON T1.Orchestra_ID = T2.Orchestra_ID GROUP BY T2.Orchestra_ID HAVING COUNT(*) > 1 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [535] MISSING_JOIN | DB: orchestra | EX: β Q : What are years of founding for orchestras that have had more than a single performance Pred: SELECT YEAR_of_founded FROM orchestra GROUP BY YEAR_of_founded HAVING COUNT(*) > 1 Gold: SELECT Year_of_Founded FROM orchestra AS T1 JOIN performance AS T2 ON T1.Orchestra_ID = T2.Orchestra_ID GROUP BY T2.Orchestra_ID HAVING COUNT(*) > 1 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [536] WRONG_COLUMNS | DB: network_1 | EX: β Q : What grade is Kyle in Pred: SELECT grading FROM highschooler WHERE name = 'Kyle' Gold: SELECT grade FROM Highschooler WHERE name = "Kyle" Type: SIMPLE [537] WRONG_COLUMNS | DB: network_1 | EX: β Q : What is Kyle's id Pred: SELECT student_id FROM highschooler WHERE name = 'Kyle' Gold: SELECT ID FROM Highschooler WHERE name = "Kyle" Type: SIMPLE [538] EXTRA_JOIN | DB: network_1 | EX: β Q : How many friends does each student have Pred: SELECT COUNT(*) FROM friend AS T1 JOIN student AS T2 ON T1.student_id = T2.id GROUP BY T2.student_id Gold: SELECT student_id, COUNT(*) FROM Friend GROUP BY student_id Type: GROUP_BY, AGGREGATION [539] WRONG_TABLE | DB: network_1 | EX: β Q : Show the names of high school students and their corresponding number of friends Pred: SELECT T2.name, COUNT(*) FROM highschooler AS T1 JOIN friend AS T2 ON T1.id = T2.friend_id JOIN student AS T3 ON T1.student_id = T3.id GROUP BY T3.student_id Gold: SELECT T2.name, COUNT(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id Type: JOIN, GROUP_BY, AGGREGATION [540] WRONG_TABLE | DB: network_1 | EX: β Q : What are the names of the high schoolers and how many friends does each have Pred: SELECT COUNT(*), T1.name FROM highschooler AS T1 JOIN friend AS T2 ON T1.id = T2.friend_id GROUP BY T1.id Gold: SELECT T2.name, COUNT(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id Type: JOIN, GROUP_BY, AGGREGATION [541] WRONG_TABLE | DB: network_1 | EX: β Q : What is the name of the high schooler who has the greatest number of friends Pred: SELECT T1.name FROM highschooler AS T1 JOIN friend AS T2 ON T1.id = T2.friend_id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [542] WRONG_TABLE | DB: network_1 | EX: β Q : Return the name of the high school student with the most friends Pred: SELECT T1.name FROM highschooler AS T1 JOIN friend AS T2 ON T1.id = T2.friend_id GROUP BY T2.friend_id ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [543] WRONG_TABLE | DB: network_1 | EX: β Q : Show the names of high schoolers who have at least 3 friends Pred: SELECT T1.name FROM highschooler AS T1 JOIN friend AS T2 ON T1.id = T2.friend_id GROUP BY T2.friend_id HAVING COUNT(*) >= 3 Gold: SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING COUNT(*) >= 3 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [544] WRONG_TABLE | DB: network_1 | EX: β Q : What are the names of high schoolers who have 3 or more friends Pred: SELECT T1.name FROM highschooler AS T1 JOIN friend AS T2 ON T1.id = T2.friend_id GROUP BY T2.friend_id HAVING COUNT(*) >= 3 Gold: SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING COUNT(*) >= 3 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [545] WRONG_TABLE | DB: network_1 | EX: β Q : Show the names of all of the high schooler Kyle's friends Pred: SELECT T3.name FROM highschooler AS T1 JOIN friend AS T2 ON T1.id = T2.friend_id JOIN likes AS T3 ON T2.liked_id = T3.id JOIN student AS T4 ON T3.student_id = T4.id WHERE T1.name = 'Kyle' Gold: SELECT T3.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id JOIN Highschooler AS T3 ON T1.friend_id = T3.id WHERE T2.name = "Kyle" Type: JOIN [546] WRONG_TABLE | DB: network_1 | EX: β Q : Return the names of friends of the high school student Kyle Pred: SELECT T2.name FROM highschooler AS T1 JOIN friend AS T2 ON T1.id = T2.friend_id WHERE T1.id = "Kyle" Gold: SELECT T3.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id JOIN Highschooler AS T3 ON T1.friend_id = T3.id WHERE T2.name = "Kyle" Type: JOIN [547] OTHER | DB: network_1 | EX: β Q : How many friends does the high school student Kyle have Pred: SELECT COUNT(*) FROM friend AS T1 JOIN student AS T2 ON T1.student_id = T2.id WHERE T2.name = "Kyle" Gold: SELECT COUNT(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = "Kyle" Type: JOIN, AGGREGATION [548] MISSING_JOIN | DB: network_1 | EX: β Q : Count the number of friends Kyle has Pred: SELECT COUNT(*) FROM friend WHERE name = 'Kyle' Gold: SELECT COUNT(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = "Kyle" Type: JOIN, AGGREGATION [549] WRONG_COLUMNS | DB: network_1 | EX: β Q : Show ids of all students who do not have any friends Pred: SELECT student_id FROM friend EXCEPT SELECT student_id FROM highschooler Gold: SELECT id FROM Highschooler EXCEPT SELECT student_id FROM Friend Type: SIMPLE [550] WRONG_COLUMNS | DB: network_1 | EX: β Q : What are the ids of high school students who do not have friends Pred: SELECT student_id FROM friend EXCEPT SELECT student_id FROM highschooler Gold: SELECT id FROM Highschooler EXCEPT SELECT student_id FROM Friend Type: SIMPLE [551] MISSING_JOIN | DB: network_1 | EX: β Q : Show names of all high school students who do not have any friends Pred: SELECT name FROM highschooler WHERE NOT student_id IN (SELECT student_id FROM friend) Gold: SELECT name FROM Highschooler EXCEPT SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id Type: JOIN [552] WRONG_TABLE | DB: network_1 | EX: β Q : What are the names of students who have no friends Pred: SELECT name FROM student WHERE NOT student_id IN (SELECT student_id FROM friend) Gold: SELECT name FROM Highschooler EXCEPT SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id Type: JOIN [553] WRONG_TABLE | DB: network_1 | EX: β Q : Show the ids of high schoolers who have friends and are also liked by someone else Pred: SELECT T1.id FROM highschooler AS T1 JOIN friend AS T2 ON T1.id = T2.friend_id INTERSECT SELECT T1.id FROM highschooler AS T1 JOIN likes AS T2 ON T1.id = T2.liked_id Gold: SELECT student_id FROM Friend INTERSECT SELECT liked_id FROM Likes Type: SIMPLE [554] WRONG_TABLE | DB: network_1 | EX: β Q : What are the ids of students who both have friends and are liked Pred: SELECT T1.id FROM student AS T1 JOIN friend AS T2 ON T1.id = T2.friend_id INTERSECT SELECT T1.id FROM student AS T1 JOIN likes AS T2 ON T1.id = T2.liked_id Gold: SELECT student_id FROM Friend INTERSECT SELECT liked_id FROM Likes Type: SIMPLE [555] WRONG_TABLE | DB: network_1 | EX: β Q : Show name of all students who have some friends and also are liked by someone else Pred: SELECT T1.name FROM highschooler AS T1 JOIN friend AS T2 ON T1.id = T2.friend_id JOIN likes AS T3 ON T2.liked_id = T3.id Gold: SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id INTERSECT SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id = T2.id Type: JOIN [556] WRONG_TABLE | DB: network_1 | EX: β Q : What are the names of high schoolers who both have friends and are liked Pred: SELECT T1.name FROM highschooler AS T1 JOIN friend AS T2 ON T1.id = T2.friend_id INTERSECT SELECT T1.name FROM highschooler AS T1 JOIN likes AS T2 ON T1.id = T2.liked_id Gold: SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id INTERSECT SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id = T2.id Type: JOIN [557] WRONG_COLUMNS | DB: network_1 | EX: β Q : Count the number of likes for each student id Pred: SELECT COUNT(*), student_id FROM likes GROUP BY student_id Gold: SELECT student_id, COUNT(*) FROM Likes GROUP BY student_id Type: GROUP_BY, AGGREGATION [558] WRONG_TABLE | DB: network_1 | EX: β Q : Show the names of high schoolers who have likes, and numbers of likes for each Pred: SELECT T1.name, COUNT(*) FROM highschooler AS T1 JOIN likes AS T2 ON T1.id = T2.liked_id GROUP BY T1.id Gold: SELECT T2.name, COUNT(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id Type: JOIN, GROUP_BY, AGGREGATION [559] WRONG_TABLE | DB: network_1 | EX: β Q : What are the names of high schoolers who have likes, and how many likes does each have Pred: SELECT T1.name, COUNT(*) FROM highschooler AS T1 JOIN likes AS T2 ON T1.id = T2.liked_id GROUP BY T1.id Gold: SELECT T2.name, COUNT(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id Type: JOIN, GROUP_BY, AGGREGATION [560] WRONG_TABLE | DB: network_1 | EX: β Q : What is the name of the high schooler who has the greatest number of likes Pred: SELECT T1.name FROM highschooler AS T1 JOIN likes AS T2 ON T1.id = T2.liked_id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [561] OTHER | DB: network_1 | EX: β Q : Give the name of the student with the most likes Pred: SELECT T2.name FROM likes AS T1 JOIN student AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [562] OTHER | DB: network_1 | EX: β Q : Show the names of students who have at least 2 likes Pred: SELECT T2.name FROM likes AS T1 JOIN student AS T2 ON T1.student_id = T2.id GROUP BY T2.student_id HAVING COUNT(*) >= 2 Gold: SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING COUNT(*) >= 2 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [563] OTHER | DB: network_1 | EX: β Q : What are the names of students who have 2 or more likes Pred: SELECT T2.name FROM likes AS T1 JOIN student AS T2 ON T1.student_id = T2.id GROUP BY T2.student_id HAVING COUNT(*) >= 2 Gold: SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING COUNT(*) >= 2 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [564] WRONG_TABLE | DB: network_1 | EX: β Q : Show the names of students who have a grade higher than 5 and have at least 2 friends Pred: SELECT T2.name FROM highschooler AS T1 JOIN friend AS T2 ON T1.id = T2.friend_id JOIN student AS T3 ON T1.id = T3.student_id WHERE T1.grade > 5 GROUP BY T3.id HAVING COUNT(*) >= 2 Gold: SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.grade > 5 GROUP BY T1.student_id HAVING COUNT(*) >= 2 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [565] WRONG_TABLE | DB: network_1 | EX: β Q : What are the names of high schoolers who have a grade of over 5 and have 2 or more friends Pred: SELECT T2.name FROM highschooler AS T1 JOIN friend AS T2 ON T1.id = T2.friend_id WHERE T1.grade > 5 GROUP BY T2.name HAVING COUNT(*) >= 2 Gold: SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.grade > 5 GROUP BY T1.student_id HAVING COUNT(*) >= 2 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [566] OTHER | DB: network_1 | EX: β Q : How many likes does Kyle have Pred: SELECT COUNT(*) FROM likes AS T1 JOIN student AS T2 ON T1.student_id = T2.id WHERE T2.name = "Kyle" Gold: SELECT COUNT(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = "Kyle" Type: JOIN, AGGREGATION [567] OTHER | DB: network_1 | EX: β Q : Return the number of likes that the high schooler named Kyle has Pred: SELECT COUNT(*) FROM likes AS T1 JOIN highschooler AS T2 ON T1.id = T2.highschooler_id WHERE T2.name = "Kyle" Gold: SELECT COUNT(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = "Kyle" Type: JOIN, AGGREGATION [568] WRONG_TABLE | DB: network_1 | EX: β Q : Find the average grade of all students who have some friends Pred: SELECT AVG(T2.grade) FROM highschooler AS T1 JOIN friend AS T2 ON T1.id = T2.friend_id Gold: SELECT AVG(grade) FROM Highschooler WHERE id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id) Type: JOIN, NESTED, AGGREGATION [569] WRONG_TABLE | DB: network_1 | EX: β Q : What is the average grade of students who have friends Pred: SELECT AVG(T2.grade) FROM highschooler AS T1 JOIN friend AS T2 ON T1.id = T2.friend_id Gold: SELECT AVG(grade) FROM Highschooler WHERE id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id) Type: JOIN, NESTED, AGGREGATION [570] MISSING_JOIN | DB: network_1 | EX: β Q : Find the minimum grade of students who have no friends Pred: SELECT MIN(grade) FROM highschooler WHERE NOT student_id IN (SELECT student_id FROM friend) Gold: SELECT MIN(grade) FROM Highschooler WHERE NOT id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id) Type: JOIN, NESTED, AGGREGATION [571] WRONG_TABLE | DB: network_1 | EX: β Q : What is the lowest grade of students who do not have any friends Pred: SELECT MIN(grade) FROM student WHERE NOT student_id IN (SELECT student_id FROM friend) Gold: SELECT MIN(grade) FROM Highschooler WHERE NOT id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id) Type: JOIN, NESTED, AGGREGATION [572] OTHER | DB: dog_kennels | EX: β Q : Which states have both owners and professionals living there Pred: SELECT state FROM professionals INTERSECT SELECT state FROM owners GROUP BY state Gold: SELECT state FROM Owners INTERSECT SELECT state FROM Professionals Type: SIMPLE [573] OTHER | DB: dog_kennels | EX: β Q : Find the states where both owners and professionals live Pred: SELECT state FROM professionals INTERSECT SELECT state FROM owners Gold: SELECT state FROM Owners INTERSECT SELECT state FROM Professionals Type: SIMPLE [574] WRONG_TABLE | DB: dog_kennels | EX: β Q : What is the average age of the dogs who have gone through any treatments Pred: SELECT AVG(T2.age) FROM treatments AS T1 JOIN dogs AS T2 ON T1.dog_id = T2.dog_id Gold: SELECT AVG(age) FROM Dogs WHERE dog_id IN (SELECT dog_id FROM Treatments) Type: NESTED, AGGREGATION [575] WRONG_TABLE | DB: dog_kennels | EX: β Q : Find the average age of the dogs who went through treatments Pred: SELECT AVG(T2.age) FROM treatments AS T1 JOIN dogs AS T2 ON T1.dog_id = T2.dog_id Gold: SELECT AVG(age) FROM Dogs WHERE dog_id IN (SELECT dog_id FROM Treatments) Type: NESTED, AGGREGATION [576] WRONG_COLUMNS | DB: dog_kennels | EX: β Q : Which professionals live in the state of Indiana or have done treatment on more than 2 treatments? List his or her id, last name and cell phone Pred: SELECT T1.professional_id, T1.last_name, T1.cell_number FROM professionals AS T1 JOIN treatments AS T2 ON T1.professional_id = T2.professional_id WHERE T1.state = "Indiana" GROUP BY T1.professional_id HAVING COUNT(*) > 2 Gold: SELECT professional_id, last_name, cell_number FROM Professionals WHERE state = 'Indiana' UNION SELECT T1.professional_id, T1.last_name, T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING COUNT(*) > 2 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [577] WRONG_COLUMNS | DB: dog_kennels | EX: β Q : Find the id, last name and cell phone of the professionals who live in the state of Indiana or have performed more than two treatments Pred: SELECT T1.professional_id, T1.last_name, T1.cell_number FROM professionals AS T1 JOIN treatments AS T2 ON T1.professional_id = T2.professional_id WHERE T1.state = "Indiana" GROUP BY T1.professional_id HAVING COUNT(*) > 2 Gold: SELECT professional_id, last_name, cell_number FROM Professionals WHERE state = 'Indiana' UNION SELECT T1.professional_id, T1.last_name, T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING COUNT(*) > 2 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [578] WRONG_TABLE | DB: dog_kennels | EX: β Q : Which dogs have not cost their owner more than 1000 for treatment ? List the dog names Pred: SELECT name FROM dogs EXCEPT SELECT T1.name FROM dogs AS T1 JOIN treatments AS T2 ON T1.dog_id = T2.dog_id GROUP BY T1.name HAVING SUM(T2.cost_of_treatment) > 1000 Gold: SELECT name FROM dogs WHERE NOT dog_id IN (SELECT dog_id FROM treatments GROUP BY dog_id HAVING SUM(cost_of_treatment) > 1000) Type: GROUP_BY, HAVING, NESTED, AGGREGATION [579] WRONG_TABLE | DB: dog_kennels | EX: β Q : What are the names of the dogs for which the owner has not spend more than 1000 for treatment Pred: SELECT T2.name FROM owners AS T1 JOIN dogs AS T2 ON T1.owner_id = T2.owner_id GROUP BY T1.owner_id HAVING SUM(T1.cost_of_treatment) > 1000 Gold: SELECT name FROM dogs WHERE NOT dog_id IN (SELECT dog_id FROM treatments GROUP BY dog_id HAVING SUM(cost_of_treatment) > 1000) Type: GROUP_BY, HAVING, NESTED, AGGREGATION [580] WRONG_COLUMNS | DB: dog_kennels | EX: β Q : Which first names are used for professionals or owners but are not used as dog names Pred: SELECT first_name FROM professionals UNION SELECT first_name FROM owners EXCEPT SELECT first_name FROM dogs Gold: SELECT first_name FROM Professionals UNION SELECT first_name FROM Owners EXCEPT SELECT name FROM Dogs Type: SIMPLE [581] WRONG_COLUMNS | DB: dog_kennels | EX: β Q : Find the first names that are used for professionals or owners but are not used as dog names Pred: SELECT first_name FROM professionals UNION SELECT first_name FROM owners EXCEPT SELECT first_name FROM dogs Gold: SELECT first_name FROM Professionals UNION SELECT first_name FROM Owners EXCEPT SELECT name FROM Dogs Type: SIMPLE [582] WRONG_TABLE | DB: dog_kennels | EX: β Q : Which professional did not operate any treatment on dogs? List the professional's id, role and email Pred: SELECT professional_id, role_code, email_address FROM professionals WHERE NOT professional_id IN (SELECT professional_id FROM treatments) Gold: SELECT professional_id, role_code, email_address FROM Professionals EXCEPT SELECT T1.professional_id, T1.role_code, T1.email_address FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id Type: JOIN [583] WRONG_COLUMNS | DB: dog_kennels | EX: β Q : Give me the id, role and email of the professionals who did not perform any treatment on dogs Pred: SELECT professional_id, role_code, email_address FROM professionals EXCEPT SELECT T1.professional_id, T1.role_code FROM professionals AS T1 JOIN treatments AS T2 ON T1.professional_id = T2.professional_id WHERE T2.dog_id = 1 Gold: SELECT professional_id, role_code, email_address FROM Professionals EXCEPT SELECT T1.professional_id, T1.role_code, T1.email_address FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id Type: JOIN [584] WRONG_TABLE | DB: dog_kennels | EX: β Q : Which owner owns the most dogs? List the owner id, first name and last name Pred: SELECT T1.owner_id, T2.first_name, T2.last_name FROM owners AS T1 JOIN dogs AS T2 ON T1.owner_id = T2.owner_id GROUP BY T1.owner_id ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T1.owner_id, T2.first_name, T2.last_name FROM Dogs AS T1 JOIN Owners AS T2 ON T1.owner_id = T2.owner_id GROUP BY T1.owner_id ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [585] WRONG_TABLE | DB: dog_kennels | EX: β Q : Return the owner id, first name and last name of the owner who has the most dogs Pred: SELECT T1.owner_id, T2.first_name, T2.last_name FROM owners AS T1 JOIN dogs AS T2 ON T1.owner_id = T2.owner_id GROUP BY T1.owner_id ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T1.owner_id, T2.first_name, T2.last_name FROM Dogs AS T1 JOIN Owners AS T2 ON T1.owner_id = T2.owner_id GROUP BY T1.owner_id ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [586] WRONG_TABLE | DB: dog_kennels | EX: β Q : Which professionals have done at least two treatments? List the professional's id, role, and first name Pred: SELECT T1.professional_id, T1.role_code, T2.first_name FROM treatments AS T1 JOIN professionals AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING COUNT(*) >= 2 Gold: SELECT T1.professional_id, T1.role_code, T1.first_name FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING COUNT(*) >= 2 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [587] WRONG_COLUMNS | DB: dog_kennels | EX: β Q : What are the id, role, and first name of the professionals who have performed two or more treatments Pred: SELECT T1.professional_id, T1.role_code, T2.first_name FROM professionals AS T1 JOIN treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING COUNT(*) >= 2 Gold: SELECT T1.professional_id, T1.role_code, T1.first_name FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING COUNT(*) >= 2 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [588] MISSING_JOIN | DB: dog_kennels | EX: β Q : What is the name of the breed with the most dogs Pred: SELECT breed_name FROM breeds GROUP BY breed_code ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T1.breed_name FROM Breeds AS T1 JOIN Dogs AS T2 ON T1.breed_code = T2.breed_code GROUP BY T1.breed_name ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [589] WRONG_TABLE | DB: dog_kennels | EX: β Q : Which breed do the most dogs have? Give me the breed name Pred: SELECT breed_name FROM dogs GROUP BY breed_code ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T1.breed_name FROM Breeds AS T1 JOIN Dogs AS T2 ON T1.breed_code = T2.breed_code GROUP BY T1.breed_name ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [590] WRONG_COLUMNS | DB: dog_kennels | EX: β Q : Which owner has paid for the most treatments on his or her dogs? List the owner id and last name Pred: SELECT T1.owner_id, T2.last_name FROM owners AS T1 JOIN treatments AS T2 ON T1.owner_id = T2.owner_id GROUP BY T1.owner_id ORDER BY COUNT(*) DESC LIMIT 1 Gold: SELECT T1.owner_id, T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [591] OTHER | DB: dog_kennels | EX: β Q : Tell me the owner id and last name of the owner who spent the most on treatments of his or her dogs Pred: SELECT T1.owner_id, T1.last_name FROM owners AS T1 JOIN treatments AS T2 ON T1.owner_id = T2.owner_id GROUP BY T1.owner_id ORDER BY SUM(T2.cost_of_treatment) DESC LIMIT 1 Gold: SELECT T1.owner_id, T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY COUNT(*) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [592] OTHER | DB: dog_kennels | EX: β Q : What is the description of the treatment type that costs the least money in total Pred: SELECT T1.treatment_type_description FROM treatment_types AS T1 JOIN charges AS T2 ON T1.treatment_type_code = T2.treatment_type_code GROUP BY T1.treatment_type_code ORDER BY SUM(T2.charge_amount) ASC LIMIT 1 Gold: SELECT T1.treatment_type_description FROM Treatment_types AS T1 JOIN Treatments AS T2 ON T1.treatment_type_code = T2.treatment_type_code GROUP BY T1.treatment_type_code ORDER BY SUM(cost_of_treatment) ASC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [593] OTHER | DB: dog_kennels | EX: β Q : Give me the description of the treatment type whose total cost is the lowest Pred: SELECT T1.treatment_type_description FROM treatment_types AS T1 JOIN charges AS T2 ON T1.treatment_type_code = T2.treatment_type_code GROUP BY T1.treatment_type_code ORDER BY SUM(T2.cost_of_treatment) ASC LIMIT 1 Gold: SELECT T1.treatment_type_description FROM Treatment_types AS T1 JOIN Treatments AS T2 ON T1.treatment_type_code = T2.treatment_type_code GROUP BY T1.treatment_type_code ORDER BY SUM(cost_of_treatment) ASC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [594] OTHER | DB: dog_kennels | EX: β Q : Which owner has paid the largest amount of money in total for their dogs? Show the owner id and zip code Pred: SELECT T1.owner_id, T1.zip_code FROM owners AS T1 JOIN charges AS T2 ON T1.owner_id = T2.owner_id GROUP BY T1.owner_id ORDER BY SUM(T2.charge_amount) DESC LIMIT 1 Gold: SELECT T1.owner_id, T1.zip_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY SUM(T3.cost_of_treatment) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [595] OTHER | DB: dog_kennels | EX: β Q : Find the owner id and zip code of the owner who spent the most money in total for his or her dogs Pred: SELECT T1.owner_id, T1.zip_code FROM owners AS T1 JOIN charges AS T2 ON T1.owner_id = T2.owner_id GROUP BY T1.owner_id ORDER BY SUM(T2.charge_amount) DESC LIMIT 1 Gold: SELECT T1.owner_id, T1.zip_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY SUM(T3.cost_of_treatment) DESC LIMIT 1 Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, AGGREGATION [596] WRONG_TABLE | DB: dog_kennels | EX: β Q : Which professionals have done at least two types of treatments? List the professional id and cell phone Pred: SELECT T1.professional_id, T2.cell_number FROM treatments AS T1 JOIN professionals AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING COUNT(*) >= 2 Gold: SELECT T1.professional_id, T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING COUNT(*) >= 2 Type: JOIN, GROUP_BY, HAVING, AGGREGATION [597] WRONG_TABLE | DB: dog_kennels | EX: β Q : What are the first name and last name of the professionals who have done treatment with cost below average Pred: SELECT T2.first_name, T2.last_name FROM treatments AS T1 JOIN professionals AS T2 ON T1.professional_id = T2.professional_id WHERE T1.cost_of_treatment (SELECT AVG(cost_of_treatment) FROM treatments) Gold: SELECT DISTINCT T1.first_name, T1.last_name FROM Professionals AS T1 JOIN Treatments AS T2 ON TRUE WHERE cost_of_treatment < (SELECT AVG(cost_of_treatment) FROM Treatments) Type: JOIN, NESTED, AGGREGATION [598] WRONG_COLUMNS | DB: dog_kennels | EX: β Q : Which professionals have operated a treatment that costs less than the average? Give me theor first names and last names Pred: SELECT T1.first_name, T1.last_name FROM professionals AS T1 JOIN treatments AS T2 ON T1.professional_id = T2.professional_id WHERE T2.cost_of_treatment (SELECT AVG(cost_of_treatment) FROM treatments) Gold: SELECT DISTINCT T1.first_name, T1.last_name FROM Professionals AS T1 JOIN Treatments AS T2 ON TRUE WHERE cost_of_treatment < (SELECT AVG(cost_of_treatment) FROM Treatments) Type: JOIN, NESTED, AGGREGATION [599] WRONG_TABLE | DB: dog_kennels | EX: β Q : List the date of each treatment, together with the first name of the professional who operated it Pred: SELECT T1.date_of_treatment, T2.first_name FROM professionals AS T1 JOIN treatments AS T2 ON T1.professional_id = T2.professional_id Gold: SELECT T1.date_of_treatment, T2.first_name FROM Treatments AS T1 JOIN Professionals AS T2 ON T1.professional_id = T2.professional_id Type: JOIN [600] WRONG_TABLE | DB: dog_kennels | EX: β Q : What are the date and the operating professional's first name of each treatment Pred: SELECT date_of_treatment, first_name FROM professionals AS T1 JOIN treatments AS T2 ON T1.professional_id = T2.professional_id Gold: SELECT T1.date_of_treatment, T2.first_name FROM Treatments AS T1 JOIN Professionals AS T2 ON T1.professional_id = T2.professional_id Type: JOIN [601] WRONG_TABLE | DB: dog_kennels | EX: β Q : List each owner's first name, last name, and the size of his for her dog Pred: SELECT T2.first_name, T2.last_name, T2.size_code FROM dogs AS T1 JOIN owners AS T2 ON T1.owner_id = T2.owner_id JOIN sizes AS T3 ON T1.size_code = T3.size_code Gold: SELECT T1.first_name, T1.last_name, T2.size_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id Type: JOIN [602] WRONG_TABLE | DB: dog_kennels | EX: β Q : What are each owner's first name, last name, and the size of their dog Pred: SELECT T2.first_name, T2.last_name, T3.size_code FROM dogs AS T1 JOIN owners AS T2 ON T1.owner_id = T2.owner_id JOIN sizes AS T3 ON T1.size_code = T3.size_code Gold: SELECT T1.first_name, T1.last_name, T2.size_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id Type: JOIN [603] WRONG_TABLE | DB: dog_kennels | EX: β Q : List pairs of the owner's first name and the dogs's name Pred: SELECT T2.first_name, T2.last_name FROM dogs AS T1 JOIN owners AS T2 ON T1.owner_id = T2.owner_id Gold: SELECT T1.first_name, T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id Type: JOIN [604] WRONG_TABLE | DB: dog_kennels | EX: β Q : What are each owner's first name and their dogs's name Pred: SELECT T2.first_name, T2.last_name FROM dogs AS T1 JOIN owners AS T2 ON T1.owner_id = T2.owner_id Gold: SELECT T1.first_name, T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id Type: JOIN [605] MISSING_GROUP_BY | DB: dog_kennels | EX: β Q : List the names of the dogs of the rarest breed and the treatment dates of them Pred: SELECT T2.name, T1.date_of_treatment FROM dogs AS T1 JOIN treatments AS T2 ON T1.dog_id = T2.dog_id WHERE T1.breed_code = (SELECT breed_code FROM dogs AS T3 JOIN treatments AS T4 ON T3.treatment_type_code = T4.treatment_type_code WHERE breed_name = "rast") Gold: SELECT T1.name, T2.date_of_treatment FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id WHERE T1.breed_code = (SELECT breed_code FROM Dogs GROUP BY breed_code ORDER BY COUNT(*) ASC LIMIT 1) Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, NESTED, AGGREGATION [606] WRONG_TABLE | DB: dog_kennels | EX: β Q : Which dogs are of the rarest breed? Show their names and treatment dates Pred: SELECT T1.name, T2.date_of_treatment FROM dogs AS T1 JOIN treatments AS T2 ON T1.dog_id = T2.dog_id WHERE T1.breed_code = (SELECT breed_code FROM breeds AS T3 JOIN treatments AS T4 ON T3.breed_code = T4.breed_code ORDER BY T3.date_of_treatment DESC LIMIT 1) Gold: SELECT T1.name, T2.date_of_treatment FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id WHERE T1.breed_code = (SELECT breed_code FROM Dogs GROUP BY breed_code ORDER BY COUNT(*) ASC LIMIT 1) Type: JOIN, GROUP_BY, ORDER_BY, LIMIT, NESTED, AGGREGATION [607] WRONG_COLUMNS | DB: dog_kennels | EX: β Q : Which dogs are owned by someone who lives in Virginia? List the owner's first name and the dog's name Pred: SELECT T2.first_name, T2.name FROM owners AS T1 JOIN dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T1.state = "Virginia" Gold: SELECT T1.first_name, T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T1.state = 'Virginia' Type: JOIN [608] WRONG_COLUMNS | DB: dog_kennels | EX: β Q : Find the first names of owners living in Virginia and the names of dogs they own Pred: SELECT DISTINCT T1.first_name, T2.last_name FROM owners AS T1 JOIN dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T1.state = "Virginia" Gold: SELECT T1.first_name, T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T1.state = 'Virginia' Type: JOIN [609] MISSING_JOIN | DB: dog_kennels | EX: β Q : What are the arriving date and the departing date of the dogs who have gone through a treatment Pred: SELECT date_arrived, date_departed FROM dogs Gold: SELECT DISTINCT T1.date_arrived, T1.date_departed FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id Type: JOIN [610] WRONG_TABLE | DB: dog_kennels | EX: β Q : Find the arriving date and the departing date of the dogs that received a treatment Pred: SELECT date_arrived, date_departed FROM treatments Gold: SELECT DISTINCT T1.date_arrived, T1.date_departed FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id Type: JOIN [611] WRONG_TABLE | DB: dog_kennels | EX: β Q : List the last name of the owner owning the youngest dog Pred: SELECT last_name FROM owners ORDER BY age LIMIT 1 Gold: SELECT T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T2.age = (SELECT MAX(age) FROM Dogs) Type: JOIN, NESTED, AGGREGATION [612] WRONG_TABLE | DB: dog_kennels | EX: β Q : Who owns the youngest dog? Give me his or her last name Pred: SELECT last_name FROM dogs ORDER BY age LIMIT 1 Gold: SELECT T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T2.age = (SELECT MAX(age) FROM Dogs) Type: JOIN, NESTED, AGGREGATION [613] WRONG_COLUMNS | DB: dog_kennels | EX: β Q : How many dogs went through any treatments Pred: SELECT COUNT(*) FROM treatments Gold: SELECT COUNT(DISTINCT dog_id) FROM Treatments Type: AGGREGATION [614] WRONG_COLUMNS | DB: dog_kennels | EX: β Q : Count the number of dogs that went through a treatment Pred: SELECT COUNT(*) FROM treatments Gold: SELECT COUNT(DISTINCT dog_id) FROM Treatments Type: AGGREGATION [615] WRONG_TABLE | DB: dog_kennels | EX: β Q : How many professionals have performed any treatment to dogs Pred: SELECT COUNT(*) FROM treatments WHERE professional_id IN (SELECT professional_id FROM dogs) Gold: SELECT COUNT(DISTINCT professional_id) FROM Treatments Type: AGGREGATION [616] WRONG_COLUMNS | DB: dog_kennels | EX: β Q : Which professionals live in a city containing the substring 'West'? List his or her role, street, city and state Pred: SELECT role, street, city, state FROM Professionals WHERE city LIKE 'West%' Gold: SELECT role_code, street, city, state FROM professionals WHERE city LIKE '%West%' Type: SIMPLE [617] WRONG_COLUMNS | DB: dog_kennels | EX: β Q : Find the role, street, city and state of the professionals living in a city that contains the substring 'West' Pred: SELECT role, street, city, state FROM professionals WHERE city LIKE 'West%' Gold: SELECT role_code, street, city, state FROM professionals WHERE city LIKE '%West%' Type: SIMPLE [618] OTHER | DB: dog_kennels | EX: β Q : Which owners live in the state whose name contains the substring 'North'? List his first name, last name and email Pred: SELECT first_name, last_name, email_address FROM owners WHERE state LIKE 'North%' Gold: SELECT first_name, last_name, email_address FROM Owners WHERE state LIKE '%North%' Type: SIMPLE [619] OTHER | DB: dog_kennels | EX: β Q : How many dogs have an age below the average Pred: SELECT COUNT(*) FROM dogs WHERE age (SELECT AVG(age) FROM dogs) Gold: SELECT COUNT(*) FROM Dogs WHERE age < (SELECT AVG(age) FROM Dogs) Type: NESTED, AGGREGATION [620] OTHER | DB: dog_kennels | EX: β Q : Count the number of dogs of an age below the average Pred: SELECT COUNT(*) FROM dogs WHERE age (SELECT AVG(age) FROM dogs) Gold: SELECT COUNT(*) FROM Dogs WHERE age < (SELECT AVG(age) FROM Dogs) Type: NESTED, AGGREGATION [621] WRONG_TABLE | DB: dog_kennels | EX: β Q : How many owners temporarily do not have any dogs Pred: SELECT COUNT(*) FROM owners WHERE date_departed > "null" Gold: SELECT COUNT(*) FROM Owners WHERE NOT owner_id IN (SELECT owner_id FROM Dogs) Type: NESTED, AGGREGATION [622] OTHER | DB: dog_kennels | EX: β Q : List the dog name, age and weight of the dogs who have been abandoned? 1 stands for yes, and 0 stands for no Pred: SELECT name, age, weight FROM dogs WHERE abandoned_yn = 1 AND 0 = 0 Gold: SELECT name, age, weight FROM Dogs WHERE abandoned_yn = 1 Type: SIMPLE [623] OTHER | DB: dog_kennels | EX: β Q : What are the dog name, age and weight of the dogs that were abandoned? Note that 1 stands for yes, and 0 stands for no in the tables Pred: SELECT name, age, weight FROM dogs WHERE abandoned_yn = 1 UNION SELECT name, age, weight FROM dogs WHERE abandoned_yn = 0 Gold: SELECT name, age, weight FROM Dogs WHERE abandoned_yn = 1 Type: SIMPLE [624] WRONG_COLUMNS | DB: dog_kennels | EX: β Q : What is the age of the oldest dog Pred: SELECT age FROM dogs ORDER BY date_of_birth LIMIT 1 Gold: SELECT MAX(age) FROM Dogs Type: AGGREGATION [625] WRONG_COLUMNS | DB: dog_kennels | EX: β Q : Tell me the age of the oldest dog Pred: SELECT age FROM dogs ORDER BY date_of_birth LIMIT 1 Gold: SELECT MAX(age) FROM Dogs Type: AGGREGATION [626] OTHER | DB: dog_kennels | EX: β Q : How much does each charge type costs? List both charge type and amount Pred: SELECT charge_type, charge_amount FROM charges GROUP BY charge_type Gold: SELECT charge_type, charge_amount FROM Charges Type: SIMPLE [627] WRONG_COLUMNS | DB: dog_kennels | EX: β Q : How much does the most expensive charge type costs Pred: SELECT charge_amount FROM charges ORDER BY charge_type DESC LIMIT 1 Gold: SELECT MAX(charge_amount) FROM Charges Type: AGGREGATION [628] WRONG_COLUMNS | DB: dog_kennels | EX: β Q : What is the charge amount of the most expensive charge type Pred: SELECT charge_amount FROM charges ORDER BY charge_type DESC LIMIT 1 Gold: SELECT MAX(charge_amount) FROM Charges Type: AGGREGATION [629] WRONG_TABLE | DB: dog_kennels | EX: β Q : What are all the possible breed type and size type combinations Pred: SELECT DISTINCT breed_code, size_code FROM sizes Gold: SELECT DISTINCT breed_code, size_code FROM dogs Type: SIMPLE [630] WRONG_COLUMNS | DB: dog_kennels | EX: β Q : List the first name of all the professionals along with the description of the treatment they have done Pred: SELECT T1.first_name, T2.treatment_type_description FROM professionals AS T1 JOIN treatments AS T2 ON T1.professional_id = T2.professional_id Gold: SELECT DISTINCT T1.first_name, T3.treatment_type_description FROM professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id JOIN Treatment_types AS T3 ON T2.treatment_type_code = T3.treatment_type_code Type: JOIN [631] WRONG_COLUMNS | DB: dog_kennels | EX: β Q : What are each professional's first name and description of the treatment they have performed Pred: SELECT T1.first_name, T1.treatment_type_description FROM professionals AS T1 JOIN treatments AS T2 ON T1.professional_id = T2.professional_id Gold: SELECT DISTINCT T1.first_name, T3.treatment_type_description FROM professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id JOIN Treatment_types AS T3 ON T2.treatment_type_code = T3.treatment_type_code Type: JOIN [632] OTHER | DB: singer | EX: β Q : List the name of singers whose citizenship is not "France" Pred: SELECT Name FROM singer WHERE Citizenship > "France" Gold: SELECT Name FROM singer WHERE Citizenship <> "France" Type: SIMPLE [633] OTHER | DB: singer | EX: β Q : What are the names of the singers who are not French citizens Pred: SELECT Name FROM singer WHERE Citizenship > 'French' Gold: SELECT Name FROM singer WHERE Citizenship <> "France" Type: SIMPLE [634] EXTRA_JOIN | DB: singer | EX: β Q : What is the name of the singer who is worth the most Pred: SELECT T2.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID ORDER BY net_worth_millions DESC LIMIT 1 Gold: SELECT Name FROM singer ORDER BY Net_Worth_Millions DESC LIMIT 1 Type: ORDER_BY, LIMIT [635] WRONG_TABLE | DB: singer | EX: β Q : Show titles of songs and names of singers Pred: SELECT T3.Title, T2.Name FROM song AS T1 JOIN singer AS T2 ON T1.Singer_ID = T2.Singer_ID Gold: SELECT T2.Title, T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID Type: JOIN [636] WRONG_TABLE | DB: singer | EX: β Q : What are the song titles and singer names Pred: SELECT T2.Title, T1.Name FROM song AS T1 JOIN singer AS T2 ON T1.Singer_ID = T2.Singer_ID Gold: SELECT T2.Title, T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID Type: JOIN [637] MISSING_JOIN | DB: singer | EX: β Q : For each singer name, what is the total sales for their songs Pred: SELECT SUM(Sales) FROM singer Gold: SELECT T1.Name, SUM(T2.Sales) FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T1.Name Type: JOIN, GROUP_BY, AGGREGATION [638] WRONG_COLUMNS | DB: singer | EX: β Q : What is the sname of every sing that does not have any song Pred: SELECT name FROM singer WHERE NOT song_id IN (SELECT song_id FROM song) Gold: SELECT Name FROM singer WHERE NOT Singer_ID IN (SELECT Singer_ID FROM song) Type: NESTED [639] OTHER | DB: singer | EX: β Q : Show the citizenship shared by singers with birth year before 1945 and after 1955 Pred: SELECT Citizenship FROM singer WHERE Birth_year 1945 INTERSECT SELECT Citizenship FROM singer WHERE Birth_year > 1955 Gold: SELECT Citizenship FROM singer WHERE Birth_Year < 1945 INTERSECT SELECT Citizenship FROM singer WHERE Birth_Year > 1955 Type: SIMPLE [640] OTHER | DB: singer | EX: β Q : What are the citizenships that are shared by singers with a birth year before 1945 and after 1955 Pred: SELECT Citizenship FROM singer WHERE Birth_year 1945 INTERSECT SELECT Citizenship FROM singer WHERE Birth_year > 1955 Gold: SELECT Citizenship FROM singer WHERE Birth_Year < 1945 INTERSECT SELECT Citizenship FROM singer WHERE Birth_Year > 1955 Type: SIMPLE [641] WRONG_TABLE | DB: real_estate_properties | EX: β Q : What is the feature type name of feature AirCon Pred: SELECT T1.feature_type_name FROM Ref_Feature_Types AS T1 JOIN Ref_Feature_Types AS T2 ON T1.feature_type_code = T2.feature_type_code WHERE T2.feature_name = "AirCon" Gold: SELECT T2.feature_type_name FROM Other_Available_Features AS T1 JOIN Ref_Feature_Types AS T2 ON T1.feature_type_code = T2.feature_type_code WHERE T1.feature_name = "AirCon" Type: JOIN [642] WRONG_TABLE | DB: real_estate_properties | EX: β Q : Show the property type descriptions of properties belonging to that code Pred: SELECT T1.property_type_description FROM Ref_Property_Types AS T1 JOIN Properties AS T2 ON T1.property_type_code = T2.property_type_code Gold: SELECT T2.property_type_description FROM Properties AS T1 JOIN Ref_Property_Types AS T2 ON T1.property_type_code = T2.property_type_code GROUP BY T1.property_type_code Type: JOIN, GROUP_BY [643] OTHER | DB: real_estate_properties | EX: β Q : What are the names of properties that are either houses or apartments with more than 1 room Pred: SELECT property_name FROM Properties WHERE room_count > 1 AND property_name = 'House' OR room_count > 1 UNION SELECT property_name FROM Properties WHERE property_type_code = 'Apartment' Gold: SELECT property_name FROM Properties WHERE property_type_code = "House" UNION SELECT property_name FROM Properties WHERE property_type_code = "Apartment" AND room_count > 1 Type: SIMPLE |