File size: 194,442 Bytes
0791e78 |
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 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 |
[
{
"text": "[MUSIC PLAYING]",
"start": 0.0,
"duration": 4.9
},
{
"text": "CARTER ZENKE: Well, hello, one and all,\nand welcome to CS50's Introduction to",
"start": 17.65,
"duration": 4.08
},
{
"text": "Databases with SQL.",
"start": 21.73,
"duration": 1.8
},
{
"text": "My name is Carter Zenke.",
"start": 23.53,
"duration": 1.62
},
{
"text": "And in this course, you'll learn how to\nrepresent, how to organize and manage,",
"start": 25.15,
"duration": 4.77
},
{
"text": "and how to ask questions of\nthe data that's around you",
"start": 29.92,
"duration": 2.25
},
{
"text": "in your everyday life.",
"start": 32.17,
"duration": 2.2
},
{
"text": "But why learn those skills?",
"start": 34.37,
"duration": 2.24
},
{
"text": "Well, you may have heard we're living in\nthe information age, where we generate",
"start": 36.61,
"duration": 3.91
},
{
"text": "so much information, so much\ndata by virtue of interaction",
"start": 40.52,
"duration": 3.14
},
{
"text": "with computers and with each\nother over the internet.",
"start": 43.66,
"duration": 3.07
},
{
"text": "You might think of, let's say, Google\nkeeping track of the sites you click on",
"start": 46.73,
"duration": 3.89
},
{
"text": "or the sites you search for.",
"start": 50.62,
"duration": 1.65
},
{
"text": "You could think of maybe the smartphone\nin your pocket or the smartwatch",
"start": 52.27,
"duration": 3.36
},
{
"text": "on your wrist keeping track\nof health information, emails,",
"start": 55.63,
"duration": 3.13
},
{
"text": "text messages, and so on.",
"start": 58.76,
"duration": 1.98
},
{
"text": "You might even think\nof YouTube, where you",
"start": 60.74,
"duration": 2.15
},
{
"text": "might be watching this same\nvideo keeping track of all",
"start": 62.89,
"duration": 2.64
},
{
"text": "the videos on their platform,\nthe creators of those videos,",
"start": 65.53,
"duration": 2.94
},
{
"text": "and even the comment you\nmight leave on this video.",
"start": 68.47,
"duration": 3.72
},
{
"text": "So although, we're living in\nthis information age, where",
"start": 72.19,
"duration": 2.94
},
{
"text": "there is so much data,\nso much information,",
"start": 75.13,
"duration": 2.64
},
{
"text": "we can use these new tools,\nlike database and SQL,",
"start": 77.77,
"duration": 2.43
},
{
"text": "to interact with that information\nto store it and manage it.",
"start": 80.2,
"duration": 3.718
},
{
"text": "And although we're using\nsome of these new tools,",
"start": 83.918,
"duration": 2.042
},
{
"text": "some of the other concepts we'll\nlearn aren't actually so new.",
"start": 85.96,
"duration": 3.6
},
{
"text": "So here is a diagram from\nliterally a few thousand years ago.",
"start": 89.56,
"duration": 5.13
},
{
"text": "And notice how this diagram\nhas rows and columns.",
"start": 94.69,
"duration": 4.71
},
{
"text": "And this seems to store the\nstipends for workers at a temple",
"start": 99.4,
"duration": 3.87
},
{
"text": "some few thousand years ago.",
"start": 103.27,
"duration": 1.9
},
{
"text": "So given what you know based on your\nprior knowledge, what kind of name",
"start": 105.17,
"duration": 5.03
},
{
"text": "might you give this diagram\nwith rows and with columns?",
"start": 110.2,
"duration": 4.83
},
{
"text": "What can we give a name to for this?",
"start": 115.03,
"duration": 3.09
},
{
"text": "So I'm seeing some ideas of a table,\nperhaps a spreadsheet as well.",
"start": 118.12,
"duration": 4.41
},
{
"text": "For our purposes, we'll\ncall this a table, where",
"start": 122.53,
"duration": 2.73
},
{
"text": "a table stores some set of information.",
"start": 125.26,
"duration": 2.999
},
{
"text": "And every row in that\ntable stores one item",
"start": 128.259,
"duration": 4.111
},
{
"text": "in that set, where every column\nhas some piece of information",
"start": 132.37,
"duration": 3.39
},
{
"text": "about that item, some\nattribute of that item.",
"start": 135.76,
"duration": 2.83
},
{
"text": "So here, for example, we do have\na table of workers at a temple.",
"start": 138.59,
"duration": 3.95
},
{
"text": "Every row is one worker.",
"start": 142.54,
"duration": 2.25
},
{
"text": "And every column is their\nstipend for a particular month.",
"start": 144.79,
"duration": 4.42
},
{
"text": "So I could take this idea of a\ntable, this very ancient idea,",
"start": 149.21,
"duration": 3.8
},
{
"text": "and apply it to a more modern context.",
"start": 153.01,
"duration": 2.65
},
{
"text": "So let's say I'm a\nlibrarian, for instance.",
"start": 155.66,
"duration": 3.15
},
{
"text": "I want to organize my library.",
"start": 158.81,
"duration": 2.42
},
{
"text": "Well, here I have book\ntitles and authors.",
"start": 161.23,
"duration": 3.3
},
{
"text": "And I could certainly use a\ntable to store this information.",
"start": 164.53,
"duration": 2.88
},
{
"text": "But how might you propose\nI store this information?",
"start": 167.41,
"duration": 3.96
},
{
"text": "What could I do with my\nrows and with my columns",
"start": 171.37,
"duration": 3.27
},
{
"text": "if I have book titles and book authors?",
"start": 174.64,
"duration": 3.66
},
{
"text": "I see one thing I could do is probably\norganize my titles and my authors",
"start": 178.3,
"duration": 5.1
},
{
"text": "next to each other like this.",
"start": 183.4,
"duration": 1.778
},
{
"text": "I could take my titles to my authors,\nput them right next together.",
"start": 185.178,
"duration": 2.792
},
{
"text": "So I have Song of\nSolomon by Toni Morrison,",
"start": 187.97,
"duration": 2.45
},
{
"text": "Goodnight Moon by Margaret Wise Brown.",
"start": 190.42,
"duration": 1.89
},
{
"text": "And notice hear how\neach book is one row.",
"start": 192.31,
"duration": 3.67
},
{
"text": "But every row has two columns worth two\npieces of information for each book.",
"start": 195.98,
"duration": 5.66
},
{
"text": "I have a title for one column\nand an author for the other.",
"start": 201.64,
"duration": 4.33
},
{
"text": "And so together, I have a table of\nbooks where every column tells me",
"start": 205.97,
"duration": 3.98
},
{
"text": "one piece of information.",
"start": 209.95,
"duration": 1.26
},
{
"text": "And every row tells me\none book in this data set.",
"start": 211.21,
"duration": 5.23
},
{
"text": "So thankfully, now that we're\nliving in this information age,",
"start": 216.44,
"duration": 4.01
},
{
"text": "we no longer have to use stone\ntablets or perhaps pencil and paper",
"start": 220.45,
"duration": 5.31
},
{
"text": "to store our tables.",
"start": 225.76,
"duration": 1.35
},
{
"text": "We have software now like Apple Numbers,\nGoogle Sheets, and Microsoft Excel.",
"start": 227.11,
"duration": 4.44
},
{
"text": "But this isn't a course on Apple\nNumbers or Microsoft Excel or so on.",
"start": 231.55,
"duration": 5.5
},
{
"text": "It's actually a course\non databases and on SQL.",
"start": 237.05,
"duration": 3.29
},
{
"text": "So feel free to raise your\nhand if you'd like, but why",
"start": 240.34,
"duration": 3.63
},
{
"text": "would we decide to move\nalong from these spreadsheet",
"start": 243.97,
"duration": 3.39
},
{
"text": "softwares towards a database?",
"start": 247.36,
"duration": 3.06
},
{
"text": "What might that database give us\nthat a spreadsheet might not give us?",
"start": 250.42,
"duration": 4.2
},
{
"text": "So I'm seeing a few ideas here and\namong them are some simplicity,",
"start": 254.62,
"duration": 3.719
},
{
"text": "some ability to organize some data.",
"start": 258.339,
"duration": 2.506
},
{
"text": "But there are a few\nother ideas which I think",
"start": 260.845,
"duration": 1.875
},
{
"text": "about too for why we might move beyond\nspreadsheets and go towards databases.",
"start": 262.72,
"duration": 4.02
},
{
"text": "Now one of these is this idea of scale.",
"start": 266.74,
"duration": 2.79
},
{
"text": "So let's say you are a\nGoogle or an Instagram.",
"start": 269.53,
"duration": 3.3
},
{
"text": "You're trying to store\nnot just tens of thousands",
"start": 272.83,
"duration": 2.28
},
{
"text": "of users or hundreds of\nthousands but literally",
"start": 275.11,
"duration": 2.04
},
{
"text": "millions of users or billions of users.",
"start": 277.15,
"duration": 2.7
},
{
"text": "And with that kind of scale may\nbe better served by a database",
"start": 279.85,
"duration": 3.6
},
{
"text": "to store that much information.",
"start": 283.45,
"duration": 2.8
},
{
"text": "Another reason to move from\nspreadsheets to databases",
"start": 286.25,
"duration": 3.65
},
{
"text": "is the idea of being able to\nupdate data more frequently.",
"start": 289.9,
"duration": 3.27
},
{
"text": "Maybe you're a Twitter\nof the world, and you're",
"start": 293.17,
"duration": 2.01
},
{
"text": "trying to have others tweet\nmultiple times per second.",
"start": 295.18,
"duration": 2.88
},
{
"text": "Well, a database can handle\nthat kind of capacity",
"start": 298.06,
"duration": 2.85
},
{
"text": "much better than a\nspreadsheet could alone.",
"start": 300.91,
"duration": 3.15
},
{
"text": "And a third reason to move\nbeyond this might be speed.",
"start": 304.06,
"duration": 4.12
},
{
"text": "Let's say I'm trying to look up some\npiece of information in my database.",
"start": 308.18,
"duration": 3.63
},
{
"text": "Well, I could do that much\nfaster with a database",
"start": 311.81,
"duration": 2.51
},
{
"text": "than I could with a spreadsheet.",
"start": 314.32,
"duration": 1.35
},
{
"text": "You could think of yourself using\nCommand-F or Control-F to find",
"start": 315.67,
"duration": 2.73
},
{
"text": "a piece of information\nin your spreadsheet,",
"start": 318.4,
"duration": 1.86
},
{
"text": "going one by one through the rows.",
"start": 320.26,
"duration": 2.07
},
{
"text": "A database gives you\naccess to more kinds",
"start": 322.33,
"duration": 2.22
},
{
"text": "of algorithms you could use to search\nthis data much faster, ultimately.",
"start": 324.55,
"duration": 3.99
},
{
"text": "So these three reasons,\namong others, are",
"start": 328.54,
"duration": 2.73
},
{
"text": "those might want to move beyond\nspreadsheets and start using databases.",
"start": 331.27,
"duration": 4.95
},
{
"text": "Now, it's worth thinking\nfirst, what is a database?",
"start": 336.22,
"duration": 4.217
},
{
"text": "We'll be talking about databases\nthroughout this course.",
"start": 340.437,
"duration": 2.333
},
{
"text": "So what is a database?",
"start": 342.77,
"duration": 1.76
},
{
"text": "Well, a database is simply some\nway to organize your data such",
"start": 344.53,
"duration": 3.9
},
{
"text": "that you can actually create data,\nupdate data, read data, and delete",
"start": 348.43,
"duration": 5.64
},
{
"text": "data.",
"start": 354.07,
"duration": 0.51
},
{
"text": "And often these our for interactions\nthat we'll do with a database--",
"start": 354.58,
"duration": 3.18
},
{
"text": "like adding some data, looking at data,\ndeleting data, and even updating it",
"start": 357.76,
"duration": 4.41
},
{
"text": "along the way.",
"start": 362.17,
"duration": 1.38
},
{
"text": "But the database isn't the\nonly thing in our picture here.",
"start": 363.55,
"duration": 3.09
},
{
"text": "We also have a database\nmanagement system,",
"start": 366.64,
"duration": 3.075
},
{
"text": "a way to interact with our database.",
"start": 369.715,
"duration": 3.465
},
{
"text": "So you might think of perhaps\nwriting a program on your computer.",
"start": 373.18,
"duration": 4.17
},
{
"text": "You have some interface\nwith to write that program,",
"start": 377.35,
"duration": 2.16
},
{
"text": "like VS Code for instance.",
"start": 379.51,
"duration": 1.74
},
{
"text": "Or you might think of your own\ndesktop on your own computer.",
"start": 381.25,
"duration": 2.61
},
{
"text": "You have icons that you interact\nwith the underlying operating system.",
"start": 383.86,
"duration": 3.48
},
{
"text": "In the same way, we can use this\nsoftware called a database management",
"start": 387.34,
"duration": 4.32
},
{
"text": "system, or a DBMS for short, to\ninteract with a database perhaps",
"start": 391.66,
"duration": 3.78
},
{
"text": "using a graphical interface or\nusing a textual language too.",
"start": 395.44,
"duration": 5.03
},
{
"text": "Now, there are a few varieties\nof database management softwares.",
"start": 400.47,
"duration": 5.555
},
{
"text": "And these are a few of them here.",
"start": 406.025,
"duration": 1.375
},
{
"text": "MySQL, Oracle, PostgreSQL, and SQLite.",
"start": 407.4,
"duration": 3.84
},
{
"text": "But this is a non-exhaustive list.",
"start": 411.24,
"duration": 2.2
},
{
"text": "So let me also ask again, what kinds\nof other database management systems",
"start": 413.44,
"duration": 4.25
},
{
"text": "have you perhaps heard of in this case?",
"start": 417.69,
"duration": 3.43
},
{
"text": "I'm seeing one for Microsoft\nAccess, perhaps, MongoDB.",
"start": 421.12,
"duration": 4.52
},
{
"text": "There are other kinds of softwares,\nother companies out there that make",
"start": 425.64,
"duration": 3.15
},
{
"text": "these ways to interact with a database.",
"start": 428.79,
"duration": 2.11
},
{
"text": "And this is, again,\na nonexhaustive list.",
"start": 430.9,
"duration": 2.54
},
{
"text": "Now, if you are a\ndatabase administrator,",
"start": 433.44,
"duration": 2.82
},
{
"text": "or maybe you're somebody who's making\na choice of which software to use,",
"start": 436.26,
"duration": 3.15
},
{
"text": "you have a few trade-offs to consider.",
"start": 439.41,
"duration": 2.14
},
{
"text": "Let's say you might think of one being\nproprietary, for instance, costing",
"start": 441.55,
"duration": 3.77
},
{
"text": "money to work with.",
"start": 445.32,
"duration": 1.41
},
{
"text": "What you get for that\nmoney is additional support",
"start": 446.73,
"duration": 2.52
},
{
"text": "to actually implement your own database.",
"start": 449.25,
"duration": 2.7
},
{
"text": "On the other hand, you might have\nopen source software or free software",
"start": 451.95,
"duration": 3.66
},
{
"text": "to use, stuff like\nPostgreSQL, MySQL, and SQLite.",
"start": 455.61,
"duration": 3.6
},
{
"text": "But the downside is you are then\nresponsible for actually implementing",
"start": 459.21,
"duration": 4.29
},
{
"text": "that database.",
"start": 463.5,
"duration": 2.17
},
{
"text": "Another thing to consider\ntoo is that maybe some",
"start": 465.67,
"duration": 3.29
},
{
"text": "are going to be heavier weight\nthan others, more fully featured",
"start": 468.96,
"duration": 3.39
},
{
"text": "as a consequence but perhaps\nheavier weight requiring",
"start": 472.35,
"duration": 2.34
},
{
"text": "more computation to run.",
"start": 474.69,
"duration": 1.83
},
{
"text": "You can think of those\nlike MySQL or PostgreSQL",
"start": 476.52,
"duration": 2.31
},
{
"text": "being a little bit heavier weight\nbut being more fully featured,",
"start": 478.83,
"duration": 3.78
},
{
"text": "whereas SQLite down below will be a\nlittle lighter weight, as the name",
"start": 482.61,
"duration": 3.63
},
{
"text": "might imply, but allow you\nto do most of the same work",
"start": 486.24,
"duration": 3.54
},
{
"text": "that these other softwares\ncould allow you to do as well.",
"start": 489.78,
"duration": 3.55
},
{
"text": "And in this course, we'll\nactually be using SQLite for you",
"start": 493.33,
"duration": 3.08
},
{
"text": "to work with your own databases.",
"start": 496.41,
"duration": 1.74
},
{
"text": "But gradually, we'll move on\nto MySQL and PostgreSQL too.",
"start": 498.15,
"duration": 6.25
},
{
"text": "So let me go ahead and talk\nabout then SQL in this case.",
"start": 504.4,
"duration": 4.78
},
{
"text": "You might notice that in each of\nthese, MySQL and PostgreSQL and SQLite,",
"start": 509.18,
"duration": 4.85
},
{
"text": "each of them have this\nidea of SQL in them.",
"start": 514.03,
"duration": 2.759
},
{
"text": "And SQL is that language that we'll\nuse to interact with our database.",
"start": 516.789,
"duration": 3.961
},
{
"text": "Now, let me ask, what does\nSQL stand for, perhaps?",
"start": 520.75,
"duration": 4.38
},
{
"text": "We talk about S-Q-L or SQL,\nbut what might SQL stand for?",
"start": 525.13,
"duration": 6.13
},
{
"text": "So I'm saying it stands for\nStructured Query Language,",
"start": 531.26,
"duration": 2.61
},
{
"text": "which is good if you already know\nthis, but not to worry if you don't.",
"start": 533.87,
"duration": 2.917
},
{
"text": "So SQL does stand for\nStructured Query Language.",
"start": 536.787,
"duration": 3.413
},
{
"text": "As we'll see in this\ncourse, it is structured.",
"start": 540.2,
"duration": 2.59
},
{
"text": "It does have some keywords you can\nuse to interact with the database.",
"start": 542.79,
"duration": 2.93
},
{
"text": "And it is a query language--\nit can be used to ask",
"start": 545.72,
"duration": 3.09
},
{
"text": "questions of data inside a database.",
"start": 548.81,
"duration": 4.3
},
{
"text": "We'll see that this is the language we\ncan use to create data, to read data,",
"start": 553.11,
"duration": 5.33
},
{
"text": "to update data, and delete\ndata all with SQL in this case.",
"start": 558.44,
"duration": 5.92
},
{
"text": "And our next thing will be to\ntalk about this idea of querying.",
"start": 564.36,
"duration": 3.99
},
{
"text": "So SQL is a query language,\nbut what can we do with SQL?",
"start": 568.35,
"duration": 4.48
},
{
"text": "Well, the first thing we\ncan do, we'll focus on first",
"start": 572.83,
"duration": 2.32
},
{
"text": "in this course is writing queries--",
"start": 575.15,
"duration": 2.16
},
{
"text": "trying to ask questions\nof data using SQL.",
"start": 577.31,
"duration": 3.96
},
{
"text": "Well, what kinds of\nquestions could we ask?",
"start": 581.27,
"duration": 2.46
},
{
"text": "Well, you might imagine perhaps working\nat an Instagram or a Facebook trying",
"start": 583.73,
"duration": 4.59
},
{
"text": "to work as an engineer to\nfigure out what kinds of posts",
"start": 588.32,
"duration": 2.97
},
{
"text": "are the most liked on your platform.",
"start": 591.29,
"duration": 1.99
},
{
"text": "That's a question you can answer\nwith databases and with SQL.",
"start": 593.28,
"duration": 3.77
},
{
"text": "You might also think of whether\nyour numbers of daily users",
"start": 597.05,
"duration": 3.45
},
{
"text": "are growing or shrinking if you\nwork at a startup for instance.",
"start": 600.5,
"duration": 3.09
},
{
"text": "Even maybe you might be working for some\na company like Spotify that could ask,",
"start": 603.59,
"duration": 3.94
},
{
"text": "how could we play songs that are\nlike those a user just played?",
"start": 607.53,
"duration": 4.04
},
{
"text": "This too is a question you can\nanswer with databases and with SQL.",
"start": 611.57,
"duration": 6.12
},
{
"text": "Now today, we'll be focusing\non this database of books.",
"start": 617.69,
"duration": 3.75
},
{
"text": "And in particular, books\nthat have been longlisted,",
"start": 621.44,
"duration": 3.06
},
{
"text": "quote, unquote, \"for the\nInternational Booker Prize.\"",
"start": 624.5,
"duration": 3.028
},
{
"text": "The International Booker\nPrize, if you're not familiar,",
"start": 627.528,
"duration": 2.292
},
{
"text": "is an award given to books\nwritten around the world",
"start": 629.82,
"duration": 2.75
},
{
"text": "by authors from many countries.",
"start": 632.57,
"duration": 1.68
},
{
"text": "And it's designed to award books\nof fiction particularly good",
"start": 634.25,
"duration": 4.35
},
{
"text": "in some cases.",
"start": 638.6,
"duration": 0.9
},
{
"text": "And every year, the\ncommittee selects 13 books",
"start": 639.5,
"duration": 3.54
},
{
"text": "to include on a longlist for\nconsideration for this prize.",
"start": 643.04,
"duration": 4.32
},
{
"text": "And our database then has\nfive years worth of longlists",
"start": 647.36,
"duration": 3.6
},
{
"text": "for the International\nBooker Prize inside of it.",
"start": 650.96,
"duration": 2.91
},
{
"text": "We could use this\ndatabase, perhaps, if we",
"start": 653.87,
"duration": 1.86
},
{
"text": "were a librarian trying to find books\nfor our library or even as a book",
"start": 655.73,
"duration": 4.95
},
{
"text": "reader, an avid reader myself\ntrying to find books to read that I",
"start": 660.68,
"duration": 2.94
},
{
"text": "could put on my own shelf overall.",
"start": 663.62,
"duration": 2.8
},
{
"text": "So we'll look at this database.",
"start": 666.42,
"duration": 2.13
},
{
"text": "But we'll need a few\ntools in our toolkit,",
"start": 668.55,
"duration": 2.03
},
{
"text": "metaphorically, to actually\ninteract with this database.",
"start": 670.58,
"duration": 3.07
},
{
"text": "And one of them is going\nto be Visual Studio Code.",
"start": 673.65,
"duration": 3.86
},
{
"text": "Visual Studio code is an IDE, integrated\ndevelopment environment, to write code",
"start": 677.51,
"duration": 4.95
},
{
"text": "and to edit files with.",
"start": 682.46,
"duration": 1.56
},
{
"text": "It's also often called VS Code.",
"start": 684.02,
"duration": 3.35
},
{
"text": "Now, in VS Code, we'll also be able to\nuse SQLite, this database management",
"start": 687.37,
"duration": 5.33
},
{
"text": "system, or a DBMS for short, to\nactually interact with that database.",
"start": 692.7,
"duration": 4.9
},
{
"text": "So we'll be using these\ntwo tools combined",
"start": 697.6,
"duration": 2.18
},
{
"text": "to work with the database of longlisted\nbooks for the International Booker",
"start": 699.78,
"duration": 4.32
},
{
"text": "Prize.",
"start": 704.1,
"duration": 1.42
},
{
"text": "And although we'll be using it here,\nSQLite is not just used in this course.",
"start": 705.52,
"duration": 4.02
},
{
"text": "It's used in a variety of applications.",
"start": 709.54,
"duration": 2.4
},
{
"text": "You could think too\nof phone applications,",
"start": 711.94,
"duration": 2.16
},
{
"text": "where SQLite is often used on those\ndevices have much lower memory.",
"start": 714.1,
"duration": 4.44
},
{
"text": "You could think too of it being\nused on desktop applications",
"start": 718.54,
"duration": 3.6
},
{
"text": "to simplify the process\nof storing data there too.",
"start": 722.14,
"duration": 3.18
},
{
"text": "You could even think of\nit being used on websites",
"start": 725.32,
"duration": 2.67
},
{
"text": "to help store information that user\nsubmits via a form, for example.",
"start": 727.99,
"duration": 4.9
},
{
"text": "So we'll jump into using\nSQLite, but keep in mind",
"start": 732.89,
"duration": 2.87
},
{
"text": "that not just in this\ncourse you'll use it,",
"start": 735.76,
"duration": 2.58
},
{
"text": "but also, it's used in a variety\nof applications here too.",
"start": 738.34,
"duration": 4.84
},
{
"text": "So why don't we just jump right into\nthings and start using our environment",
"start": 743.18,
"duration": 4.35
},
{
"text": "and start using SQLite?",
"start": 747.53,
"duration": 1.32
},
{
"text": "So I'll go over here to my computer\nand will open up, let's say, VS Code.",
"start": 748.85,
"duration": 5.64
},
{
"text": "We're here.",
"start": 754.49,
"duration": 0.84
},
{
"text": "You can see I have my\nterminal environment.",
"start": 755.33,
"duration": 2.4
},
{
"text": "And if you're familiar,\nyou can type things like ls",
"start": 757.73,
"duration": 2.46
},
{
"text": "to see the files that are\nin your current folder.",
"start": 760.19,
"duration": 2.92
},
{
"text": "So I'll type ls right here.",
"start": 763.11,
"duration": 1.7
},
{
"text": "And I'll see this database\ncalled longlist.db.",
"start": 764.81,
"duration": 3.99
},
{
"text": "Again, working with books that\nhave been longlisted or considered",
"start": 768.8,
"duration": 3.57
},
{
"text": "for the International Booker Prize.",
"start": 772.37,
"duration": 2.55
},
{
"text": "So if I want to open up this\nfile, I can use this command.",
"start": 774.92,
"duration": 5.46
},
{
"text": "Then this command is going\nto be called SQLite 3.",
"start": 780.38,
"duration": 4.53
},
{
"text": "Or I can take some file that I\nhave, like longlist.db, and open",
"start": 784.91,
"duration": 4.68
},
{
"text": "it using this program called SQLite 3.",
"start": 789.59,
"duration": 3.09
},
{
"text": "Well, it's called SQLite 3 because\nthis is the third version of the SQLite",
"start": 792.68,
"duration": 4.02
},
{
"text": "software.",
"start": 796.7,
"duration": 1.17
},
{
"text": "So let's try this in our terminal.",
"start": 797.87,
"duration": 2.49
},
{
"text": "I'll go back over here, and\nI'll say sqlite3 longlist.db.",
"start": 800.36,
"duration": 6.75
},
{
"text": "And now, I'll hit Enter.",
"start": 807.11,
"duration": 2.07
},
{
"text": "And notice how my\nterminal prompt changes.",
"start": 809.18,
"duration": 2.83
},
{
"text": "It's no longer dollar sign.",
"start": 812.01,
"duration": 1.46
},
{
"text": "It now says sqlite in front.",
"start": 813.47,
"duration": 2.49
},
{
"text": "This means I'm inside of\nmy SQLite environment.",
"start": 815.96,
"duration": 3.88
},
{
"text": "So to clear things up, let\nme just clear my terminal.",
"start": 819.84,
"duration": 3.06
},
{
"text": "I can use Control-L for this.",
"start": 822.9,
"duration": 1.88
},
{
"text": "And now I have just that prompt up top.",
"start": 824.78,
"duration": 3.27
},
{
"text": "And now a question I want to\nanswer in this case first is, what",
"start": 828.05,
"duration": 3.99
},
{
"text": "data do I actually have in my database?",
"start": 832.04,
"duration": 3.48
},
{
"text": "What data is actually here for me to\nlook at and to ask questions about?",
"start": 835.52,
"duration": 5.13
},
{
"text": "Now, for this question, I\ncan use my very first SQL",
"start": 840.65,
"duration": 3.87
},
{
"text": "keyword, which will be called SELECT.",
"start": 844.52,
"duration": 2.58
},
{
"text": "So SELECT is a way for me to select some\nrows in a table inside of my database.",
"start": 847.1,
"duration": 6.27
},
{
"text": "Using SELECT, I can\nget back certain rows",
"start": 853.37,
"duration": 2.52
},
{
"text": "or, in this case, perhaps all of them\njust to get a taste of what's inside.",
"start": 855.89,
"duration": 4.12
},
{
"text": "So let's try using SELECT on\nthis database to understand",
"start": 860.01,
"duration": 3.2
},
{
"text": "what rows we have in our table here.",
"start": 863.21,
"duration": 3.34
},
{
"text": "Let me go back to my computer\nand to my SQLite environment.",
"start": 866.55,
"duration": 3.89
},
{
"text": "And I will try this\nvery first SQL keyword.",
"start": 870.44,
"duration": 3.48
},
{
"text": "I'll say SELECT.",
"start": 873.92,
"duration": 1.77
},
{
"text": "And I can use this star operator\nhere to say select everything.",
"start": 875.69,
"duration": 4.29
},
{
"text": "I want every row and every\ncolumn from this table.",
"start": 879.98,
"duration": 5.07
},
{
"text": "Now, it's not enough for me to simply\nsay select star and end my query.",
"start": 885.05,
"duration": 4.89
},
{
"text": "I had to tell SQL which table\ndo I want to select rows from.",
"start": 889.94,
"duration": 4.2
},
{
"text": "In this case, I know I\ntable was called longlist.",
"start": 894.14,
"duration": 3.12
},
{
"text": "So I'll say SELECT star from\n\"longlist,\" quote, unquote.",
"start": 897.26,
"duration": 5.25
},
{
"text": "And to end my query, I'll say Semicolon.",
"start": 902.51,
"duration": 3.93
},
{
"text": "And then finally, I can hit Enter.",
"start": 906.44,
"duration": 2.79
},
{
"text": "And notice how I get a lot of data back.",
"start": 909.23,
"duration": 2.46
},
{
"text": "This is a lot of data all at once.",
"start": 911.69,
"duration": 1.595
},
{
"text": "But it's because my terminal\nis a little bit small,",
"start": 913.285,
"duration": 2.125
},
{
"text": "there's a lot of rows and columns here.",
"start": 915.41,
"duration": 1.84
},
{
"text": "So I could probably simplify\nthis just a little bit.",
"start": 917.25,
"duration": 3.17
},
{
"text": "And instead of saying SELECT star, I\ncould also select a particular column",
"start": 920.42,
"duration": 4.32
},
{
"text": "from my table.",
"start": 924.74,
"duration": 1.65
},
{
"text": "I could say, for instance,\nSELECT, let's say,",
"start": 926.39,
"duration": 2.97
},
{
"text": "just the title column from my\ndatabase for my table like this.",
"start": 929.36,
"duration": 5.74
},
{
"text": "I just know already that there\nis a column called title.",
"start": 935.1,
"duration": 4.07
},
{
"text": "So now, I'll try this instead-- not\nselect star, but select title instead.",
"start": 939.17,
"duration": 4.2
},
{
"text": "I'll hit Enter.",
"start": 943.37,
"duration": 1.02
},
{
"text": "And now, this looks a little bit better.",
"start": 944.39,
"duration": 2.25
},
{
"text": "I can see the titles inside of\nthis table from top to bottom.",
"start": 946.64,
"duration": 7.33
},
{
"text": "Now, the neat thing here is I can\nselect more than one column too.",
"start": 953.97,
"duration": 4.215
},
{
"text": "Let's say I don't want just the title--",
"start": 958.185,
"duration": 1.625
},
{
"text": "I want titles and authors in my search.",
"start": 959.81,
"duration": 2.55
},
{
"text": "Well, I could do that as well.",
"start": 962.36,
"duration": 1.9
},
{
"text": "Let me try this.",
"start": 964.26,
"duration": 0.89
},
{
"text": "SELECT not just \"title,\"\nquote, unquote, but then I'll",
"start": 965.15,
"duration": 3.87
},
{
"text": "say comma and some new column to select.",
"start": 969.02,
"duration": 3.72
},
{
"text": "I'll select also the\nauthors from this table.",
"start": 972.74,
"duration": 3.96
},
{
"text": "And I'll select them from\nthe longlist table like this.",
"start": 976.7,
"duration": 3.81
},
{
"text": "Now I'll hit Semicolon to end my query.",
"start": 980.51,
"duration": 2.34
},
{
"text": "Hit Enter.",
"start": 982.85,
"duration": 1.11
},
{
"text": "And now I'll see a\nvariety of columns here,",
"start": 983.96,
"duration": 3.3
},
{
"text": "in particular the title\nand the author column.",
"start": 987.26,
"duration": 4.19
},
{
"text": "Now, this is going to be like\nall of my columns so far.",
"start": 991.45,
"duration": 2.733
},
{
"text": "And there is a way for me to\nget back just to some of them",
"start": 994.183,
"duration": 2.417
},
{
"text": "later on that we'll see.",
"start": 996.6,
"duration": 1.32
},
{
"text": "But for now, let's\nask, what questions do",
"start": 997.92,
"duration": 2.64
},
{
"text": "you have on this SQL SELECT statement\nand how we're getting back these rows?",
"start": 1000.56,
"duration": 6.62
},
{
"text": "SPEAKER: Do I need to use the quotes\naround the words like you are?",
"start": 1007.18,
"duration": 3.532
},
{
"text": "CARTER ZENKE: Yeah, great question.",
"start": 1010.712,
"duration": 1.458
},
{
"text": "Do I have to use quotes\naround the words like I am?",
"start": 1012.17,
"duration": 2.96
},
{
"text": "In general, it's a good practice to use\nthese double quotes around your table",
"start": 1015.13,
"duration": 4.44
},
{
"text": "names and your column names.",
"start": 1019.57,
"duration": 1.86
},
{
"text": "These are called SQL identifiers.",
"start": 1021.43,
"duration": 2.49
},
{
"text": "Later on, we'll see we'll also\nhave strings in SQL-- strings",
"start": 1023.92,
"duration": 4.26
},
{
"text": "being collections of\ncharacters we can use.",
"start": 1028.18,
"duration": 1.86
},
{
"text": "For those, we'll simply\nsingle-quote them",
"start": 1030.04,
"duration": 2.279
},
{
"text": "to note the difference between a\nstring and an actual column name.",
"start": 1032.319,
"duration": 4.121
},
{
"text": "So good style convention here to\nuse-- double quotes for column names",
"start": 1036.44,
"duration": 3.53
},
{
"text": "and single quotes for string names.",
"start": 1039.97,
"duration": 3.33
},
{
"text": "Other questions too?",
"start": 1043.3,
"duration": 1.89
},
{
"text": "SPEAKER: OK.",
"start": 1045.19,
"duration": 0.55
},
{
"text": "I wanted to know, where did we\ntake all this information from.",
"start": 1045.74,
"duration": 4.25
},
{
"text": "Like, this data, I don't\nknow this list of books,",
"start": 1049.99,
"duration": 4.35
},
{
"text": "where did we take all\nthis information from?",
"start": 1054.34,
"duration": 2.298
},
{
"text": "CARTER ZENKE: Yeah, a great question.",
"start": 1056.638,
"duration": 1.542
},
{
"text": "Where do we take this information from?",
"start": 1058.18,
"duration": 1.81
},
{
"text": "So some of this data\nis publicly available.",
"start": 1059.99,
"duration": 2.28
},
{
"text": "In fact, if you look at\nthe Booker Prize website,",
"start": 1062.27,
"duration": 2.42
},
{
"text": "you can find a set of\nlonglisted books over the years.",
"start": 1064.69,
"duration": 3.09
},
{
"text": "In this case, we have\nbooks from 2018 to 2023.",
"start": 1067.78,
"duration": 3.87
},
{
"text": "We'll also see later on this table\nhas data on the ratings of those books",
"start": 1071.65,
"duration": 5.238
},
{
"text": "and the number of votes that\nwere given to those books.",
"start": 1076.888,
"duration": 2.292
},
{
"text": "That data is from Goodreads,\nthe site that aggregates",
"start": 1079.18,
"duration": 3.45
},
{
"text": "reviews from people like you, people\nlike me who rate books online.",
"start": 1082.63,
"duration": 4.3
},
{
"text": "So we've taken data from a variety of\nsources and combined it into one here.",
"start": 1086.93,
"duration": 4.45
},
{
"text": "Let's take one more\nquestion to from Vinayak.",
"start": 1091.38,
"duration": 3.117
},
{
"text": "SPEAKER: Yeah.",
"start": 1094.497,
"duration": 0.583
},
{
"text": "So I wanted to ask regarding the syntax\nof what you used in the terminal.",
"start": 1095.08,
"duration": 5.26
},
{
"text": "So is the whole SQLite\n3 is case-sensitive",
"start": 1100.34,
"duration": 4.49
},
{
"text": "because while using the syntax you\nused capital letters, whereas can we",
"start": 1104.83,
"duration": 5.19
},
{
"text": "use small-case letters as well?",
"start": 1110.02,
"duration": 2.548
},
{
"text": "CARTER ZENKE: A great question.",
"start": 1112.568,
"duration": 1.292
},
{
"text": "So here, I used capital\nletters for SQL keywords",
"start": 1113.86,
"duration": 2.72
},
{
"text": "and lowercase, my table\nnames and column names.",
"start": 1116.58,
"duration": 2.7
},
{
"text": "Do I have to do that?",
"start": 1119.28,
"duration": 1.53
},
{
"text": "I, in some cases, do, some cases don't.",
"start": 1120.81,
"duration": 2.4
},
{
"text": "I think I could use lowercase\nfor these SQL keywords,",
"start": 1123.21,
"duration": 3.18
},
{
"text": "but it's not very good\nstyle, for instance.",
"start": 1126.39,
"duration": 2.47
},
{
"text": "So let me just show you an example of\nthis while I go back to my computer.",
"start": 1128.86,
"duration": 3.6
},
{
"text": "So the question again was, can I\nuse lowercase for SQL keywords?",
"start": 1132.46,
"duration": 5.09
},
{
"text": "I think I could, but the\nquestion is, should I?",
"start": 1137.55,
"duration": 3.3
},
{
"text": "And probably not.",
"start": 1140.85,
"duration": 0.768
},
{
"text": "So let me try this.",
"start": 1141.618,
"duration": 0.792
},
{
"text": "I'll say select, let's say, title from--",
"start": 1142.41,
"duration": 3.035
},
{
"text": "I'm in the habit of uppercase it.",
"start": 1145.445,
"duration": 1.375
},
{
"text": "So I'll say from in lowercase\nlonglist like this Semicolon.",
"start": 1146.82,
"duration": 4.83
},
{
"text": "Hit Enter.",
"start": 1151.65,
"duration": 0.96
},
{
"text": "And that still works.",
"start": 1152.61,
"duration": 1.86
},
{
"text": "But the problem you\nmight run into is someone",
"start": 1154.47,
"duration": 2.64
},
{
"text": "who's reading your query particularly,\na long one, might want to know,",
"start": 1157.11,
"duration": 4.05
},
{
"text": "what are the SQL keywords?",
"start": 1161.16,
"duration": 1.65
},
{
"text": "And what are your column names\nand other identifiers here?",
"start": 1162.81,
"duration": 3.57
},
{
"text": "By capitalizing your SQL\nkeywords, you can make it clear",
"start": 1166.38,
"duration": 3.03
},
{
"text": "that this is a SQL keyword and\nnot some other name overall.",
"start": 1169.41,
"duration": 5.87
},
{
"text": "OK.",
"start": 1175.28,
"duration": 0.6
},
{
"text": "So let's keep going.",
"start": 1175.88,
"duration": 1.14
},
{
"text": "And we saw just a little bit ago that\nwe could select \"title\" from \"longlist.\"",
"start": 1177.02,
"duration": 4.77
},
{
"text": "And we would get back a whole list of\ntitles, literally all the titles that",
"start": 1181.79,
"duration": 4.56
},
{
"text": "are in this database.",
"start": 1186.35,
"duration": 2.05
},
{
"text": "But it's often maybe good practice\nfor me to not look at all the data.",
"start": 1188.4,
"duration": 4.7
},
{
"text": "Like, imagine if we had\nmillions of rows in this column,",
"start": 1193.1,
"duration": 3.33
},
{
"text": "but only to give back some.",
"start": 1196.43,
"duration": 1.56
},
{
"text": "Take a peek of what's\ninside this database.",
"start": 1197.99,
"duration": 2.7
},
{
"text": "And for that, I could use this other\nSQL keyword, this one called LIMIT.",
"start": 1200.69,
"duration": 5.13
},
{
"text": "So LIMIT, as its name\nmight imply, limits",
"start": 1205.82,
"duration": 3.3
},
{
"text": "the number of queries or the number\nof rows I get back from my query.",
"start": 1209.12,
"duration": 3.93
},
{
"text": "I could say LIMIT 3,\nfor instance, or LIMIT 5",
"start": 1213.05,
"duration": 3.15
},
{
"text": "to get back only the top 3 or\nthe top 5 rows from my table.",
"start": 1216.2,
"duration": 3.93
},
{
"text": "And let me ask folks,\nif I wanted to peak",
"start": 1220.13,
"duration": 2.37
},
{
"text": "in this data set, how many rows\nshould I try to limit it to?",
"start": 1222.5,
"duration": 5.39
},
{
"text": "I could say SELECT\ntitle from, let's say,",
"start": 1227.89,
"duration": 2.31
},
{
"text": "longlist, but limit to what number?",
"start": 1230.2,
"duration": 3.76
},
{
"text": "I'm seeing 10.",
"start": 1233.96,
"duration": 1.14
},
{
"text": "So let's try 10 first.",
"start": 1235.1,
"duration": 1.25
},
{
"text": "I'll go back to my computer.",
"start": 1236.35,
"duration": 1.83
},
{
"text": "I'll come back over here,\nand I'll say, why don't I",
"start": 1238.18,
"duration": 2.43
},
{
"text": "select \"title\" from \"longlist?\"",
"start": 1240.61,
"duration": 5.09
},
{
"text": "But now, instead of hitting Semicolon,\nI will instead say LIMIT 10 Semicolon.",
"start": 1245.7,
"duration": 7.98
},
{
"text": "And I'll hit Enter.",
"start": 1253.68,
"duration": 1.29
},
{
"text": "Now I see only the first\n10 rows in my data set.",
"start": 1254.97,
"duration": 5.04
},
{
"text": "Handy for peeking in at the\ntop of my data set here too.",
"start": 1260.01,
"duration": 3.37
},
{
"text": "Let me try not just 10 but 5.",
"start": 1263.38,
"duration": 1.83
},
{
"text": "So I'll say SELECT \"title\" from\n\"longlist\" LIMIT 5 Semicolon.",
"start": 1265.21,
"duration": 8.7
},
{
"text": "This then gives me just the\ntop 5 titles in my database.",
"start": 1273.91,
"duration": 5.465
},
{
"text": "Just in whatever order they\nwere added to my table,",
"start": 1279.375,
"duration": 2.125
},
{
"text": "I'll see them in that order here too.",
"start": 1281.5,
"duration": 4.3
},
{
"text": "So using LIMIT, we can actually try\nto get back a certain number of rows.",
"start": 1285.8,
"duration": 5.32
},
{
"text": "But this isn't quite that interesting.",
"start": 1291.12,
"duration": 2.625
},
{
"text": "It's good for peaking in your data set.",
"start": 1293.745,
"duration": 1.625
},
{
"text": "I think we've answered that\nquestion of, what data do we have?",
"start": 1295.37,
"duration": 2.83
},
{
"text": "But let's say we want to\nmake more advanced queries.",
"start": 1298.2,
"duration": 2.75
},
{
"text": "We want to find the books that were\nnominated in 2023 or perhaps books",
"start": 1300.95,
"duration": 3.63
},
{
"text": "by a certain author.",
"start": 1304.58,
"duration": 1.23
},
{
"text": "Well, for that, we could use this next\nSQL keyword, this one called WHERE.",
"start": 1305.81,
"duration": 4.92
},
{
"text": "So WHERE allows me to get\nback not all rows, but only",
"start": 1310.73,
"duration": 6.15
},
{
"text": "some rows where some condition is true.",
"start": 1316.88,
"duration": 4.09
},
{
"text": "So WHERE is often combined\nwith other conditions",
"start": 1320.97,
"duration": 3.53
},
{
"text": "to make sure I only get back some\nrows, where that condition is true.",
"start": 1324.5,
"duration": 5.23
},
{
"text": "Let's try looking at\nthat in SQLite to get",
"start": 1329.73,
"duration": 2.12
},
{
"text": "a feel for what it can do for us here.",
"start": 1331.85,
"duration": 2.32
},
{
"text": "So I'll go back to my WHERE.",
"start": 1334.17,
"duration": 3.38
},
{
"text": "And I will then go back to SQLite here.",
"start": 1337.55,
"duration": 3.06
},
{
"text": "Hit Control-L to clear my terminal.",
"start": 1340.61,
"duration": 2.88
},
{
"text": "And I'll then try this query.",
"start": 1343.49,
"duration": 2.04
},
{
"text": "I'll say SELECT \"title.\"",
"start": 1345.53,
"duration": 3.27
},
{
"text": "SELECT \"title.\"",
"start": 1348.8,
"duration": 0.99
},
{
"text": "And why don't we also\nselect author along the way?",
"start": 1349.79,
"duration": 2.67
},
{
"text": "Two columns here.",
"start": 1352.46,
"duration": 1.83
},
{
"text": "And I'll select them\nfrom my longlist table.",
"start": 1354.29,
"duration": 3.09
},
{
"text": "But I don't want all rows.",
"start": 1357.38,
"duration": 2.07
},
{
"text": "I only want, let's say, those titles and\nauthors that were longlisted in 2023.",
"start": 1359.45,
"duration": 5.79
},
{
"text": "So I'll do this.",
"start": 1365.24,
"duration": 1.02
},
{
"text": "I'll say WHERE the \"year\"\ncolumn is equal to 2023.",
"start": 1366.26,
"duration": 6.81
},
{
"text": "And notice here how 2023\nis not in quotes because it",
"start": 1373.07,
"duration": 3.81
},
{
"text": "is an actual number, an integer.",
"start": 1376.88,
"duration": 2.23
},
{
"text": "So I don't need to quote it like I would\na string some collection of characters",
"start": 1379.11,
"duration": 3.5
},
{
"text": "or a table or column name.",
"start": 1382.61,
"duration": 3.1
},
{
"text": "So I'll hit Enter here.",
"start": 1385.71,
"duration": 1.77
},
{
"text": "And what do I see?",
"start": 1387.48,
"duration": 0.89
},
{
"text": "Well, I see only those books\nthat were nominated in 2023.",
"start": 1388.37,
"duration": 4.5
},
{
"text": "Let's try this again.",
"start": 1392.87,
"duration": 1.33
},
{
"text": "I might try not just 2023--",
"start": 1394.2,
"duration": 2.93
},
{
"text": "I might try 2022 like this.",
"start": 1397.13,
"duration": 3.39
},
{
"text": "Hit Semicolon.",
"start": 1400.52,
"duration": 1.35
},
{
"text": "Now, I'll see those\nbooks nominated in 2022.",
"start": 1401.87,
"duration": 3.51
},
{
"text": "I could keep going.",
"start": 1405.38,
"duration": 1.12
},
{
"text": "I could say why not 2022?",
"start": 1406.5,
"duration": 1.76
},
{
"text": "Why not 2021?",
"start": 1408.26,
"duration": 1.56
},
{
"text": "Now, I have all those\nbooks nominated in 2021.",
"start": 1409.82,
"duration": 4.63
},
{
"text": "So this is handy.",
"start": 1414.45,
"duration": 2.59
},
{
"text": "We can set things equal to or not\nequal to make some condition here.",
"start": 1417.04,
"duration": 3.89
},
{
"text": "And we also have others we could use.",
"start": 1420.93,
"duration": 2.04
},
{
"text": "We saw equals just now.",
"start": 1422.97,
"duration": 1.68
},
{
"text": "But we similarly have not equals.",
"start": 1424.65,
"duration": 2.31
},
{
"text": "And we have this kind of\nobscure operator down here.",
"start": 1426.96,
"duration": 3.21
},
{
"text": "This one being also equivalent to not\nequals as we'll see in just a minute.",
"start": 1430.17,
"duration": 5.68
},
{
"text": "But let me first ask\nnow, what questions do",
"start": 1435.85,
"duration": 2.27
},
{
"text": "we have on how to use WHERE\nor using SELECT so far?",
"start": 1438.12,
"duration": 4.05
},
{
"text": "SPEAKER: Why are the subsets of SQL?",
"start": 1442.17,
"duration": 2.59
},
{
"text": "CARTER ZENKE: A good question.",
"start": 1444.76,
"duration": 1.25
},
{
"text": "Are there subsets of SQL?",
"start": 1446.01,
"duration": 1.72
},
{
"text": "So there are.",
"start": 1447.73,
"duration": 1.43
},
{
"text": "In fact, S-Q-L or SQL\nwas defined by the,",
"start": 1449.16,
"duration": 3.71
},
{
"text": "I believe it's the ANSI,\nlike standard corporation.",
"start": 1452.87,
"duration": 2.14
},
{
"text": "They have a whole set\nof the SQL language",
"start": 1455.01,
"duration": 2.28
},
{
"text": "that is like the official version of it.",
"start": 1457.29,
"duration": 2.08
},
{
"text": "You might be able to use\nsome subset of that version",
"start": 1459.37,
"duration": 2.87
},
{
"text": "with the database manager\nsystem that you actually use.",
"start": 1462.24,
"duration": 2.5
},
{
"text": "So for SQLite, we're using a subset\nof SQL that works with SQLite.",
"start": 1464.74,
"duration": 4.28
},
{
"text": "Similarly, if you were using another\nsoftware like PostgreSQL or MySQL,",
"start": 1469.02,
"duration": 4.32
},
{
"text": "you could use another subset there too.",
"start": 1473.34,
"duration": 3.43
},
{
"text": "Let's take another question\nfrom Tayas, perhaps.",
"start": 1476.77,
"duration": 3.58
},
{
"text": "SPEAKER: Then I want to know that, can\nwe add 2022 and 2021 in a terminal?",
"start": 1480.35,
"duration": 5.443
},
{
"text": "CARTER ZENKE: Yeah, good question.",
"start": 1485.793,
"duration": 1.417
},
{
"text": "Could I, perhaps, try to\nfilter by 2021 and 2022?",
"start": 1487.21,
"duration": 5.67
},
{
"text": "I could do that.",
"start": 1492.88,
"duration": 0.702
},
{
"text": "And we'll see that in\njust a moment here.",
"start": 1493.582,
"duration": 1.708
},
{
"text": "So let's keep going and exploring\nsome other options with not equals.",
"start": 1495.29,
"duration": 2.96
},
{
"text": "And then we'll see how we can\ncombine conditions using WHERE too.",
"start": 1498.25,
"duration": 3.84
},
{
"text": "So let's go back, and\nlet's focus first on trying",
"start": 1502.09,
"duration": 3.21
},
{
"text": "to use these not equal operators.",
"start": 1505.3,
"duration": 2.43
},
{
"text": "We saw the exclamation point equals and\nthis greater than, less than sign put",
"start": 1507.73,
"duration": 4.65
},
{
"text": "together.",
"start": 1512.38,
"duration": 1.12
},
{
"text": "So let's try a few of those.",
"start": 1513.5,
"duration": 1.68
},
{
"text": "Let's say I want to find books that\nare written by a certain author.",
"start": 1515.18,
"duration": 4.89
},
{
"text": "Well, I could use equals for that.",
"start": 1520.07,
"duration": 1.55
},
{
"text": "But let's say I also want\nto find books that are not",
"start": 1521.62,
"duration": 2.55
},
{
"text": "written in the hardcover\nformat, like they",
"start": 1524.17,
"duration": 2.64
},
{
"text": "tend to be more expensive and so on.",
"start": 1526.81,
"duration": 1.63
},
{
"text": "So I don't want hardcover books.",
"start": 1528.44,
"duration": 2.18
},
{
"text": "Well, I could try a query like this.",
"start": 1530.62,
"duration": 1.93
},
{
"text": "I could say SELECT \"title\" and \"format,\"\nwhere format is either hardcover",
"start": 1532.55,
"duration": 5.54
},
{
"text": "or paperback, FROM my \"longlist\" table.",
"start": 1538.09,
"duration": 3.96
},
{
"text": "And now I'll say, WHERE the \"format\"\nis not equal to hardcover Semicolon.",
"start": 1542.05,
"duration": 7.32
},
{
"text": "So notice here I'm using\nsingle quotes for hardcover.",
"start": 1549.37,
"duration": 4.29
},
{
"text": "This is a string.",
"start": 1553.66,
"duration": 1.3
},
{
"text": "It's not a table name or a column name.",
"start": 1554.96,
"duration": 2.57
},
{
"text": "It is just a string.",
"start": 1557.53,
"duration": 1.05
},
{
"text": "So I'm using single quotes here.",
"start": 1558.58,
"duration": 2.19
},
{
"text": "Everything else, though, like\nformat, longlist, title, et cetera,",
"start": 1560.77,
"duration": 4.23
},
{
"text": "those are all table\nnames or column names.",
"start": 1565.0,
"duration": 3.4
},
{
"text": "So again, I'll hit Enter.",
"start": 1568.4,
"duration": 1.46
},
{
"text": "And now I'll see that these are all\nin paperback according to my table.",
"start": 1569.86,
"duration": 5.23
},
{
"text": "I've omitted those that are hardcover.",
"start": 1575.09,
"duration": 2.9
},
{
"text": "Well, I could also use in this\ncase, the greater than or less",
"start": 1577.99,
"duration": 3.99
},
{
"text": "than sign put together to\nsay not equals as well.",
"start": 1581.98,
"duration": 3.25
},
{
"text": "Let me just hit the Up\nArrow on my computer",
"start": 1585.23,
"duration": 1.97
},
{
"text": "to reveal what I just previously typed.",
"start": 1587.2,
"duration": 2.34
},
{
"text": "I'll then tab back over and say not\nexclamation point equals, but less than",
"start": 1589.54,
"duration": 6.87
},
{
"text": "and then greater than.",
"start": 1596.41,
"duration": 1.26
},
{
"text": "Hit Enter now.",
"start": 1597.67,
"duration": 1.17
},
{
"text": "And I should see the very same results.",
"start": 1598.84,
"duration": 2.31
},
{
"text": "But all I did was change this\noperator from exclamation point",
"start": 1601.15,
"duration": 3.12
},
{
"text": "equals to less than and greater than.",
"start": 1604.27,
"duration": 2.76
},
{
"text": "It tends to be that the\nexclamation point equals",
"start": 1607.03,
"duration": 2.22
},
{
"text": "is the more common operator in this\ncase, but they do the very same thing.",
"start": 1609.25,
"duration": 6.18
},
{
"text": "Now, one more keyword I could\nuse here that's worth mentioning",
"start": 1615.43,
"duration": 3.83
},
{
"text": "is this keyword called NOT.",
"start": 1619.26,
"duration": 2.31
},
{
"text": "So here, I was able to use\nexclamation point equals or the less",
"start": 1621.57,
"duration": 4.38
},
{
"text": "than or greater than\nsign to say not equals.",
"start": 1625.95,
"duration": 2.34
},
{
"text": "But I could also negate\na condition using NOT.",
"start": 1628.29,
"duration": 3.78
},
{
"text": "So let's try using this one\nin our SQLite terminal too.",
"start": 1632.07,
"duration": 4.08
},
{
"text": "I'll go back over here.",
"start": 1636.15,
"duration": 1.35
},
{
"text": "And I'll bring back my SQLite terminal.",
"start": 1637.5,
"duration": 3.69
},
{
"text": "I'll say let's do not this\noperator here, but instead use NOT.",
"start": 1641.19,
"duration": 6.33
},
{
"text": "So I might, in front of WHERE, say\nWHERE NOT \"format\" equals \"hardcover.\"",
"start": 1647.52,
"duration": 8.22
},
{
"text": "So I have a condition,\n\"format\" equals \"hardcover,\"",
"start": 1655.74,
"duration": 2.76
},
{
"text": "but now I'm going to negate\nit, take the opposite of it",
"start": 1658.5,
"duration": 3.18
},
{
"text": "and get back the very\nsame results here too.",
"start": 1661.68,
"duration": 4.92
},
{
"text": "OK.",
"start": 1666.6,
"duration": 1.46
},
{
"text": "So to the question earlier, how\nwe can combine these conditionals.",
"start": 1668.06,
"duration": 3.99
},
{
"text": "So let's try that here in just a minute.",
"start": 1672.05,
"duration": 2.95
},
{
"text": "So let's say I wanted\nto find the books that",
"start": 1675.0,
"duration": 3.77
},
{
"text": "were not just written in 2022 or 2023\nalone, but all the books together.",
"start": 1678.77,
"duration": 6.6
},
{
"text": "Well for this, I could use a\nfew other SQL keywords that",
"start": 1685.37,
"duration": 2.67
},
{
"text": "might be a little familiar to you too.",
"start": 1688.04,
"duration": 3.49
},
{
"text": "Let's try looking at\nsome of these over here.",
"start": 1691.53,
"duration": 3.03
},
{
"text": "So here, we have these called AND,\nOR, and these parentheses here too.",
"start": 1694.56,
"duration": 6.02
},
{
"text": "So using AND and OR, I\ncan change conditionals.",
"start": 1700.58,
"duration": 4.65
},
{
"text": "I can put them together to make a\nmore complex conditional, a compound",
"start": 1705.23,
"duration": 3.6
},
{
"text": "condition.",
"start": 1708.83,
"duration": 1.05
},
{
"text": "And I could also use these\nparentheses to symbolize",
"start": 1709.88,
"duration": 2.88
},
{
"text": "that this condition\nshould come first and then",
"start": 1712.76,
"duration": 2.43
},
{
"text": "some condition should\ncome afterwards as well.",
"start": 1715.19,
"duration": 2.5
},
{
"text": "So let's try these in SQLite as well.",
"start": 1717.69,
"duration": 3.09
},
{
"text": "I'll go back to my computer.",
"start": 1720.78,
"duration": 1.53
},
{
"text": "And again, our goal is to find\nnot just books in 2022 or 2023,",
"start": 1722.31,
"duration": 4.91
},
{
"text": "but books that work across\nthose years as well.",
"start": 1727.22,
"duration": 3.88
},
{
"text": "So I'll, in this case say, SELECT--",
"start": 1731.1,
"duration": 2.12
},
{
"text": "let's go for a \"title\" and\n\"author\" from my \"longlist\" table.",
"start": 1733.22,
"duration": 6.37
},
{
"text": "Now, I'll say WHERE the\n\"year\" is 2022, as we did",
"start": 1739.59,
"duration": 5.52
},
{
"text": "before, OR perhaps the \"year\" is 2023.",
"start": 1745.11,
"duration": 5.25
},
{
"text": "And notice how my query is kind\nof wrapping around my terminal.",
"start": 1750.36,
"duration": 3.87
},
{
"text": "I could leave it like this, or\nif I backspace just a little bit,",
"start": 1754.23,
"duration": 4.96
},
{
"text": "I could hit Enter.",
"start": 1759.19,
"duration": 2.13
},
{
"text": "And now I'm on a new line\nto continue my query.",
"start": 1761.32,
"duration": 3.85
},
{
"text": "So here, I'll say OR \"year\" is 2023.",
"start": 1765.17,
"duration": 5.21
},
{
"text": "And now my query is done.",
"start": 1770.38,
"duration": 1.96
},
{
"text": "So I'll hit Semicolon.",
"start": 1772.34,
"duration": 1.34
},
{
"text": "And I should see those books published\nin or nominated in 2022 or 2023.",
"start": 1773.68,
"duration": 8.88
},
{
"text": "Let's try a few more here.",
"start": 1782.56,
"duration": 2.02
},
{
"text": "Let's try using our parentheses as well.",
"start": 1784.58,
"duration": 2.21
},
{
"text": "Maybe I want not just\nthese books but also",
"start": 1786.79,
"duration": 2.79
},
{
"text": "those that are formatted\nin a hardcover format.",
"start": 1789.58,
"duration": 2.71
},
{
"text": "So I'll say--",
"start": 1792.29,
"duration": 1.31
},
{
"text": "I'll clear my terminal, Control-L\nagain, and SELECT \"title\" as well as,",
"start": 1793.6,
"duration": 6.59
},
{
"text": "let's say, \"format\" from\nmy \"longlist\" table.",
"start": 1800.19,
"duration": 5.52
},
{
"text": "And now, I'll hit my new\nline to extend my query",
"start": 1805.71,
"duration": 3.33
},
{
"text": "without wrapping it on my terminal.",
"start": 1809.04,
"duration": 1.95
},
{
"text": "I'll hit Enter.",
"start": 1810.99,
"duration": 0.99
},
{
"text": "And I'll say WHERE the \"year\"\nis 2022 OR the \"year\" is 2023.",
"start": 1811.98,
"duration": 8.46
},
{
"text": "That's one condition.",
"start": 1820.44,
"duration": 1.77
},
{
"text": "And I can denote that with a\nsingle set of parentheses here.",
"start": 1822.21,
"duration": 3.96
},
{
"text": "I also want it to be true that\nthe \"format\" is not \"hardcover.\"",
"start": 1826.17,
"duration": 7.48
},
{
"text": "So now, I'm adding\nanother condition in here.",
"start": 1833.65,
"duration": 3.0
},
{
"text": "Now, I'll say Semicolon, hit Enter.",
"start": 1836.65,
"duration": 2.4
},
{
"text": "And I'll get back only those books\nthat are published in the paperback",
"start": 1839.05,
"duration": 4.05
},
{
"text": "format in 2022 and 2023.",
"start": 1843.1,
"duration": 6.09
},
{
"text": "OK.",
"start": 1849.19,
"duration": 1.23
},
{
"text": "So let me pause again and ask if\nthere are any questions so far",
"start": 1850.42,
"duration": 3.42
},
{
"text": "in how we've been using WHERE and\nSELECT and other conditions as well.",
"start": 1853.84,
"duration": 7.12
},
{
"text": "SPEAKER: I would like\nto know about the--",
"start": 1860.96,
"duration": 4.16
},
{
"text": "we can have a list of the top\ntitles available in the database.",
"start": 1865.12,
"duration": 4.92
},
{
"text": "Like you have mentioned, the title,\nauthor, where we can know about that.",
"start": 1870.04,
"duration": 5.34
},
{
"text": "What are the titles available in\nthe database using command below?",
"start": 1875.38,
"duration": 4.038
},
{
"text": "CARTER ZENKE: Yeah.",
"start": 1879.418,
"duration": 0.792
},
{
"text": "So here I've been using these column\nnames called \"title\" and \"author.\"",
"start": 1880.21,
"duration": 3.21
},
{
"text": "And I think your question is, how\nwould I know that I have these columns?",
"start": 1883.42,
"duration": 3.25
},
{
"text": "Well, as we'll see in\nfuture times together,",
"start": 1886.67,
"duration": 2.85
},
{
"text": "I'll be able to actually look at\nthe schema of my database, what",
"start": 1889.52,
"duration": 3.08
},
{
"text": "columns are inside of it.",
"start": 1892.6,
"duration": 1.29
},
{
"text": "For now, just take it\non my own word that I",
"start": 1893.89,
"duration": 3.39
},
{
"text": "knew what was inside the database\nbefore I actually started querying it.",
"start": 1897.28,
"duration": 3.15
},
{
"text": "We'll see later on how\nyou can take a database",
"start": 1900.43,
"duration": 1.95
},
{
"text": "and understand the columns\nyou have there too.",
"start": 1902.38,
"duration": 2.25
},
{
"text": "A good question.",
"start": 1904.63,
"duration": 1.21
},
{
"text": "Let's jump into some more queries then.",
"start": 1905.84,
"duration": 2.24
},
{
"text": "I'll go back to my computer.",
"start": 1908.08,
"duration": 1.53
},
{
"text": "And let's see what else we\ncould do with these conditions.",
"start": 1909.61,
"duration": 3.97
},
{
"text": "Well, not only could I try\nto make compound conditions,",
"start": 1913.58,
"duration": 3.8
},
{
"text": "I could also try to find, let's\nsay, which data is missing.",
"start": 1917.38,
"duration": 5.1
},
{
"text": "So I know in this table, I\nhave not just authors of books,",
"start": 1922.48,
"duration": 4.38
},
{
"text": "but translators of those books.",
"start": 1926.86,
"duration": 2.76
},
{
"text": "Often, books for the\nInternational Booker Prize",
"start": 1929.62,
"duration": 2.04
},
{
"text": "were translated from some\nother language into English--",
"start": 1931.66,
"duration": 3.93
},
{
"text": "but some weren't or at least\nthey didn't have a translator",
"start": 1935.59,
"duration": 3.0
},
{
"text": "that was separate from the author.",
"start": 1938.59,
"duration": 1.89
},
{
"text": "So to think about what data\nis missing from our table,",
"start": 1940.48,
"duration": 3.09
},
{
"text": "we should introduce this new idea--",
"start": 1943.57,
"duration": 2.31
},
{
"text": "this one called NULL.",
"start": 1945.88,
"duration": 2.56
},
{
"text": "So I'll walk over here.",
"start": 1948.44,
"duration": 1.29
},
{
"text": "And we'll see that we have this\ntype called NULL, where this",
"start": 1949.73,
"duration": 3.92
},
{
"text": "means that this value doesn't exist.",
"start": 1953.65,
"duration": 1.83
},
{
"text": "It's not in our database.",
"start": 1955.48,
"duration": 2.29
},
{
"text": "We can actually put together a condition\naround this idea of null, something",
"start": 1957.77,
"duration": 4.52
},
{
"text": "not being there.",
"start": 1962.29,
"duration": 1.71
},
{
"text": "We could use IS NULL to\nfigure out if a value is null.",
"start": 1964.0,
"duration": 3.57
},
{
"text": "It's not there.",
"start": 1967.57,
"duration": 0.658
},
{
"text": "It's missing from our database.",
"start": 1968.228,
"duration": 1.292
},
{
"text": "Or IS IT NULL, meaning\nthat it actually is there.",
"start": 1969.52,
"duration": 4.763
},
{
"text": "So I'll go back to SQLite\nand show you what we could",
"start": 1974.283,
"duration": 2.167
},
{
"text": "do with some of these concepts here.",
"start": 1976.45,
"duration": 3.52
},
{
"text": "Let me go back to my terminal.",
"start": 1979.97,
"duration": 1.43
},
{
"text": "And let's say I do want to\nfind those translators that",
"start": 1981.4,
"duration": 3.12
},
{
"text": "don't exist in my database.",
"start": 1984.52,
"duration": 2.08
},
{
"text": "Well, I could use SELECT, let's say,\n\"title\" and \"translator\" from my",
"start": 1986.6,
"duration": 6.8
},
{
"text": "\"longlist.\"",
"start": 1993.4,
"duration": 1.05
},
{
"text": "And I want to make sure that\nthese translators are null--",
"start": 1994.45,
"duration": 4.11
},
{
"text": "they don't exist.",
"start": 1998.56,
"duration": 1.36
},
{
"text": "So I'll say WHERE \"translator\"\nIS NULL Semicolon.",
"start": 1999.92,
"duration": 5.33
},
{
"text": "Now, I'll hit Enter.",
"start": 2005.25,
"duration": 1.53
},
{
"text": "And I should see two books.",
"start": 2006.78,
"duration": 1.438
},
{
"text": "Titles are The Perfect Nine and\nthe indictment of The Enlightenment",
"start": 2008.218,
"duration": 2.792
},
{
"text": "of The Greengate Tree.",
"start": 2011.01,
"duration": 0.917
},
{
"text": "But notice how over here,\nthis value is null--",
"start": 2011.927,
"duration": 3.403
},
{
"text": "it doesn't exist in my table.",
"start": 2015.33,
"duration": 2.74
},
{
"text": "I could conversely find those books that\ndo have translators using IS NOT NULL.",
"start": 2018.07,
"duration": 5.27
},
{
"text": "And I will try this one again.",
"start": 2023.34,
"duration": 2.71
},
{
"text": "But in this case, I'll say, WHERE\n\"translator\" IS NOT NULL Semicolon.",
"start": 2026.05,
"duration": 7.85
},
{
"text": "And I'll hit Enter.",
"start": 2033.9,
"duration": 1.77
},
{
"text": "And now, let me just\nzoom out a little bit.",
"start": 2035.67,
"duration": 2.67
},
{
"text": "I can see that I have both\ntitles on the left-hand side",
"start": 2038.34,
"duration": 5.13
},
{
"text": "and translators on the right-hand side.",
"start": 2043.47,
"duration": 2.31
},
{
"text": "All of these actually exists.",
"start": 2045.78,
"duration": 2.26
},
{
"text": "These are books that did have\ntranslators in this case.",
"start": 2048.04,
"duration": 3.679
},
{
"text": "So a good way to find data that's\nmissing in your table using",
"start": 2051.719,
"duration": 3.091
},
{
"text": "NULL or IS NOT NULL.",
"start": 2054.81,
"duration": 2.822
},
{
"text": "So let's come back over here\nand figure out what more",
"start": 2057.632,
"duration": 2.208
},
{
"text": "we can do with some of these queries.",
"start": 2059.84,
"duration": 2.67
},
{
"text": "We've kind of exhausted our work\nwith some of our conditions,",
"start": 2062.51,
"duration": 4.95
},
{
"text": "like chaining them together\nand using NULL and so on.",
"start": 2067.46,
"duration": 2.35
},
{
"text": "But one more thing we could do is\ntrying to use this idea of matching",
"start": 2069.81,
"duration": 4.73
},
{
"text": "some kind of pattern in my database.",
"start": 2074.54,
"duration": 2.349
},
{
"text": "So maybe I'm a book reader.",
"start": 2076.889,
"duration": 3.591
},
{
"text": "And I want to find a book with the\nword \"love\" somewhere in the title.",
"start": 2080.48,
"duration": 3.989
},
{
"text": "Well, for this, I could\nuse another keyword--",
"start": 2084.469,
"duration": 2.551
},
{
"text": "this one called LIKE.",
"start": 2087.02,
"duration": 2.25
},
{
"text": "So LIKE is a good keyword to\nuse when I want to roughly match",
"start": 2089.27,
"duration": 5.159
},
{
"text": "some string in my database.",
"start": 2094.429,
"duration": 2.281
},
{
"text": "Let's say I want to look\nat book titles and find",
"start": 2096.71,
"duration": 2.43
},
{
"text": "if some word exists in that title.",
"start": 2099.14,
"duration": 2.52
},
{
"text": "I could use LIKE for that.",
"start": 2101.66,
"duration": 2.41
},
{
"text": "And LIKE becomes powerful\nwhen you combine it",
"start": 2104.07,
"duration": 2.36
},
{
"text": "with these other operators, namely\nthis percent sign and this underscore.",
"start": 2106.43,
"duration": 4.4
},
{
"text": "The percent sign can match any\ncharacter around a string I give it.",
"start": 2110.83,
"duration": 4.78
},
{
"text": "And the underscore can\nmatch any single character",
"start": 2115.61,
"duration": 3.0
},
{
"text": "that I pass in with my string.",
"start": 2118.61,
"duration": 2.37
},
{
"text": "It's probably best\nshown with an example.",
"start": 2120.98,
"duration": 2.47
},
{
"text": "So let me show you some\nin my terminal here.",
"start": 2123.45,
"duration": 2.81
},
{
"text": "I'll walk back.",
"start": 2126.26,
"duration": 1.05
},
{
"text": "And, again, we'll try\nto find these books that",
"start": 2127.31,
"duration": 2.07
},
{
"text": "have \"love\" somewhere in the title.",
"start": 2129.38,
"duration": 2.85
},
{
"text": "So I'll say in this case, SELECT,\nlet's say, \"title\" from \"longlist.\"",
"start": 2132.23,
"duration": 5.97
},
{
"text": "But I don't want all titles.",
"start": 2138.2,
"duration": 1.68
},
{
"text": "I only want those that have\n\"love\" somewhere in this title.",
"start": 2139.88,
"duration": 4.06
},
{
"text": "So I'll say WHERE \"title\" LIKE, let's\nsay, percent love percent Semicolon.",
"start": 2143.94,
"duration": 9.71
},
{
"text": "Now before I run this, let me\nexplain what this is doing.",
"start": 2153.65,
"duration": 3.99
},
{
"text": "I have here a SELECT query\nasking for the \"title\"",
"start": 2157.64,
"duration": 3.96
},
{
"text": "column from my \"longlist\" table.",
"start": 2161.6,
"duration": 3.0
},
{
"text": "But I'll only get back those rows where\n\"title\" is LIKE percent love percent.",
"start": 2164.6,
"duration": 6.51
},
{
"text": "But what does that mean?",
"start": 2171.11,
"duration": 1.42
},
{
"text": "Well, the percent, remember,\nmatches any string of characters.",
"start": 2172.53,
"duration": 3.8
},
{
"text": "It could match a, b, c, 1, 2, 3.",
"start": 2176.33,
"duration": 2.25
},
{
"text": "As long as any string of characters\ncomes after and has \"love,\"",
"start": 2178.58,
"duration": 3.69
},
{
"text": "I could match that value here.",
"start": 2182.27,
"duration": 3.19
},
{
"text": "Similarly, the percent\nsign after says anything",
"start": 2185.46,
"duration": 2.585
},
{
"text": "that comes after \"love,\" as long as\n\"love\" is somewhere in the middle.",
"start": 2188.045,
"duration": 4.585
},
{
"text": "So anything before, anything\nafter, but so long as \"love\"",
"start": 2192.63,
"duration": 3.59
},
{
"text": "is just somewhere in\nthere, I'll get it back.",
"start": 2196.22,
"duration": 2.31
},
{
"text": "So let me try that running this\nquery then and come back over here.",
"start": 2198.53,
"duration": 3.75
},
{
"text": "I will hit Enter on my query.",
"start": 2202.28,
"duration": 2.25
},
{
"text": "And I'll see I get back four books--",
"start": 2204.53,
"duration": 2.52
},
{
"text": "Love in the Big City, More\nThan I Love My Life and so on.",
"start": 2207.05,
"duration": 4.06
},
{
"text": "So notice how if I come back over\nhere that each of these titles",
"start": 2211.11,
"duration": 3.77
},
{
"text": "has \"love\" somewhere in it.",
"start": 2214.88,
"duration": 1.83
},
{
"text": "For this one, I match\nlove up front and then",
"start": 2216.71,
"duration": 3.42
},
{
"text": "had any string of characters\ncoming after it like this.",
"start": 2220.13,
"duration": 2.8
},
{
"text": "For this one, I had More\nThan I Love My Life.",
"start": 2222.93,
"duration": 2.75
},
{
"text": "I got some string before it.",
"start": 2225.68,
"duration": 1.71
},
{
"text": "And then afterwards, any string after\nit, \"love\" is somewhere in the middle.",
"start": 2227.39,
"duration": 5.19
},
{
"text": "Let me show you another\nexample too, where",
"start": 2232.58,
"duration": 2.07
},
{
"text": "we use percent in a different way.",
"start": 2234.65,
"duration": 2.71
},
{
"text": "Let's say I want to find\nonly those books that",
"start": 2237.36,
"duration": 2.51
},
{
"text": "have \"The\" at the very\nbeginning of the title.",
"start": 2239.87,
"duration": 3.45
},
{
"text": "Let me try this.",
"start": 2243.32,
"duration": 1.09
},
{
"text": "I'll say a SELECT \"title\"\nfrom \"longlist\" then WHERE,",
"start": 2244.41,
"duration": 6.47
},
{
"text": "let's say, the \"title\" is\nLIKE the percent Semicolon.",
"start": 2250.88,
"duration": 9.08
},
{
"text": "Now, I've changed something up.",
"start": 2259.96,
"duration": 1.9
},
{
"text": "I have not percent in front and\nbehind, but only after the \"The.\"",
"start": 2261.86,
"duration": 5.9
},
{
"text": "So in this case, I'll\nget back not anything",
"start": 2267.76,
"duration": 2.91
},
{
"text": "that has \"The\" the\ntitle wherever, but now",
"start": 2270.67,
"duration": 3.0
},
{
"text": "at the very beginning of this string.",
"start": 2273.67,
"duration": 2.94
},
{
"text": "And I see perhaps a style mistake.",
"start": 2276.61,
"duration": 3.03
},
{
"text": "Let me ask the audience,\nwhat style mistake did",
"start": 2279.64,
"duration": 2.31
},
{
"text": "I just make when I typed in this query?",
"start": 2281.95,
"duration": 3.73
},
{
"text": "So I'm seeing maybe I used double quotes\nwhen I should have used single quotes.",
"start": 2285.68,
"duration": 3.915
},
{
"text": "So let me come back and fix that first.",
"start": 2289.595,
"duration": 1.625
},
{
"text": "I'll come back over here.",
"start": 2291.22,
"duration": 1.5
},
{
"text": "And, again, by convention, we tend\nto use single quotes for our strings.",
"start": 2292.72,
"duration": 5.04
},
{
"text": "So let me fix that right here.",
"start": 2297.76,
"duration": 2.04
},
{
"text": "And now let me run this query\nto see what we get back.",
"start": 2299.8,
"duration": 2.43
},
{
"text": "I'll hit Enter.",
"start": 2302.23,
"duration": 1.05
},
{
"text": "And I'll see only those\nbooks that begin with \"The.\"",
"start": 2303.28,
"duration": 4.97
},
{
"text": "Now, let me show this\nquery again, though.",
"start": 2308.25,
"duration": 4.55
},
{
"text": "This was our query here.",
"start": 2312.8,
"duration": 2.1
},
{
"text": "Knowing what we know\nabout the percent sign,",
"start": 2314.9,
"duration": 4.17
},
{
"text": "what other titles might I accidentally\nget back by running this query?",
"start": 2319.07,
"duration": 5.94
},
{
"text": "I have \"The\" percent.",
"start": 2325.01,
"duration": 2.295
},
{
"text": "But what other words actually\nbegin these book titles",
"start": 2327.305,
"duration": 3.945
},
{
"text": "if I were to run this query here?",
"start": 2331.25,
"duration": 2.52
},
{
"text": "We saw only those with \"The,\" but if\nI had other book titles, what might",
"start": 2333.77,
"duration": 3.33
},
{
"text": "I get back?",
"start": 2337.1,
"duration": 1.52
},
{
"text": "So I might get back\nthose book titles that",
"start": 2338.62,
"duration": 1.95
},
{
"text": "have not just \"The\" the\nbeginning but also, let's say,",
"start": 2340.57,
"duration": 3.45
},
{
"text": "\"There\" or \"They\" or so on.",
"start": 2344.02,
"duration": 2.2
},
{
"text": "There are many words\nbeginning with T-H-E.",
"start": 2346.22,
"duration": 2.585
},
{
"text": "And if I had the percent\nsign right after it,",
"start": 2348.805,
"duration": 1.875
},
{
"text": "I might match one of those\nwords like Y or R-E or so on.",
"start": 2350.68,
"duration": 4.72
},
{
"text": "So I didn't have any of those\ntitles in this database.",
"start": 2355.4,
"duration": 2.25
},
{
"text": "But you can imagine a different\ndatabase where I have that kind of data.",
"start": 2357.65,
"duration": 5.26
},
{
"text": "Let's fix this then.",
"start": 2362.91,
"duration": 1.35
},
{
"text": "I say, I want to match not just\n\"The\" but \"The\" and a space,",
"start": 2364.26,
"duration": 4.69
},
{
"text": "and match any characters\nafter that to make this",
"start": 2368.95,
"duration": 2.15
},
{
"text": "query better designed in this instance.",
"start": 2371.1,
"duration": 4.28
},
{
"text": "OK.",
"start": 2375.38,
"duration": 0.83
},
{
"text": "So let me pause here then\nand ask what questions we",
"start": 2376.21,
"duration": 2.73
},
{
"text": "have on using percent along with LIKE.",
"start": 2378.94,
"duration": 5.24
},
{
"text": "SPEAKER: Can we use two percent\nsigns between two words?",
"start": 2384.18,
"duration": 3.958
},
{
"text": "CARTER ZENKE: Yeah, I think so.",
"start": 2388.138,
"duration": 1.292
},
{
"text": "So let me go back to my terminal here\nand let me try to answer this question.",
"start": 2389.43,
"duration": 3.31
},
{
"text": "So can we use two percent signs to\nsay something's between two words?",
"start": 2392.74,
"duration": 4.05
},
{
"text": "So let me say this.",
"start": 2396.79,
"duration": 1.1
},
{
"text": "I'll go with SELECT, let's say,\n\"title\" from \"longlist\" WHERE maybe",
"start": 2397.89,
"duration": 8.82
},
{
"text": "the \"title\" has something like--",
"start": 2406.71,
"duration": 3.51
},
{
"text": "maybe it begins with \"The.\"",
"start": 2410.22,
"duration": 1.41
},
{
"text": "So I'll say WHERE \"title\" LIKE \"The.\"",
"start": 2411.63,
"duration": 5.58
},
{
"text": "And then I'll take any set\nof characters afterwards.",
"start": 2417.21,
"duration": 3.57
},
{
"text": "But I want to have\n\"love\" also in here too.",
"start": 2420.78,
"duration": 2.85
},
{
"text": "So I'll say \"love.\"",
"start": 2423.63,
"duration": 1.44
},
{
"text": "And then I'll take any other characters\nafter it, percent again, single quote,",
"start": 2425.07,
"duration": 6.43
},
{
"text": "Semicolon.",
"start": 2431.5,
"duration": 1.38
},
{
"text": "Now, I don't know if I have any\nbooks that actually fit this search.",
"start": 2432.88,
"duration": 4.53
},
{
"text": "But I could say the percent\nlove percent to mean give me",
"start": 2437.41,
"duration": 4.35
},
{
"text": "back any title that has\n\"The\" at the beginning",
"start": 2441.76,
"duration": 2.97
},
{
"text": "then any words or characters then\n\"love\" then any words or characters",
"start": 2444.73,
"duration": 3.78
},
{
"text": "after that.",
"start": 2448.51,
"duration": 1.17
},
{
"text": "I'll hit Enter.",
"start": 2449.68,
"duration": 0.81
},
{
"text": "And I see I don't have any books\nthat fit that kind of description.",
"start": 2450.49,
"duration": 3.82
},
{
"text": "But if I did, I would see them here\nwith \"The\" at the beginning and \"love\"",
"start": 2454.31,
"duration": 4.1
},
{
"text": "somewhere in the title.",
"start": 2458.41,
"duration": 3.29
},
{
"text": "All right.",
"start": 2461.7,
"duration": 0.5
},
{
"text": "So let's keep going.",
"start": 2462.2,
"duration": 0.833
},
{
"text": "Let's focus not just on this percent\nsign, but also on this underscore.",
"start": 2463.033,
"duration": 4.977
},
{
"text": "So if I want to find--",
"start": 2468.01,
"duration": 1.32
},
{
"text": "let's say, I don't know what a\nparticular character is in my title.",
"start": 2469.33,
"duration": 4.62
},
{
"text": "I could use this underscore to\nmatch any particular character.",
"start": 2473.95,
"duration": 3.63
},
{
"text": "Not any string of characters,\nbut any single character too.",
"start": 2477.58,
"duration": 3.24
},
{
"text": "So let's try this in our terminal.",
"start": 2480.82,
"duration": 2.43
},
{
"text": "And there is a book,\nthis one called a Pyre.",
"start": 2483.25,
"duration": 3.18
},
{
"text": "And I actually keep\nforgetting how it's spelled.",
"start": 2486.43,
"duration": 2.73
},
{
"text": "I don't know whether it's P-I-R-E\nor P-Y-R-E. It could be either one,",
"start": 2489.16,
"duration": 5.53
},
{
"text": "but I want to find it in my database.",
"start": 2494.69,
"duration": 2.07
},
{
"text": "So let me try this.",
"start": 2496.76,
"duration": 1.01
},
{
"text": "I'll say SELECT, let's say, \"title\"\nFROM \"longlist,\" WHERE, in this case,",
"start": 2497.77,
"duration": 6.9
},
{
"text": "\"title\" is LIKE--",
"start": 2504.67,
"duration": 2.13
},
{
"text": "well, I know that it\nstarts with a P. And I",
"start": 2506.8,
"duration": 2.94
},
{
"text": "don't know if this is an I or a Y. But\nI'll at least leave it as an underscore",
"start": 2509.74,
"duration": 4.26
},
{
"text": "now to say it could\nbe any character here.",
"start": 2514.0,
"duration": 2.88
},
{
"text": "Then I'll say R-E\nsingle quote, Semicolon.",
"start": 2516.88,
"duration": 5.92
},
{
"text": "And now I could try hitting Enter.",
"start": 2522.8,
"duration": 2.06
},
{
"text": "And I'll see I get back\nthis title called Pyre.",
"start": 2524.86,
"duration": 3.96
},
{
"text": "So notice in this case that\nthe underscore is matching",
"start": 2528.82,
"duration": 3.24
},
{
"text": "literally any single character.",
"start": 2532.06,
"duration": 2.25
},
{
"text": "This could be a Y. It could be an I.\nBut in this case, I have this Y here.",
"start": 2534.31,
"duration": 5.92
},
{
"text": "OK.",
"start": 2540.23,
"duration": 0.605
},
{
"text": "Let me go back.",
"start": 2540.835,
"duration": 0.625
},
{
"text": "And let's actually ask in\nthis case what questions we",
"start": 2541.46,
"duration": 2.46
},
{
"text": "have on using LIKE with these\nsingle underscores if any.",
"start": 2543.92,
"duration": 4.157
},
{
"text": "SPEAKER: Yeah.",
"start": 2548.077,
"duration": 0.583
},
{
"text": "So Carter, I wanted to ask you, that\nas you use the underscore sign here,",
"start": 2548.66,
"duration": 4.57
},
{
"text": "so for multiple characters, can we\nuse multiple underscores in order",
"start": 2553.23,
"duration": 4.16
},
{
"text": "to find something in the database?",
"start": 2557.39,
"duration": 2.308
},
{
"text": "CARTER ZENKE: A great question.",
"start": 2559.698,
"duration": 1.292
},
{
"text": "Could we use more than one\nunderscore to try to find",
"start": 2560.99,
"duration": 2.777
},
{
"text": "some characters in our database?",
"start": 2563.767,
"duration": 1.333
},
{
"text": "You absolutely could.",
"start": 2565.1,
"duration": 0.875
},
{
"text": "So let me try that myself.",
"start": 2565.975,
"duration": 1.525
},
{
"text": "I'll go back to my terminal.",
"start": 2567.5,
"duration": 2.13
},
{
"text": "And let me try to find a book\ntitle this could work with.",
"start": 2569.63,
"duration": 2.88
},
{
"text": "I'll say maybe SELECT\n\"title\" from \"longlist\"",
"start": 2572.51,
"duration": 3.87
},
{
"text": "to get back all the books in this table.",
"start": 2576.38,
"duration": 2.28
},
{
"text": "I'll hit Semicolon.",
"start": 2578.66,
"duration": 1.32
},
{
"text": "And maybe I will go with--",
"start": 2579.98,
"duration": 2.775
},
{
"text": "let's try this one called Tyll.",
"start": 2585.93,
"duration": 2.79
},
{
"text": "Well, maybe I want to just find the\ntitles that have a Y or an I in here,",
"start": 2588.72,
"duration": 5.04
},
{
"text": "but I also don't know if it's one\nL or maybe two L's, for instance.",
"start": 2593.76,
"duration": 3.933
},
{
"text": "Let me go back and try this.",
"start": 2597.693,
"duration": 1.167
},
{
"text": "I'll say SELECT, let's say, \"title\" FROM\n\"longlist\" WHERE my \"title\" is LIKE--",
"start": 2598.86,
"duration": 8.07
},
{
"text": "I know it begins with a T. I\ndon't know if this is a Y or an I.",
"start": 2606.93,
"duration": 4.56
},
{
"text": "And maybe I know that it has maybe\none or two characters after it.",
"start": 2611.49,
"duration": 4.62
},
{
"text": "So I'll try this one.",
"start": 2616.11,
"duration": 1.5
},
{
"text": "Now I have three underscores,\nsingle underscore.",
"start": 2617.61,
"duration": 3.21
},
{
"text": "So match any book title that\nhas T and then any three",
"start": 2620.82,
"duration": 4.38
},
{
"text": "individual characters after it.",
"start": 2625.2,
"duration": 1.8
},
{
"text": "I'll hit Enter.",
"start": 2627.0,
"duration": 1.29
},
{
"text": "And I'll see I get back Tyll.",
"start": 2628.29,
"duration": 2.01
},
{
"text": "This is the only title that has T\nand then three characters after it.",
"start": 2630.3,
"duration": 5.7
},
{
"text": "I could try to get better with this.",
"start": 2636.0,
"duration": 1.69
},
{
"text": "I could say maybe I'll accept\nfive or six characters like that.",
"start": 2637.69,
"duration": 3.29
},
{
"text": "Hit Enter.",
"start": 2640.98,
"duration": 1.05
},
{
"text": "And I'll see-- whoops, I\ndidn't compute my query here.",
"start": 2642.03,
"duration": 2.467
},
{
"text": "Let me just try it from the top again.",
"start": 2644.497,
"duration": 1.583
},
{
"text": "I'll say SELECT \"title\"\nfrom \"longlist\" where",
"start": 2646.08,
"duration": 2.79
},
{
"text": "title is like, let's say,\nT-Y underscore, underscore,",
"start": 2648.87,
"duration": 3.9
},
{
"text": "underscore, underscore.",
"start": 2652.77,
"duration": 1.2
},
{
"text": "Hit Semicolon.",
"start": 2653.97,
"duration": 2.82
},
{
"text": "And now I get no matches.",
"start": 2656.79,
"duration": 1.46
},
{
"text": "So there is no book in\nthe database that has T-Y",
"start": 2658.25,
"duration": 3.84
},
{
"text": "and then, let's say, three or four\nunderscores for any character after it.",
"start": 2662.09,
"duration": 6.05
},
{
"text": "OK.",
"start": 2668.14,
"duration": 0.69
},
{
"text": "So this covers our\nuse of LIKE, but let's",
"start": 2668.83,
"duration": 4.08
},
{
"text": "keep going and building\nmore complex conditions",
"start": 2672.91,
"duration": 2.22
},
{
"text": "to find even more answers to questions\nwe have about this data over here.",
"start": 2675.13,
"duration": 5.31
},
{
"text": "Let me think what we should show next.",
"start": 2680.44,
"duration": 3.09
},
{
"text": "We've seen LIKE.",
"start": 2683.53,
"duration": 1.26
},
{
"text": "We've seen some compound conditionals.",
"start": 2684.79,
"duration": 2.07
},
{
"text": "Well, let's go back to trying to find\nbooks that are in a certain year.",
"start": 2686.86,
"duration": 4.53
},
{
"text": "So we saw earlier we\nhad this kind of query.",
"start": 2691.39,
"duration": 3.15
},
{
"text": "We could say SELECT \"title\" and \"year\"\nFROM, let's say, our \"longlist.\"",
"start": 2694.54,
"duration": 6.27
},
{
"text": "Now I can try to find those books\nthat are written or nominated",
"start": 2700.81,
"duration": 3.57
},
{
"text": "in 2022 and 2023.",
"start": 2704.38,
"duration": 2.61
},
{
"text": "But let's say I want to go further.",
"start": 2706.99,
"duration": 1.89
},
{
"text": "I want those from 2019 to 2022,\na span of multiple years here.",
"start": 2708.88,
"duration": 6.25
},
{
"text": "So I could try it like\nthis, WHERE \"year\" equals--",
"start": 2715.13,
"duration": 3.86
},
{
"text": "let's go ahead and say 2019--",
"start": 2718.99,
"duration": 2.31
},
{
"text": "OR \"year\" is 2020 OR \"year\" is 2021.",
"start": 2721.3,
"duration": 6.86
},
{
"text": "And let me make a new line again.",
"start": 2728.16,
"duration": 2.22
},
{
"text": "OR \"year\" is 2022 Semicolon.",
"start": 2730.38,
"duration": 5.81
},
{
"text": "And before I run this query,\nlet me ask our audience,",
"start": 2736.19,
"duration": 3.75
},
{
"text": "what strikes you as being not very\nwell designed about this query?",
"start": 2739.94,
"duration": 4.97
},
{
"text": "What could I be doing better here?",
"start": 2744.91,
"duration": 2.65
},
{
"text": "So I'm seeing maybe one improvement\nis that I don't need to write out",
"start": 2747.56,
"duration": 5.09
},
{
"text": "OR \"year\" is this, OR \"year\" is that.",
"start": 2752.65,
"duration": 3.3
},
{
"text": "I could probably do better with this.",
"start": 2755.95,
"duration": 1.95
},
{
"text": "And let's introduce some\nnew keywords for working",
"start": 2757.9,
"duration": 2.73
},
{
"text": "with ranges in terms of our conditions.",
"start": 2760.63,
"duration": 3.61
},
{
"text": "So here, we can see some\nnew operators to use.",
"start": 2764.24,
"duration": 4.22
},
{
"text": "We have this greater than\nsign, this less than sign,",
"start": 2768.46,
"duration": 3.99
},
{
"text": "greater than or equal to,\nand less than or equal to.",
"start": 2772.45,
"duration": 2.91
},
{
"text": "And we can use these to build\nranges inside of our queries to say,",
"start": 2775.36,
"duration": 4.44
},
{
"text": "I want something to be greater than this\nnumber or less than this number too.",
"start": 2779.8,
"duration": 4.83
},
{
"text": "And we can combine these\nwith AND and our OR",
"start": 2784.63,
"duration": 2.55
},
{
"text": "we saw before to get back in\nthis case some set of rows",
"start": 2787.18,
"duration": 4.26
},
{
"text": "that match what we intend to find.",
"start": 2791.44,
"duration": 2.79
},
{
"text": "So let me go back and\ntry some of these out.",
"start": 2794.23,
"duration": 2.22
},
{
"text": "I'll try to improve the\ndesign of this query.",
"start": 2796.45,
"duration": 3.39
},
{
"text": "Let me first run it, and we'll\nsee we do get back 2019 to 2022.",
"start": 2799.84,
"duration": 6.51
},
{
"text": "But I could probably do better.",
"start": 2806.35,
"duration": 1.63
},
{
"text": "So let's try using\nour new operators here",
"start": 2807.98,
"duration": 2.78
},
{
"text": "that can give us some\nrange capabilities.",
"start": 2810.76,
"duration": 2.61
},
{
"text": "I'll say SELECT \"title\" and also\nSELECT \"year\" from \"longlist.\"",
"start": 2813.37,
"duration": 6.42
},
{
"text": "But now I want those rows where the\nyear is greater than or equal to 2019,",
"start": 2819.79,
"duration": 7.29
},
{
"text": "and the year is less than\nor equal to 2022 Semicolon.",
"start": 2827.08,
"duration": 6.3
},
{
"text": "I'll hit Enter.",
"start": 2833.38,
"duration": 1.57
},
{
"text": "Notice I'll get the very same results.",
"start": 2834.95,
"duration": 2.16
},
{
"text": "So I get all those same rows.",
"start": 2837.11,
"duration": 1.91
},
{
"text": "But now my query is much smaller.",
"start": 2839.02,
"duration": 2.68
},
{
"text": "It's making use of these range\noperators I've seen so far.",
"start": 2841.7,
"duration": 4.64
},
{
"text": "I could even further improve this.",
"start": 2846.34,
"duration": 2.59
},
{
"text": "I could make this a\nlittle better designed to.",
"start": 2848.93,
"duration": 2.45
},
{
"text": "Let me go back to some slides and\nshow you we could use these keywords",
"start": 2851.38,
"duration": 3.21
},
{
"text": "BETWEEN blank AND blank, where\nthis can be some condition",
"start": 2854.59,
"duration": 4.92
},
{
"text": "or some number in this case.",
"start": 2859.51,
"duration": 1.72
},
{
"text": "I could say between,\nlet's say, 2019 AND 2022.",
"start": 2861.23,
"duration": 5.09
},
{
"text": "This is inclusive.",
"start": 2866.32,
"duration": 1.42
},
{
"text": "So if I say 2019 AND 2022, I'll get back\na query that includes 2019 and 2022.",
"start": 2867.74,
"duration": 8.54
},
{
"text": "So let me try this one.",
"start": 2876.28,
"duration": 1.62
},
{
"text": "I'll go back over here.",
"start": 2877.9,
"duration": 1.23
},
{
"text": "And I will now try\nSELECT \"title\" and \"year\"",
"start": 2879.13,
"duration": 5.04
},
{
"text": "from \"longlist,\" WHERE the\n\"year\" is between 2019 AND 2022.",
"start": 2884.17,
"duration": 8.2
},
{
"text": "Same results now, which is a different\nway of writing this same query.",
"start": 2892.37,
"duration": 5.62
},
{
"text": "Now what else can we\ndo with these ranges?",
"start": 2897.99,
"duration": 3.13
},
{
"text": "Well, as we've said before, these books\nactually have some ratings involved.",
"start": 2901.12,
"duration": 5.36
},
{
"text": "These ratings are\ncrowdsourced from Goodreads,",
"start": 2906.48,
"duration": 2.55
},
{
"text": "a site you can review books online.",
"start": 2909.03,
"duration": 2.37
},
{
"text": "And I want to find maybe the books\nthat have a rating of 4.0 or higher.",
"start": 2911.4,
"duration": 4.17
},
{
"text": "Well, I could do that now with my ranges\nI could say SELECT \"title\" and \"rating\"",
"start": 2915.57,
"duration": 5.7
},
{
"text": "from my \"longlist.\"",
"start": 2921.27,
"duration": 1.74
},
{
"text": "And I could say WHERE the \"rating\"\nis greater than 4.0 Semicolon.",
"start": 2923.01,
"duration": 5.91
},
{
"text": "I'll hit Enter.",
"start": 2928.92,
"duration": 1.02
},
{
"text": "And I'll see now only those\nbooks that have a rating of 4.0",
"start": 2929.94,
"duration": 5.16
},
{
"text": "or higher like this.",
"start": 2935.1,
"duration": 3.56
},
{
"text": "I could even combine conditions.",
"start": 2938.66,
"duration": 2.31
},
{
"text": "So I know that these books\nhave a certain rating,",
"start": 2940.97,
"duration": 2.54
},
{
"text": "but how many votes do they really get?",
"start": 2943.51,
"duration": 2.22
},
{
"text": "Well, let's take a peek.",
"start": 2945.73,
"duration": 1.48
},
{
"text": "I'll come back over here.",
"start": 2947.21,
"duration": 1.25
},
{
"text": "And let me try this one.",
"start": 2948.46,
"duration": 2.34
},
{
"text": "I could say SELECT \"title.\"",
"start": 2950.8,
"duration": 2.98
},
{
"text": "Oops, let me clear my terminal\nagain so it's back up top.",
"start": 2953.78,
"duration": 3.34
},
{
"text": "SELECT \"title\" and\n\"rating\" and the number of",
"start": 2957.12,
"duration": 5.76
},
{
"text": "votes that these books got from,\nlet's say, our \"longlist\" table.",
"start": 2962.88,
"duration": 5.16
},
{
"text": "Now, I want to find those that\nhave a rating of greater than 4.0,",
"start": 2968.04,
"duration": 6.36
},
{
"text": "and, let's say, a number of votes--",
"start": 2974.4,
"duration": 4.28
},
{
"text": "a number of votes which\nis greater than at least--",
"start": 2978.68,
"duration": 2.4
},
{
"text": "let's go with 10,000.",
"start": 2981.08,
"duration": 2.25
},
{
"text": "So at least we know a good number of\nfolks actually voted on these books",
"start": 2983.33,
"duration": 3.63
},
{
"text": "to find the best among them.",
"start": 2986.96,
"duration": 2.01
},
{
"text": "I'll Enter.",
"start": 2988.97,
"duration": 1.02
},
{
"text": "And now I'll see we're\nonly down to a few books,",
"start": 2989.99,
"duration": 3.63
},
{
"text": "four in fact, where each one\nhas a rating higher than 4.0.",
"start": 2993.62,
"duration": 4.65
},
{
"text": "And indeed, every vote row has a vote\ntotal greater than 10,000 in this case.",
"start": 2998.27,
"duration": 8.22
},
{
"text": "So a good way to try to find the\ntop books in our data set here.",
"start": 3006.49,
"duration": 5.61
},
{
"text": "Let's keep going with these ranges.",
"start": 3012.1,
"duration": 1.82
},
{
"text": "And let's think about one\nmore thing we could do.",
"start": 3013.92,
"duration": 3.27
},
{
"text": "Maybe I want to find books that\nare less than a certain length.",
"start": 3017.19,
"duration": 2.85
},
{
"text": "So I'll try that as well.",
"start": 3020.04,
"duration": 1.65
},
{
"text": "I'll say SELECT, let's say, \"title\"\nand \"pages\" from my \"longlist.\"",
"start": 3021.69,
"duration": 5.49
},
{
"text": "And now I can make a\ncondition based on pages.",
"start": 3027.18,
"duration": 2.82
},
{
"text": "I'll say WHERE \"pages\" is less than 300.",
"start": 3030.0,
"duration": 3.69
},
{
"text": "Hit Enter.",
"start": 3033.69,
"duration": 1.11
},
{
"text": "And now I should see that\nI have all these books that",
"start": 3034.8,
"duration": 3.0
},
{
"text": "are less than 300 pages long\nwhen they were first published.",
"start": 3037.8,
"duration": 5.47
},
{
"text": "So let's pause here\nand ask what questions",
"start": 3043.27,
"duration": 2.06
},
{
"text": "we have on these range conditions.",
"start": 3045.33,
"duration": 3.69
},
{
"text": "SPEAKER: I just wanted to check\nif for a proper query in this case",
"start": 3049.02,
"duration": 6.21
},
{
"text": "to be able to run operations, they\nhave to be integers in the database.",
"start": 3055.23,
"duration": 5.01
},
{
"text": "And my second question is for\nwhen we're matching a string,",
"start": 3060.24,
"duration": 3.84
},
{
"text": "is it case-sensitive or not?",
"start": 3064.08,
"duration": 2.123
},
{
"text": "CARTER ZENKE: Yeah, two great questions.",
"start": 3066.203,
"duration": 1.667
},
{
"text": "So the first one here is going to be,\ndo I have to use integers in this case?",
"start": 3067.87,
"duration": 4.65
},
{
"text": "And what types, maybe, should I use?",
"start": 3072.52,
"duration": 1.79
},
{
"text": "And the second one being, could I\nmatch strings like case insensitively?",
"start": 3074.31,
"duration": 3.54
},
{
"text": "So for the first one,\nin this case, it'll",
"start": 3077.85,
"duration": 3.09
},
{
"text": "depend on the design of your database.",
"start": 3080.94,
"duration": 2.17
},
{
"text": "So we'll see later on\nin the course, how we",
"start": 3083.11,
"duration": 2.03
},
{
"text": "can choose the types for our columns.",
"start": 3085.14,
"duration": 2.28
},
{
"text": "And how that might impact the types\nwe actually use in our queries.",
"start": 3087.42,
"duration": 3.84
},
{
"text": "For now, I made this database.",
"start": 3091.26,
"duration": 2.14
},
{
"text": "So I just know that my\nyear column is an integer,",
"start": 3093.4,
"duration": 3.35
},
{
"text": "my ratings column is a real number\nor a float, if you're familiar,",
"start": 3096.75,
"duration": 3.27
},
{
"text": "and my votes is an integer.",
"start": 3100.02,
"duration": 1.54
},
{
"text": "So I just know to use\nthose numbers there.",
"start": 3101.56,
"duration": 2.24
},
{
"text": "To the question of matching\nthings case-insensitively,",
"start": 3103.8,
"duration": 3.66
},
{
"text": "let's actually revisit LIKE just briefly\nhere to show you what that can do.",
"start": 3107.46,
"duration": 3.36
},
{
"text": "So I go back to my terminal, and let's\nsay I want to find just a book title.",
"start": 3110.82,
"duration": 7.34
},
{
"text": "And I want to type it\nin kind of sloppily.",
"start": 3118.16,
"duration": 1.75
},
{
"text": "I don't want to capitalize\nit like capital books are.",
"start": 3119.91,
"duration": 2.208
},
{
"text": "So I'll say SELECT let's\nsay \"title\" from \"longlist.\"",
"start": 3122.118,
"duration": 4.632
},
{
"text": "And maybe, I'll want to\nfind that book Pyre again.",
"start": 3126.75,
"duration": 4.18
},
{
"text": "So I could say WHERE \"title\" is\nLIKE 'pyre', but all in lowercase.",
"start": 3130.93,
"duration": 6.78
},
{
"text": "Now I'll hit Enter.",
"start": 3137.71,
"duration": 1.4
},
{
"text": "And I'll see I do get back Pyre.",
"start": 3139.11,
"duration": 2.43
},
{
"text": "So even though I said WHERE \"title\"\nis LIKE lowercase 'pyre', I got back",
"start": 3141.54,
"duration": 5.97
},
{
"text": "capital Pyre.",
"start": 3147.51,
"duration": 2.37
},
{
"text": "Now this is in contrast to saying\nWHERE \"title\" equals lowercase 'pyre'.",
"start": 3149.88,
"duration": 5.22
},
{
"text": "Let's try that.",
"start": 3155.1,
"duration": 1.51
},
{
"text": "I'll come back over here.",
"start": 3156.61,
"duration": 1.22
},
{
"text": "And I'll say again SELECT\n\"title\" from \"longlist,\"",
"start": 3157.83,
"duration": 5.73
},
{
"text": "but now WHERE \"title\" equals,\nquote, unquote, 'pyre' Semicolon.",
"start": 3163.56,
"duration": 9.27
},
{
"text": "I'll hit Enter.",
"start": 3172.83,
"duration": 0.96
},
{
"text": "And now I see no results.",
"start": 3173.79,
"duration": 1.78
},
{
"text": "So in this case, the equal is\ngoing to be case-sensitive.",
"start": 3175.57,
"duration": 3.44
},
{
"text": "Case matters in this case,\nbut LIKE is case-insensitive.",
"start": 3179.01,
"duration": 6.31
},
{
"text": "OK.",
"start": 3185.32,
"duration": 1.67
},
{
"text": "Why don't we keep going then?",
"start": 3186.99,
"duration": 2.858
},
{
"text": "And let's take a look\nat a few other things",
"start": 3189.848,
"duration": 1.792
},
{
"text": "we can do with these SQL\nkeywords for querying.",
"start": 3191.64,
"duration": 3.81
},
{
"text": "Well, earlier, we were\ntrying to find a way",
"start": 3195.45,
"duration": 2.79
},
{
"text": "to find the best books in our data set.",
"start": 3198.24,
"duration": 3.24
},
{
"text": "And we did that by filtering\nthem based on some ranges.",
"start": 3201.48,
"duration": 3.33
},
{
"text": "But we could probably do\nthat a little bit more",
"start": 3204.81,
"duration": 2.4
},
{
"text": "methodically in this case using a new\nkeyword, this one called ORDER BY.",
"start": 3207.21,
"duration": 5.97
},
{
"text": "So ORDER BY allows us to\ntake the results of our query",
"start": 3213.18,
"duration": 4.8
},
{
"text": "and order them, as it suggests,\nby some column itself.",
"start": 3217.98,
"duration": 5.02
},
{
"text": "So we could put them in alphabetical\norder or in order by a number of votes",
"start": 3223.0,
"duration": 4.67
},
{
"text": "or in order by number of ratings.",
"start": 3227.67,
"duration": 2.67
},
{
"text": "And let's just try an example of this\nto see how ORDER BY works for us.",
"start": 3230.34,
"duration": 4.02
},
{
"text": "But in the end, we'll see it can\narrange columns, arrange rows for us",
"start": 3234.36,
"duration": 4.35
},
{
"text": "in our resulting query.",
"start": 3238.71,
"duration": 1.72
},
{
"text": "So I'll go back to my computer.",
"start": 3240.43,
"duration": 2.36
},
{
"text": "And let's try this question here.",
"start": 3242.79,
"duration": 2.04
},
{
"text": "I want to try to find the\ntop 10 books in my table.",
"start": 3244.83,
"duration": 4.57
},
{
"text": "So I'll say SELECT \"title\"\nand \"rating\" from \"longlist.\"",
"start": 3249.4,
"duration": 7.48
},
{
"text": "Enter.",
"start": 3256.88,
"duration": 1.2
},
{
"text": "Not only query yet though.",
"start": 3258.08,
"duration": 1.74
},
{
"text": "Now I'll say ORDER BY the rating.",
"start": 3259.82,
"duration": 4.82
},
{
"text": "And let's only take the top 10.",
"start": 3264.64,
"duration": 2.16
},
{
"text": "So I'll say limit 10 in\nthis instance Semicolon.",
"start": 3266.8,
"duration": 4.32
},
{
"text": "So now I've combined some\nof my prior keywords.",
"start": 3271.12,
"duration": 3.21
},
{
"text": "I'm using SELECT.",
"start": 3274.33,
"duration": 1.17
},
{
"text": "I'm using ORDER BY.",
"start": 3275.5,
"duration": 1.29
},
{
"text": "And I'm still using\nour old friend LIMIT.",
"start": 3276.79,
"duration": 2.05
},
{
"text": "So let me hit Enter here.",
"start": 3278.84,
"duration": 1.85
},
{
"text": "And I'll get back, well,\nnot quite the top 10.",
"start": 3280.69,
"duration": 5.36
},
{
"text": "I see rating of 3.05 here\nand rating of 3.42 down here.",
"start": 3286.05,
"duration": 6.19
},
{
"text": "So based on this, what do you think\nthe default ordering of ORDER BY is?",
"start": 3292.24,
"duration": 7.76
},
{
"text": "So you might be from least to greatest.",
"start": 3300.0,
"duration": 2.02
},
{
"text": "So we saw here that we have\nrating being pretty small,",
"start": 3302.02,
"duration": 3.41
},
{
"text": "but we said ORDER BY our rating.",
"start": 3305.43,
"duration": 1.71
},
{
"text": "So it starts from small\nand goes down to large.",
"start": 3307.14,
"duration": 3.3
},
{
"text": "So we need to fix this in some way.",
"start": 3310.44,
"duration": 1.98
},
{
"text": "And let's introduce a\nnew addition to ORDER BY",
"start": 3312.42,
"duration": 2.82
},
{
"text": "to have us fix this query overall.",
"start": 3315.24,
"duration": 3.58
},
{
"text": "So let me show you that ORDER BY does\nby default sort from least to greatest.",
"start": 3318.82,
"duration": 6.11
},
{
"text": "But let's try some addition here.",
"start": 3324.93,
"duration": 2.64
},
{
"text": "We have not just ORDER BY\nbut ORDER BY some column",
"start": 3327.57,
"duration": 4.26
},
{
"text": "and then ascending or descending.",
"start": 3331.83,
"duration": 3.7
},
{
"text": "So ascending is the default. It\nmeans from least to greatest.",
"start": 3335.53,
"duration": 3.95
},
{
"text": "Descending, we can specify\nmeaning from greatest to smallest.",
"start": 3339.48,
"duration": 4.78
},
{
"text": "So let's try using ORDER BY\nbut now with this other keyword",
"start": 3344.26,
"duration": 3.05
},
{
"text": "called DESC for descending here.",
"start": 3347.31,
"duration": 3.21
},
{
"text": "I'll go back to my terminal.",
"start": 3350.52,
"duration": 3.24
},
{
"text": "And let's rewrite this\nquery to include DESC.",
"start": 3353.76,
"duration": 3.45
},
{
"text": "I'll say SELECT \"title\" and\n\"rating\" from \"longlist.\"",
"start": 3357.21,
"duration": 5.49
},
{
"text": "And let me-- before\nI run this query, let",
"start": 3362.7,
"duration": 1.932
},
{
"text": "me just clear my terminal\nso it's back up at the top.",
"start": 3364.632,
"duration": 2.208
},
{
"text": "I'll backspace this.",
"start": 3366.84,
"duration": 1.74
},
{
"text": "And then a moment here, I'll press\nControl-L. Now I'm back at the top.",
"start": 3368.58,
"duration": 4.47
},
{
"text": "I'll say SELECT \"title\", SELECT \"title\"\nand \"rating\" from \"longlist\" WHERE--",
"start": 3373.05,
"duration": 8.797
},
{
"text": "actually, not WHERE.",
"start": 3381.847,
"duration": 0.833
},
{
"text": "We're not filtering yet.",
"start": 3382.68,
"duration": 1.14
},
{
"text": "I'll say ORDER BY rating but\nnot by ascending by default--",
"start": 3383.82,
"duration": 6.262
},
{
"text": "going from least to greatest.",
"start": 3390.082,
"duration": 1.208
},
{
"text": "I want greatest to least.",
"start": 3391.29,
"duration": 1.72
},
{
"text": "So I'll say DESC here.",
"start": 3393.01,
"duration": 2.36
},
{
"text": "Now, I can say LIMIT 10 Semicolon.",
"start": 3395.37,
"duration": 3.51
},
{
"text": "Hit Enter.",
"start": 3398.88,
"duration": 0.96
},
{
"text": "And now I'll see the top 10 books.",
"start": 3399.84,
"duration": 2.7
},
{
"text": "Here, I have The Eighth Life coming\nin at 4.52 and The Books of Jacob",
"start": 3402.54,
"duration": 4.62
},
{
"text": "coming in at 4.06.",
"start": 3407.16,
"duration": 2.52
},
{
"text": "So now we're going from\ngreatest to smallest.",
"start": 3409.68,
"duration": 3.78
},
{
"text": "Well, I could order by\nnot just these ratings,",
"start": 3413.46,
"duration": 3.42
},
{
"text": "but also by the number of votes.",
"start": 3416.88,
"duration": 2.34
},
{
"text": "It seems there's a tie to break here.",
"start": 3419.22,
"duration": 1.68
},
{
"text": "If I look at Still Born and When\nWe Cease to Understand the World,",
"start": 3420.9,
"duration": 3.99
},
{
"text": "those both have a rating of 4.14.",
"start": 3424.89,
"duration": 2.91
},
{
"text": "But presumably, one book has\nmaybe more votes than the other.",
"start": 3427.8,
"duration": 4.63
},
{
"text": "So I could try to break this tie by\nordering not just by rating but also",
"start": 3432.43,
"duration": 5.93
},
{
"text": "by votes, the number votes this book\nactually received on Good Reads.",
"start": 3438.36,
"duration": 4.17
},
{
"text": "So let's try that then\nto break this tie.",
"start": 3442.53,
"duration": 2.76
},
{
"text": "I'll come back over here.",
"start": 3445.29,
"duration": 1.44
},
{
"text": "And I'll try this query now.",
"start": 3446.73,
"duration": 2.76
},
{
"text": "I'll say, again, SELECT \"title\"\nand \"rating\" from \"longlist.\"",
"start": 3449.49,
"duration": 6.3
},
{
"text": "Now I'll order by, first, the\nrating column in descending order.",
"start": 3455.79,
"duration": 6.07
},
{
"text": "But I also want to order by the number\nof votes after I order by rating.",
"start": 3461.86,
"duration": 5.24
},
{
"text": "So I'm saying first order\nby rating, but afterwards,",
"start": 3467.1,
"duration": 3.63
},
{
"text": "followed by a comma, let's\norder by the number of votes",
"start": 3470.73,
"duration": 3.48
},
{
"text": "also in descending order--\nfrom greatest to smallest.",
"start": 3474.21,
"duration": 4.29
},
{
"text": "Now I'll just continue my\nquery on the next line.",
"start": 3478.5,
"duration": 2.67
},
{
"text": "And I'll say LIMIT 10 Semicolon.",
"start": 3481.17,
"duration": 2.91
},
{
"text": "This then gives me, let's\nsee, the books but now",
"start": 3484.08,
"duration": 5.04
},
{
"text": "they're going to be in the order that\nallows us to see the number of votes.",
"start": 3489.12,
"duration": 3.85
},
{
"text": "Let me just actually refine this.",
"start": 3492.97,
"duration": 1.41
},
{
"text": "Let me say not just title\nand rating, let's make",
"start": 3494.38,
"duration": 2.732
},
{
"text": "sure we can see the votes here too.",
"start": 3497.112,
"duration": 1.458
},
{
"text": "So SELECT \"title\" and \"rating\"\nand \"votes\" from \"longlist.\"",
"start": 3498.57,
"duration": 5.01
},
{
"text": "Hit Enter on my query.",
"start": 3503.58,
"duration": 1.23
},
{
"text": "Now I'll say ORDER BY\n\"rating\" and \"votes.\"",
"start": 3504.81,
"duration": 2.94
},
{
"text": "Then I'll say LIMIT 10.",
"start": 3507.75,
"duration": 1.8
},
{
"text": "And here, I'm just getting\nthe Up Arrow on my computer.",
"start": 3509.55,
"duration": 2.61
},
{
"text": "I'll hit Enter.",
"start": 3512.16,
"duration": 1.5
},
{
"text": "And now I'll see the votes included.",
"start": 3513.66,
"duration": 2.49
},
{
"text": "So let me show you\nthis on the big screen.",
"start": 3516.15,
"duration": 1.92
},
{
"text": "Here, we see that the tie is broken.",
"start": 3518.07,
"duration": 2.37
},
{
"text": "So when we cease to\nunderstand the world,",
"start": 3520.44,
"duration": 2.16
},
{
"text": "these both have 4.14\nalong with Still Born.",
"start": 3522.6,
"duration": 3.96
},
{
"text": "But here, this book has more votes\nand so is higher in our order",
"start": 3526.56,
"duration": 4.98
},
{
"text": "now that we've ordered\nby multiple columns.",
"start": 3531.54,
"duration": 4.37
},
{
"text": "So let me pause here\nand ask what questions",
"start": 3535.91,
"duration": 2.33
},
{
"text": "we have on ordering with data.",
"start": 3538.24,
"duration": 3.39
},
{
"text": "Ordering by one column or multiple,\nand how we can sort data like this.",
"start": 3541.63,
"duration": 5.85
},
{
"text": "SPEAKER: Sir, I want to know that\ncan we write rating to 4.93 to 4.9?",
"start": 3547.48,
"duration": 6.875
},
{
"text": "CARTER ZENKE: Yeah good question.",
"start": 3554.355,
"duration": 1.375
},
{
"text": "I think if I understand you\ncorrectly, how can we select a rating",
"start": 3555.73,
"duration": 2.85
},
{
"text": "or try to find a rating that's like\nequal to 4.92 or things like that.",
"start": 3558.58,
"duration": 4.24
},
{
"text": "Let's try that here.",
"start": 3562.82,
"duration": 0.96
},
{
"text": "So if I want to find\na particular rating,",
"start": 3563.78,
"duration": 2.57
},
{
"text": "I could simply use my\nWHERE friend from before.",
"start": 3566.35,
"duration": 3.9
},
{
"text": "I could say SELECT, let's\nsay, \"title\" and \"rating.\"",
"start": 3570.25,
"duration": 4.14
},
{
"text": "And maybe I could try to find\na particular rating for a book",
"start": 3574.39,
"duration": 3.36
},
{
"text": "from longlist.",
"start": 3577.75,
"duration": 1.65
},
{
"text": "I could say then WHERE this rating is\nequal to, let's say, 4.932 Semicolon.",
"start": 3579.4,
"duration": 7.47
},
{
"text": "If this book exists, it\nwill get it back here.",
"start": 3586.87,
"duration": 2.29
},
{
"text": "So I'll hit Enter.",
"start": 3589.16,
"duration": 1.01
},
{
"text": "And I see there's no book with\nthis particular rating, 4.392.",
"start": 3590.17,
"duration": 5.64
},
{
"text": "But good question for how to find\nparticular ratings for our books here.",
"start": 3595.81,
"duration": 5.7
},
{
"text": "OK.",
"start": 3601.51,
"duration": 0.87
},
{
"text": "Other questions too on how we've been\nable to sort our data and use ORDER BY?",
"start": 3602.38,
"duration": 6.75
},
{
"text": "SPEAKER: Will descend work on a\nstring on an alphabetic basis?",
"start": 3609.13,
"duration": 3.87
},
{
"text": "Or do we need to have special\nconditions for alphabetic characters?",
"start": 3613.0,
"duration": 5.098
},
{
"text": "CARTER ZENKE: Yeah, a great question.",
"start": 3618.098,
"duration": 1.542
},
{
"text": "So how could we use ORDER BY with some\ncharacters or strings or some text",
"start": 3619.64,
"duration": 4.1
},
{
"text": "in our database?",
"start": 3623.74,
"duration": 0.85
},
{
"text": "Let's try that one out too and\nsee how that works with ASC",
"start": 3624.59,
"duration": 3.2
},
{
"text": "for ascending and DESC for descending.",
"start": 3627.79,
"duration": 2.97
},
{
"text": "So I'll go back to my terminal.",
"start": 3630.76,
"duration": 1.59
},
{
"text": "And I'll demonstrate here how\nwe can use this for some text.",
"start": 3632.35,
"duration": 3.36
},
{
"text": "So let's try to simply sorting our\nbooks alphabetically for, let's say,",
"start": 3635.71,
"duration": 5.07
},
{
"text": "our library.",
"start": 3640.78,
"duration": 1.02
},
{
"text": "I'll say SELECT \"title\"\nfrom \"longlist,\" Enter.",
"start": 3641.8,
"duration": 5.1
},
{
"text": "And I want to order by\ntitle, just plain and simple.",
"start": 3646.9,
"duration": 3.31
},
{
"text": "And then hit Semicolon.",
"start": 3650.21,
"duration": 1.38
},
{
"text": "Let's see what happens.",
"start": 3651.59,
"duration": 1.16
},
{
"text": "I'll hit Enter.",
"start": 3652.75,
"duration": 1.41
},
{
"text": "And now I'll see that\nthese books are ordered.",
"start": 3654.16,
"duration": 3.54
},
{
"text": "But they seem to be\nordered alphabetically.",
"start": 3657.7,
"duration": 2.28
},
{
"text": "So here, we have some titles\nlower in the alphabet.",
"start": 3659.98,
"duration": 3.72
},
{
"text": "And up here, we have titles\nearlier in the alphabet.",
"start": 3663.7,
"duration": 2.62
},
{
"text": "So by default ORDER BY seems\nto order alphabetically.",
"start": 3666.32,
"duration": 4.46
},
{
"text": "If I change that default, though,\nfrom ascending to descending,",
"start": 3670.78,
"duration": 4.29
},
{
"text": "let's see what happens.",
"start": 3675.07,
"duration": 1.89
},
{
"text": "I'll go back over here.",
"start": 3676.96,
"duration": 1.29
},
{
"text": "And I'll try the same\nquery but now using DESC.",
"start": 3678.25,
"duration": 4.74
},
{
"text": "SELECT \"title\" from \"longlist.\"",
"start": 3682.99,
"duration": 1.77
},
{
"text": "ORDER BY \"title\" now\nin descending order.",
"start": 3684.76,
"duration": 4.35
},
{
"text": "Hit Enter.",
"start": 3689.11,
"duration": 1.29
},
{
"text": "And now I'll see these titles\nin reverse alphabetical order.",
"start": 3690.4,
"duration": 4.23
},
{
"text": "So notice how earlier on, we have\ntitles that are lower in the alphabet.",
"start": 3694.63,
"duration": 4.56
},
{
"text": "But down below, we have titles that\nare earlier in the alphabet here.",
"start": 3699.19,
"duration": 3.55
},
{
"text": "So you can use ORDER\nBY with these texts.",
"start": 3702.74,
"duration": 3.59
},
{
"text": "But you then have to specify whether\nyou want it in alphabetical order",
"start": 3706.33,
"duration": 3.36
},
{
"text": "or in reverse alphabetical order.",
"start": 3709.69,
"duration": 4.27
},
{
"text": "OK, so let's show a\nfew other concepts here",
"start": 3713.96,
"duration": 4.74
},
{
"text": "we can use alongside of these orderings.",
"start": 3718.7,
"duration": 3.04
},
{
"text": "One thing we could also do is\ntry to find more information",
"start": 3721.74,
"duration": 4.34
},
{
"text": "about the ratings of these books.",
"start": 3726.08,
"duration": 1.77
},
{
"text": "So let's say I want not\njust to order these books",
"start": 3727.85,
"duration": 3.12
},
{
"text": "but try to find the average rating,\nor to try to find the number of books,",
"start": 3730.97,
"duration": 4.74
},
{
"text": "or try to find let's say maybe the sum\nof my total votes on each of my books.",
"start": 3735.71,
"duration": 5.37
},
{
"text": "Well, for this, we could\nintroduce some new concepts,",
"start": 3741.08,
"duration": 3.78
},
{
"text": "these ones called SQL's\naggregate functions.",
"start": 3744.86,
"duration": 4.2
},
{
"text": "These allow us to take a whole set of\nrows and return not each of those rows",
"start": 3749.06,
"duration": 6.33
},
{
"text": "individually.",
"start": 3755.39,
"duration": 1.17
},
{
"text": "But instead, in this case, one number\nbased on the values in those rows.",
"start": 3756.56,
"duration": 5.73
},
{
"text": "You could imagine trying to\ncount the number of rows you have",
"start": 3762.29,
"duration": 3.06
},
{
"text": "or take the average\nof the number of rows,",
"start": 3765.35,
"duration": 2.61
},
{
"text": "or take the average of let's\nsay a rating, for instance.",
"start": 3767.96,
"duration": 2.67
},
{
"text": "Finding the minimum rating\nof the maximum rating",
"start": 3770.63,
"duration": 2.07
},
{
"text": "or finding the sum of some votes.",
"start": 3772.7,
"duration": 2.49
},
{
"text": "And we'll see each of\nthese in action here.",
"start": 3775.19,
"duration": 3.04
},
{
"text": "Let's go back to our terminal,\ntry some of these out.",
"start": 3778.23,
"duration": 3.23
},
{
"text": "I will try, in this case\nfirst trying to find",
"start": 3781.46,
"duration": 4.26
},
{
"text": "the average rating from my longlist.",
"start": 3785.72,
"duration": 2.9
},
{
"text": "Well, I just from experience,\nand as you now know too,",
"start": 3788.62,
"duration": 3.43
},
{
"text": "I can try to find the\naverage of some column",
"start": 3792.05,
"duration": 2.82
},
{
"text": "by using the AVG aggregate function.",
"start": 3794.87,
"duration": 3.52
},
{
"text": "So I'll say SELECT not\njust rating in this case",
"start": 3798.39,
"duration": 4.58
},
{
"text": "but select the average\nrating FROM \"longlist.\"",
"start": 3802.97,
"duration": 4.95
},
{
"text": "Notice how in this case, I'm using this\nkind of syntax, where I take rating,",
"start": 3807.92,
"duration": 5.64
},
{
"text": "my column I want to aggregate or\nto sum up or to average like this.",
"start": 3813.56,
"duration": 4.77
},
{
"text": "And I apply the function\nby saying its name",
"start": 3818.33,
"duration": 3.18
},
{
"text": "followed by some parentheses\naround that column name.",
"start": 3821.51,
"duration": 3.67
},
{
"text": "So this will return to\nme not all of the rating",
"start": 3825.18,
"duration": 2.45
},
{
"text": "rows but the average of the\nrating rows in one single cell.",
"start": 3827.63,
"duration": 4.8
},
{
"text": "Let me try this.",
"start": 3832.43,
"duration": 1.65
},
{
"text": "I'll come back, and I\nwill then hit Enter.",
"start": 3834.08,
"duration": 2.91
},
{
"text": "And I'll see this is the average rating.",
"start": 3836.99,
"duration": 3.45
},
{
"text": "We have 3.7537179471795 is our\naverage rating for all of these books.",
"start": 3840.44,
"duration": 8.28
},
{
"text": "But of course, this isn't great.",
"start": 3848.72,
"duration": 3.06
},
{
"text": "What might I want to do if I was\ngoing to show this to somebody else?",
"start": 3851.78,
"duration": 4.14
},
{
"text": "I could probably improve the\npresentation of this in some way.",
"start": 3855.92,
"duration": 5.02
},
{
"text": "So I could probably round\nthis result. I have 3.75371,",
"start": 3860.94,
"duration": 4.7
},
{
"text": "we can probably stop after\ntwo decimal points, right?",
"start": 3865.64,
"duration": 2.88
},
{
"text": "Just simply like 3.75.",
"start": 3868.52,
"duration": 2.1
},
{
"text": "So I could introduce some new keyword\nhere, this one around the results.",
"start": 3870.62,
"duration": 4.71
},
{
"text": "Let me show you this one in action.",
"start": 3875.33,
"duration": 2.52
},
{
"text": "I'll come back, and I'll try\nnot just select average rating",
"start": 3877.85,
"duration": 3.69
},
{
"text": "but select the rounded average rating.",
"start": 3881.54,
"duration": 2.83
},
{
"text": "So I'll say SELECT ROUND and then\ntake average of \"rating\" and round",
"start": 3884.37,
"duration": 7.55
},
{
"text": "to 2 decimal points FROM\n\"longlist\" Semicolon.",
"start": 3891.92,
"duration": 6.3
},
{
"text": "So now this query decides to first\nfind the average of the rating column.",
"start": 3898.22,
"duration": 6.69
},
{
"text": "Then take the result and round\nit using two decimal points.",
"start": 3904.91,
"duration": 5.95
},
{
"text": "Notice how round takes two inputs\nor two arguments, the first one",
"start": 3910.86,
"duration": 3.65
},
{
"text": "being the rating, the average\nrating, the second one being number",
"start": 3914.51,
"duration": 3.99
},
{
"text": "of decimal points to round, 2.",
"start": 3918.5,
"duration": 1.8
},
{
"text": "And we complete our query in the way we\nusually do by saying FROM this table.",
"start": 3920.3,
"duration": 4.33
},
{
"text": "So let's try this one\nto figure this out.",
"start": 3924.63,
"duration": 2.24
},
{
"text": "I'll come back.",
"start": 3926.87,
"duration": 0.75
},
{
"text": "And I'll hit Enter.",
"start": 3927.62,
"duration": 1.5
},
{
"text": "And now I'll see we do get back 3.75.",
"start": 3929.12,
"duration": 3.99
},
{
"text": "But there is still one\nthing to improve here.",
"start": 3933.11,
"duration": 2.61
},
{
"text": "When I write this query, I\nsee this ugly title name--",
"start": 3935.72,
"duration": 3.87
},
{
"text": "ROUND average \"rating\" comma 2.",
"start": 3939.59,
"duration": 2.4
},
{
"text": "I wouldn't send this to my\nboss or somebody else who I",
"start": 3941.99,
"duration": 2.785
},
{
"text": "work for or maybe even a friend, right?",
"start": 3944.775,
"duration": 1.625
},
{
"text": "I want to make sure it's pretty\nso they can read it correctly.",
"start": 3946.4,
"duration": 2.77
},
{
"text": "So what could I do then to\ntry to make this prettier?",
"start": 3949.17,
"duration": 4.18
},
{
"text": "I could maybe rename this column.",
"start": 3953.35,
"duration": 1.74
},
{
"text": "I could try to take this and make\nit not just this ugly mess of SQL",
"start": 3955.09,
"duration": 4.59
},
{
"text": "keyword but to give it some\nname I could use instead.",
"start": 3959.68,
"duration": 3.13
},
{
"text": "So for this, we'll\nintroduce a brand new one--",
"start": 3962.81,
"duration": 2.36
},
{
"text": "new brand new keyword called AS.",
"start": 3965.17,
"duration": 2.13
},
{
"text": "Let's try this one too.",
"start": 3967.3,
"duration": 1.8
},
{
"text": "I'll come back, and I'll say SELECT,\nagain, ROUND average \"rating\" comma 2.",
"start": 3969.1,
"duration": 10.02
},
{
"text": "But now, I'll select it AS,\nlet's say, average rating.",
"start": 3979.12,
"duration": 6.14
},
{
"text": "And now before I actually\nfinish this query,",
"start": 3985.26,
"duration": 1.833
},
{
"text": "let me try to bring it up to the top\nmy terminal so we can see it all in one",
"start": 3987.093,
"duration": 3.167
},
{
"text": "go.",
"start": 3990.26,
"duration": 0.57
},
{
"text": "I'll backspace this.",
"start": 3990.83,
"duration": 1.32
},
{
"text": "And I'll say SELECT the rounded\nversion of the average rating rounded",
"start": 3992.15,
"duration": 8.3
},
{
"text": "to 2 decimal points AS--",
"start": 4000.45,
"duration": 2.31
},
{
"text": "let's call this one \"average rating.\"",
"start": 4002.76,
"duration": 2.91
},
{
"text": "Now hit Enter.",
"start": 4005.67,
"duration": 1.11
},
{
"text": "And I'll say FROM my\n\"longlist\" table Semicolon.",
"start": 4006.78,
"duration": 4.59
},
{
"text": "Now, I see it's much prettier overall.",
"start": 4011.37,
"duration": 2.46
},
{
"text": "I have no longer these\nSQL keywords but instead",
"start": 4013.83,
"duration": 3.18
},
{
"text": "just average rating as my column name.",
"start": 4017.01,
"duration": 4.11
},
{
"text": "OK.",
"start": 4021.12,
"duration": 1.44
},
{
"text": "So let me pause here\nand ask questions then",
"start": 4022.56,
"duration": 2.4
},
{
"text": "on using average or using ROUND\nor using AS in these cases.",
"start": 4024.96,
"duration": 7.53
},
{
"text": "SPEAKER: I'm wondering, do these\nsorts of commands have a funct--",
"start": 4032.49,
"duration": 3.87
},
{
"text": "are these commands encode something like\ndata types or just encode something?",
"start": 4036.36,
"duration": 5.4
},
{
"text": "Do these commands also have a name?",
"start": 4041.76,
"duration": 2.238
},
{
"text": "CARTER ZENKE: Yeah.",
"start": 4043.998,
"duration": 0.792
},
{
"text": "And can I ask are you referring\nto the AVG like COUNT like SUM",
"start": 4044.79,
"duration": 3.84
},
{
"text": "those kinds of things, or?",
"start": 4048.63,
"duration": 1.23
},
{
"text": "Yeah.",
"start": 4049.86,
"duration": 0.69
},
{
"text": "So these functions do have a name.",
"start": 4050.55,
"duration": 2.59
},
{
"text": "They are called aggregate functions.",
"start": 4053.14,
"duration": 1.61
},
{
"text": "And aggregate means to\ncombine, to bring together.",
"start": 4054.75,
"duration": 3.1
},
{
"text": "So they're called aggregate functions\nbecause they take some number of rows,",
"start": 4057.85,
"duration": 3.56
},
{
"text": "like all my ratings for instance,\nand bring it down to one single cell,",
"start": 4061.41,
"duration": 4.2
},
{
"text": "like the average or\nthe sum or the count.",
"start": 4065.61,
"duration": 2.92
},
{
"text": "So if you look up or read more\nabout SQL aggregate functions,",
"start": 4068.53,
"duration": 3.5
},
{
"text": "you'll see all of these\nand perhaps some more",
"start": 4072.03,
"duration": 2.04
},
{
"text": "depending on the software you're using.",
"start": 4074.07,
"duration": 3.68
},
{
"text": "OK.",
"start": 4077.75,
"duration": 0.78
},
{
"text": "So let's keep going then and try\nto start counting some other rows",
"start": 4078.53,
"duration": 4.44
},
{
"text": "and use our other\naggregate functions here.",
"start": 4082.97,
"duration": 1.98
},
{
"text": "I'll go back to my terminal.",
"start": 4084.95,
"duration": 1.89
},
{
"text": "And so far, we've seen average, as\nwell as we have seen ROUND and so on.",
"start": 4086.84,
"duration": 6.3
},
{
"text": "But why don't I try to find the maximum\nor the minimum rating in my table?",
"start": 4093.14,
"duration": 5.46
},
{
"text": "I'll say SELECT, let's say, the MAX\n\"rating\" FROM my \"longlist\" Semicolon.",
"start": 4098.6,
"duration": 6.96
},
{
"text": "Hit Enter.",
"start": 4105.56,
"duration": 1.11
},
{
"text": "Now I see the highest rated\nbook had a rating of 4.52.",
"start": 4106.67,
"duration": 4.859
},
{
"text": "Well, what about the minimum rating?",
"start": 4111.529,
"duration": 1.5
},
{
"text": "I could use MIN here too.",
"start": 4113.029,
"duration": 1.171
},
{
"text": "I could say SELECT, let's say, MIN of\nmy \"rating\" column FROM my \"longlist\"",
"start": 4114.2,
"duration": 6.11
},
{
"text": "table.",
"start": 4120.31,
"duration": 0.69
},
{
"text": "I'll hit Semicolon.",
"start": 4121.0,
"duration": 1.71
},
{
"text": "And I'll see it 3.05.",
"start": 4122.71,
"duration": 1.979
},
{
"text": "It is the lowest-rated\nbook I have in this set.",
"start": 4124.689,
"duration": 4.29
},
{
"text": "Well, as we've seen, let me\ntry to view this for you all.",
"start": 4128.979,
"duration": 4.05
},
{
"text": "I could say SELECT \"title\" and\n\"votes\" FROM my \"longlist.\"",
"start": 4133.029,
"duration": 6.361
},
{
"text": "SELECT \"title\" and \"votes\"\nfrom my \"longlist.\"",
"start": 4139.39,
"duration": 2.04
},
{
"text": "Here, I have many books with\nmany user-generated votes.",
"start": 4141.43,
"duration": 4.74
},
{
"text": "Maybe people on the internet\ndecided to rate this book out of 5",
"start": 4146.17,
"duration": 3.57
},
{
"text": "and maybe Go, Went, Gone got\nabout, let's say, 592 votes.",
"start": 4149.74,
"duration": 5.38
},
{
"text": "So I'm curious then, how many total\nvotes do I have in my data set?",
"start": 4155.12,
"duration": 5.58
},
{
"text": "Well, for that, I could use\nthe SUM aggregate function.",
"start": 4160.7,
"duration": 2.9
},
{
"text": "Try to count up each one of these\nrows and/or turn it back to me",
"start": 4163.6,
"duration": 4.259
},
{
"text": "in a single cell.",
"start": 4167.859,
"duration": 1.691
},
{
"text": "So I'll use SUM here.",
"start": 4169.55,
"duration": 1.429
},
{
"text": "I'll come back and I'll say I want\nto find the sum of my votes column.",
"start": 4170.979,
"duration": 5.25
},
{
"text": "I'll say SELECT, let's say,\nthe SUM of my \"votes\" column",
"start": 4176.229,
"duration": 6.661
},
{
"text": "FROM my \"longlist\" table.",
"start": 4182.89,
"duration": 2.62
},
{
"text": "And then I'll just Enter--",
"start": 4185.51,
"duration": 1.219
},
{
"text": "Semicolon Enter.",
"start": 4186.729,
"duration": 1.231
},
{
"text": "And I'll see over 600,000\npeople offer to vote",
"start": 4187.96,
"duration": 4.71
},
{
"text": "for each of these books that were\nlonglisted for the International Booker",
"start": 4192.67,
"duration": 4.14
},
{
"text": "Prize.",
"start": 4196.81,
"duration": 1.81
},
{
"text": "Now there'd be a few more here.",
"start": 4198.62,
"duration": 1.45
},
{
"text": "Let's check out what else we have left\nto do and our aggregate functions.",
"start": 4200.07,
"duration": 3.17
},
{
"text": "We could also try to count up just\nthe number of books in our data set.",
"start": 4203.24,
"duration": 4.96
},
{
"text": "So why don't I try to find\nthe number of rows I have?",
"start": 4208.2,
"duration": 3.71
},
{
"text": "For that, I could use count.",
"start": 4211.91,
"duration": 2.16
},
{
"text": "And often to find the number\nof rows in your data set,",
"start": 4214.07,
"duration": 3.03
},
{
"text": "you might use count and star\nas we saw a little earlier.",
"start": 4217.1,
"duration": 3.36
},
{
"text": "I could say SELECT COUNT\nstar from \"longlist\"",
"start": 4220.46,
"duration": 4.74
},
{
"text": "And this means, again star means\ngive me every row and every column.",
"start": 4225.2,
"duration": 5.07
},
{
"text": "Give me basically my whole table, right?",
"start": 4230.27,
"duration": 2.58
},
{
"text": "And if I say COUNT star, that\nmeans count up the number of rows",
"start": 4232.85,
"duration": 3.9
},
{
"text": "that I have in my database.",
"start": 4236.75,
"duration": 2.53
},
{
"text": "So I'll say COUNT star from \"longlist.\"",
"start": 4239.28,
"duration": 2.27
},
{
"text": "And I get back 78\nbooks in this database.",
"start": 4241.55,
"duration": 4.2
},
{
"text": "Well, let me try counting up\nthe number of translators here.",
"start": 4245.75,
"duration": 2.97
},
{
"text": "I'll say SELECT, let's say, COUNT\nof \"translators\" FROM \"longlist\"",
"start": 4248.72,
"duration": 6.12
},
{
"text": "Semicolon.",
"start": 4254.84,
"duration": 1.05
},
{
"text": "Hit Enter.",
"start": 4255.89,
"duration": 1.41
},
{
"text": "And now I see 76.",
"start": 4257.3,
"duration": 3.37
},
{
"text": "So I have 78 books, but if I count\ntranslators, I have 76 of them.",
"start": 4260.67,
"duration": 8.01
},
{
"text": "So why might that be?",
"start": 4268.68,
"duration": 2.19
},
{
"text": "Free to raise your hand\nand try to guess at this.",
"start": 4270.87,
"duration": 3.21
},
{
"text": "Why do I have 78 rows\nbut 76 translators?",
"start": 4274.08,
"duration": 4.973
},
{
"text": "SPEAKER: Hi.",
"start": 4279.053,
"duration": 0.947
},
{
"text": "I actually had raised my\nhand for the question.",
"start": 4280.0,
"duration": 2.412
},
{
"text": "CARTER ZENKE: Yeah, go ahead.",
"start": 4282.412,
"duration": 1.208
},
{
"text": "SPEAKER: Also, I wanted\nto know whether the MAX",
"start": 4283.62,
"duration": 2.59
},
{
"text": "and the MIN functions can be used for\nfinding the longest or the shortest",
"start": 4286.21,
"duration": 3.81
},
{
"text": "string as well?",
"start": 4290.02,
"duration": 0.69
},
{
"text": "Or do you have a different\ncommand for that?",
"start": 4290.71,
"duration": 1.833
},
{
"text": "CARTER ZENKE: Good question.",
"start": 4292.543,
"duration": 1.167
},
{
"text": "Could we use MAX and MIN to find\nthe longest or shortest string?",
"start": 4293.71,
"duration": 3.33
},
{
"text": "That's a good question.",
"start": 4297.04,
"duration": 1.1
},
{
"text": "So let's actually pause on this counting\nhere and try that out real quick.",
"start": 4298.14,
"duration": 3.43
},
{
"text": "So I'll come back to my terminal.",
"start": 4301.57,
"duration": 1.87
},
{
"text": "And let me try to use MAX and\nMIN with some book titles.",
"start": 4303.44,
"duration": 4.04
},
{
"text": "So I'll say Select--",
"start": 4307.48,
"duration": 2.61
},
{
"text": "let's select the MAX title.",
"start": 4310.09,
"duration": 2.7
},
{
"text": "And at the same time, why don't\nwe select the MIN title as well?",
"start": 4312.79,
"duration": 4.99
},
{
"text": "And I'll select these\nfrom my \"longlist\" table.",
"start": 4317.78,
"duration": 3.14
},
{
"text": "I'll hit Semicolon.",
"start": 4320.92,
"duration": 1.45
},
{
"text": "And now, let me try this out.",
"start": 4322.37,
"duration": 2.74
},
{
"text": "I'll get back Wretchedness\nand A New Name--",
"start": 4325.11,
"duration": 3.99
},
{
"text": "Septology VI-VII.",
"start": 4329.1,
"duration": 3.47
},
{
"text": "Now, there's a few hypotheses here.",
"start": 4332.57,
"duration": 2.37
},
{
"text": "It does seem that our MAX \"title\"\nis shorter than our MIN \"title.\"",
"start": 4334.94,
"duration": 4.59
},
{
"text": "So it's probably not that MAX\ngives us the length of the string,",
"start": 4339.53,
"duration": 4.33
},
{
"text": "but what do you notice?",
"start": 4343.86,
"duration": 1.56
},
{
"text": "Well, I see MIN is really\nearly on in the alphabet.",
"start": 4345.42,
"duration": 3.515
},
{
"text": "It has an A here, whereas MAX has\na W, pretty low in the alphabet.",
"start": 4348.935,
"duration": 5.355
},
{
"text": "And I would bet if we\nordered these book titles,",
"start": 4354.29,
"duration": 3.03
},
{
"text": "we would see a new name up at the very\ntop and a Wretchedness, the book here,",
"start": 4357.32,
"duration": 5.82
},
{
"text": "down at the bottom.",
"start": 4363.14,
"duration": 1.57
},
{
"text": "So MAX seems to give us the\nlowest alphabetically, which",
"start": 4364.71,
"duration": 4.04
},
{
"text": "is kind of contradictory\nwith titles here or strings.",
"start": 4368.75,
"duration": 2.88
},
{
"text": "And MIN gives us the earliest in\nthe alphabet using this A as well.",
"start": 4371.63,
"duration": 6.56
},
{
"text": "OK.",
"start": 4378.19,
"duration": 0.75
},
{
"text": "So a good question.",
"start": 4378.94,
"duration": 0.97
},
{
"text": "Let's come back to our counting here.",
"start": 4379.91,
"duration": 1.93
},
{
"text": "Let's go back to my terminal.",
"start": 4381.84,
"duration": 1.24
},
{
"text": "And again, we had, in this case,\n78 rows, but only 76 translators.",
"start": 4383.08,
"duration": 6.06
},
{
"text": "So, again, if I did SELECT\nCOUNT star from, let's say,",
"start": 4389.14,
"duration": 3.57
},
{
"text": "\"longlist\" then\nSemicolon, I get back 78.",
"start": 4392.71,
"duration": 4.29
},
{
"text": "But if I do SELECT COUNT of \"translator\"\nfrom \"longlist,\" I get back 76.",
"start": 4397.0,
"duration": 8.28
},
{
"text": "And let me ask again, why do we\nhave 78 rows but 76 translators?",
"start": 4405.28,
"duration": 6.36
},
{
"text": "Feel free to say it.",
"start": 4411.64,
"duration": 2.495
},
{
"text": "OK, so I'm seeing maybe we\nhave some number of rows, 78.",
"start": 4414.135,
"duration": 5.215
},
{
"text": "But for our translators, you remember,\ntwo of those were null values.",
"start": 4419.35,
"duration": 4.5
},
{
"text": "They didn't exist in our table.",
"start": 4423.85,
"duration": 1.96
},
{
"text": "So it seems like if we use COUNT\nstar, we're counting all the rows.",
"start": 4425.81,
"duration": 4.83
},
{
"text": "But if we use COUNT \"translator,\"\nsome column that has null values,",
"start": 4430.64,
"duration": 4.07
},
{
"text": "we're only getting back those rows\nor those values that aren't null.",
"start": 4434.71,
"duration": 4.3
},
{
"text": "So COUNT, when given a\ncolumn, counts only those that",
"start": 4439.01,
"duration": 3.05
},
{
"text": "are not null that exist in our table.",
"start": 4442.06,
"duration": 4.56
},
{
"text": "OK, let's look at one more\nexample here for counting.",
"start": 4446.62,
"duration": 2.62
},
{
"text": "And let's try this.",
"start": 4449.24,
"duration": 2.74
},
{
"text": "Let's say I want to find all of\nthe publishers in this database.",
"start": 4451.98,
"duration": 4.1
},
{
"text": "I'll say SELECT COUNT of\n\"publisher\" from my \"longlist.\"",
"start": 4456.08,
"duration": 6.15
},
{
"text": "And I'll hit Semicolon.",
"start": 4462.23,
"duration": 2.16
},
{
"text": "So you might think that I have\n78 publishers in this long list.",
"start": 4464.39,
"duration": 5.94
},
{
"text": "But would it be accurate\nif I were to say",
"start": 4470.33,
"duration": 1.86
},
{
"text": "I have 78 different\npublishers in this longlist?",
"start": 4472.19,
"duration": 4.97
},
{
"text": "Could I say that?",
"start": 4477.16,
"duration": 2.92
},
{
"text": "I'm seeing no, right?",
"start": 4480.08,
"duration": 1.47
},
{
"text": "I couldn't try to count\nup these publishers",
"start": 4481.55,
"duration": 2.73
},
{
"text": "and then say I have 78 different ones.",
"start": 4484.28,
"duration": 1.98
},
{
"text": "I might double count the\npublisher along the way.",
"start": 4486.26,
"duration": 3.12
},
{
"text": "And let me show you what we mean here.",
"start": 4489.38,
"duration": 1.72
},
{
"text": "So I'll go back to my table.",
"start": 4491.1,
"duration": 1.58
},
{
"text": "And let me try to select from publishers\nor select the publisher column",
"start": 4492.68,
"duration": 4.68
},
{
"text": "from longlist.",
"start": 4497.36,
"duration": 1.17
},
{
"text": "I'll select \"publisher\" from \"longlist.\"",
"start": 4498.53,
"duration": 3.57
},
{
"text": "Hit Semicolon.",
"start": 4502.1,
"duration": 1.77
},
{
"text": "Oops, and now I see\nsomething a little odd.",
"start": 4503.87,
"duration": 2.82
},
{
"text": "Let me scroll back up and maybe\nask for a raised hand here.",
"start": 4506.69,
"duration": 6.38
},
{
"text": "Why might I get this odd result?",
"start": 4513.07,
"duration": 6.49
},
{
"text": "SPEAKER: Because of the quotes?",
"start": 4519.56,
"duration": 1.758
},
{
"text": "CARTER ZENKE: Yeah.",
"start": 4521.318,
"duration": 0.792
},
{
"text": "So I think I mistyped\nsome of my query here.",
"start": 4522.11,
"duration": 2.25
},
{
"text": "I said it looks like \"pubsliher\"\ninstead of \"publisher.\"",
"start": 4524.36,
"duration": 4.29
},
{
"text": "And in this case, SQL will\ngive me what I asked for.",
"start": 4528.65,
"duration": 3.21
},
{
"text": "I said SELECT \"pubsliher\"\nfrom \"longlist.\"",
"start": 4531.86,
"duration": 2.54
},
{
"text": "And says, OK, here it is.",
"start": 4534.4,
"duration": 1.36
},
{
"text": "But that column doesn't exist\nso it creates this data for me.",
"start": 4535.76,
"duration": 3.07
},
{
"text": "So let me try this again.",
"start": 4538.83,
"duration": 2.03
},
{
"text": "I'll go back.",
"start": 4540.86,
"duration": 0.66
},
{
"text": "And I'll hopefully type\nthis correctly now.",
"start": 4541.52,
"duration": 1.95
},
{
"text": "I'll say SELECT, let's say, \"publisher,\"\nthis one, FROM \"longlist\" Semicolon.",
"start": 4543.47,
"duration": 8.89
},
{
"text": "And now I'll see all of the\npublishers that I have in my table.",
"start": 4552.36,
"duration": 4.91
},
{
"text": "But what do you see?",
"start": 4557.27,
"duration": 0.848
},
{
"text": "Well, some repeat, right?",
"start": 4558.118,
"duration": 1.042
},
{
"text": "I have Harvill Secker\nmultiple times here.",
"start": 4559.16,
"duration": 3.18
},
{
"text": "I have similarly MacLehose\nPress multiple times as well.",
"start": 4562.34,
"duration": 3.67
},
{
"text": "So if I count it up,\nthese publishers, I would",
"start": 4566.01,
"duration": 3.11
},
{
"text": "get each one counted one\ntime, which I want to find",
"start": 4569.12,
"duration": 3.6
},
{
"text": "the distinct ones the different ones.",
"start": 4572.72,
"duration": 2.04
},
{
"text": "I need a new keyword for this.",
"start": 4574.76,
"duration": 2.04
},
{
"text": "And for this, we'll use this keyword\nindeed called DISTINCT, trying",
"start": 4576.8,
"duration": 3.39
},
{
"text": "to find unique values from our column.",
"start": 4580.19,
"duration": 3.46
},
{
"text": "So let's try this.",
"start": 4583.65,
"duration": 1.31
},
{
"text": "I'll go back over here and I will\nnow select not just publishers,",
"start": 4584.96,
"duration": 5.4
},
{
"text": "but distinct publishers.",
"start": 4590.36,
"duration": 1.71
},
{
"text": "I'll say SELECT DISTINCT publisher\nfrom \"longlist\" Semicolon.",
"start": 4592.07,
"duration": 7.75
},
{
"text": "Now, if I scroll through here, I\nshould see each publisher in here",
"start": 4599.82,
"duration": 5.1
},
{
"text": "only one time.",
"start": 4604.92,
"duration": 1.83
},
{
"text": "If they have the same name,\nthey've been filtered out.",
"start": 4606.75,
"duration": 2.58
},
{
"text": "And now they're only the\nsame publisher here too.",
"start": 4609.33,
"duration": 3.21
},
{
"text": "So I will then try to\nsay SELECT, let's say,",
"start": 4612.54,
"duration": 2.31
},
{
"text": "COUNT of \"publisher,\" SELECT\nCOUNT of \"publisher\" from--",
"start": 4614.85,
"duration": 6.167
},
{
"text": "COUNT of DISTINCT\n\"publisher,\" for instance.",
"start": 4621.017,
"duration": 1.833
},
{
"text": "COUNT distinct publisher-- oh, typo,\n\"publisher\" FROM \"longlist\" Semicolon.",
"start": 4622.85,
"duration": 12.29
},
{
"text": "And I'll see I have 33\ndistinct publishers.",
"start": 4635.14,
"duration": 4.56
},
{
"text": "OK.",
"start": 4639.7,
"duration": 1.35
},
{
"text": "So this just about brings\nus to the conclusion",
"start": 4641.05,
"duration": 3.57
},
{
"text": "of all of these new SQL keywords here.",
"start": 4644.62,
"duration": 2.46
},
{
"text": "We've seen so far that we\nhave several here to use.",
"start": 4647.08,
"duration": 3.48
},
{
"text": "But let's figure out how to\nactually exit this prompt.",
"start": 4650.56,
"duration": 2.615
},
{
"text": "So you might it be in your\nSQLite prompt right now.",
"start": 4653.175,
"duration": 2.125
},
{
"text": "If you want to leave it, you could\nalso use this command, dot quit.",
"start": 4655.3,
"duration": 4.56
},
{
"text": "Dot quit is not a SQL keyword.",
"start": 4659.86,
"duration": 1.68
},
{
"text": "It's a SQLite keyword\nto leave your terminal",
"start": 4661.54,
"duration": 2.7
},
{
"text": "and go back to where you started.",
"start": 4664.24,
"duration": 2.98
},
{
"text": "So just to review then,\nwhat we've seen so far",
"start": 4667.22,
"duration": 3.59
},
{
"text": "is how to select data from our table.",
"start": 4670.81,
"duration": 2.55
},
{
"text": "We can use select column to\ntake some column from our table",
"start": 4673.36,
"duration": 3.51
},
{
"text": "and give us back all of those rows\nfrom that table for that column.",
"start": 4676.87,
"duration": 5.19
},
{
"text": "We've seen we can apply some\naggregate functions to take",
"start": 4682.06,
"duration": 3.06
},
{
"text": "maybe the count of our columns\nor the average or so on.",
"start": 4685.12,
"duration": 3.19
},
{
"text": "And we can get back not\njust all of our rows,",
"start": 4688.31,
"duration": 2.55
},
{
"text": "but only some of them using our WHERE\nclause here along with a condition.",
"start": 4690.86,
"duration": 5.37
},
{
"text": "We could have multiple conditions,\nhaving not just one but perhaps two.",
"start": 4696.23,
"duration": 4.04
},
{
"text": "Like, let's say, here,\ncondition 0 and condition 1.",
"start": 4700.27,
"duration": 3.21
},
{
"text": "And we could also use, we saw\nbefore, this idea of equals and LIKE",
"start": 4703.48,
"duration": 3.63
},
{
"text": "to match some pattern or to make\nsomething exactly equal over here.",
"start": 4707.11,
"duration": 3.9
},
{
"text": "We could, again, use AND and OR.",
"start": 4711.01,
"duration": 2.19
},
{
"text": "And we saw later on how\nwe could order our data",
"start": 4713.2,
"duration": 2.67
},
{
"text": "and use our LIMIT function to get\nback only some number of rows.",
"start": 4715.87,
"duration": 6.07
},
{
"text": "Now, this then is our\ninteraction to querying.",
"start": 4721.94,
"duration": 3.59
},
{
"text": "And so far, we've seen\nthis world of books.",
"start": 4725.53,
"duration": 3.3
},
{
"text": "And the table we've had so far\nreally just has books inside of it.",
"start": 4728.83,
"duration": 3.48
},
{
"text": "But next time, what we'll see is how\nto take this world of books and split",
"start": 4732.31,
"duration": 4.71
},
{
"text": "into multiple tables.",
"start": 4737.02,
"duration": 1.24
},
{
"text": "How do we find information on\npublishers or books or authors too?",
"start": 4738.26,
"duration": 3.995
},
{
"text": "And how do we try to\nput that in a table that",
"start": 4742.255,
"duration": 1.875
},
{
"text": "can present the relationships among\nall of these different entities?",
"start": 4744.13,
"duration": 3.25
},
{
"text": "We'll talk about all that and\nmore when we come back next time.",
"start": 4747.38,
"duration": 2.625
},
{
"text": "And we'll see you there.",
"start": 4750.005,
"duration": 1.915
}
] |