1<!DOCTYPE html> 2<html lang="en"> 3<head> 4 <title>Learn SQL - Free Interactive SQL Tutorial</title> 5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> 6 <meta name="description" content="learnsqlonline.org is a free interactive SQL tutorial for people who want to learn SQL, fast." /> 7 <meta name="keywords" content="Learn,SQL,Tutorial,Interactive,Free" /> 8 <meta name="google-site-verification" content="cXWj61RCtO3fVP24Y7CO-nX0ba30tgdJYY8GGBactLI" /> 9 <meta name="viewport" content="width=device-width, initial-scale=1"> 10 <meta property="og:title" content="Learn SQL - Free 11 Interactive SQL Tutorial" /> 12 <meta property="og:type" content="website" /> 13 <meta property="og:url" content="https://www.learnsqlonline.org" /> 14 <meta property="og:image" content="https://www.learnsqlonline.org/static/img/share-logos/learnsqlonline.org.png" /> 15 16 <link rel="icon" href="/static/img/favicons/learnsqlonline.org.ico" type="image/x-icon"> 17 18 <link rel="stylesheet" type="text/css" href="/static/css/bootstrap.min.css"/> 19 <link rel="stylesheet" href="/static/css/codemirror.css"> 20 <link rel="stylesheet" href="/static/css/theme/xq-light-media.css"> 21 <link rel="stylesheet" href="/static/css/theme/xq-dark-media.css"> 22 <link rel="stylesheet" type="text/css" href="/static/css/prism-light.css"/> 23 <link rel="stylesheet" type="text/css" href="/static/css/prism-dark.css"/> 24 <link rel="stylesheet" type="text/css" href="/static/css/learnpython.css"/> 25 26 <!-- Google Tag Manager --> 27
27<script>
vendor: 343 bytes, lines 27-31
27(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': 28 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], 29 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 30 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); 31 })(window,document,'script','dataLayer','
31GTM-KMPZZR4D
vendor: 3 bytes, line 31
31');
31</script>
31 32 <!-- End Google Tag Manager --> 33 34
34<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
34 35
35<script> 36 (adsbygoogle = window.adsbygoogle || []).push({ 37 google_ad_client: "ca-pub-3723950136133694", 38 enable_page_level_ads: true 39 }); 40 </script>
40 41</head> 42<body> 43<!-- Google Tag Manager (noscript) -->
vendor: 68 bytes, lines 43-44
43 44<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=
44GTM-KMPZZR4D
vendor: 83 bytes, lines 44-45
44" 45height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
46<!-- End Google Tag Manager (noscript) --> 47 48<nav class="navbar navbar-expand-lg bg-light navbar-light"> 49 50 <div class="container"> 51 <a class="navbar-brand" href="/"> 52 <img src="/static/img/favicons/learnsqlonline.org.ico" style="height: 24px"> 53 learnsqlonline.org 54 </a> 55 56 <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" 57 aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation"> 58 <span class="navbar-toggler-icon"></span> 59 </button> 60 61 <div class="collapse navbar-collapse" id="navbarNavDropdown"> 62 63 <ul class="navbar-nav mr-auto"> 64 <li class="nav-item active"> 65 <a class="nav-link" href="/">Home <span class="sr-only">(current)</span></a> 66 </li> 67 68 <li class="nav-item"> 69 <a class="nav-link" href="/about">About</a> 70 </li> 71 72 <li class="nav-item"> 73 <a class="nav-link" href="https://www.learnx.org">Certify</a> 74 </li> 75 76 <li class="nav-item dropdown"> 77 <a class="nav-link dropdown-toggle" href="#" id="more-langs" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> 78 More Languages 79 </a> 80 <div class="dropdown-menu" aria-labelledby="more-langs"> 81 82 83 <a class="dropdown-item" href="https://www.learnpython.org">Python</a> 84 85 <a class="dropdown-item" href="https://www.learnjavaonline.org">Java</a> 86 87 <a class="dropdown-item" href="https://www.learn-html.org">HTML</a> 88 89 <a class="dropdown-item" href="https://www.learn-golang.org">Go</a> 90 91 <a class="dropdown-item" href="https://www.learn-c.org">C</a> 92 93 <a class="dropdown-item" href="https://www.learn-cpp.org">C++</a> 94 95 <a class="dropdown-item" href="https://www.learn-js.org">JavaScript</a> 96 97 <a class="dropdown-item" href="https://www.learn-ts.org">TypeScript</a> 98 99 <a class="dropdown-item" href="https://www.learn-php.org">PHP</a> 100 101 <a class="dropdown-item" href="https://www.learnshell.org">Shell</a> 102 103 <a class="dropdown-item" href="https://www.learncs.org">C#</a> 104 105 <a class="dropdown-item" href="https://www.learn-perl.org">Perl</a> 106 107 <a class="dropdown-item" href="https://www.learnrubyonline.org">Ruby</a> 108 109 <a class="dropdown-item" href="https://www.learnscala.org">Scala</a> 110 111 <a class="dropdown-item disabled" href="https://www.learnsqlonline.org">SQL</a> 112 113 114 </div> 115 </li> 116 117 118 119 120 121 122 123 124 </ul> 125 126 <ul class="navbar-nav"> 127 <li class="nav-item dropdown"> 128 <a class="nav-link dropdown-toggle" href="#" id="langs" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> 129 <img src="/static/img/icon20x24px-exported-transparent.png" style="height: 20px" alt="Languages"> 130 </a> 131 <div class="dropdown-menu" aria-labelledby="langs"> 132 133 <a class="dropdown-item disabled" href="/en/">English</a><br> 134 135 <a class="dropdown-item" href="/es/">Español</a><br> 136 137 </div> 138 </li> 139 140 <li class="nav-item" style="padding-top: 10px"> 141 <a class="github-button" href="https://github.com/ronreiter/interactive-tutorials" data-icon="octicon-star" aria-label="Star ronreiter/interactive-tutorials on GitHub">Star</a> 142 <a class="github-button" href="https://github.com/ronreiter/interactive-tutorials/fork" data-icon="octicon-repo-forked" aria-label="Fork ronreiter/interactive-tutorials on GitHub">Fork</a> 143 </li> 144 145 146 </ul> 147 148 </div> 149 150 </div> 151 152</nav> 153 154<nav class="navbar-dark bg-primary navbar-expand-lg mb-3 d-none d-lg-block"> 155 156 <div class="container"> 157 <ul class="navbar-nav mr-auto"> 158 159 <li class="nav-item"><a class="nav-link" href="https://www.learnpython.org">Python</a></li> 160 161 <li class="nav-item"><a class="nav-link" href="https://www.learnjavaonline.org">Java</a></li> 162 163 <li class="nav-item"><a class="nav-link" href="https://www.learn-html.org">HTML</a></li> 164 165 <li class="nav-item"><a class="nav-link" href="https://www.learn-golang.org">Go</a></li> 166 167 <li class="nav-item"><a class="nav-link" href="https://www.learn-c.org">C</a></li> 168 169 <li class="nav-item"><a class="nav-link" href="https://www.learn-cpp.org">C++</a></li> 170 171 <li class="nav-item"><a class="nav-link" href="https://www.learn-js.org">JavaScript</a></li> 172 173 <li class="nav-item"><a class="nav-link" href="https://www.learn-ts.org">TypeScript</a></li> 174 175 <li class="nav-item"><a class="nav-link" href="https://www.learn-php.org">PHP</a></li> 176 177 <li class="nav-item"><a class="nav-link" href="https://www.learnshell.org">Shell</a></li> 178 179 <li class="nav-item"><a class="nav-link" href="https://www.learncs.org">C#</a></li> 180 181 <li class="nav-item"><a class="nav-link" href="https://www.learn-perl.org">Perl</a></li> 182 183 <li class="nav-item"><a class="nav-link" href="https://www.learnrubyonline.org">Ruby</a></li> 184 185 <li class="nav-item"><a class="nav-link" href="https://www.learnscala.org">Scala</a></li> 186 187 <li class="nav-item"><a class="nav-link active" href="https://www.learnsqlonline.org">SQL</a></li> 188 189 </ul> 190 191 </div> 192 193</nav> 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216<div class="container" id="main"> 217 <div class="row"> 218 <div class="col-12"> 219 <div class="d-none d-lg-block"> 220 221 <a href="https://datacamp.pxf.io/c/67577/3120137/13294?sharedid=learnsql_topbanner" target="_blank"> 222 <img src="/static/img/banners/datacamp/datacamp-billboard-sql.png" style="width: 100%; margin-bottom: 10px"/> 223 </a> 224 225 226 227 228 229 230 231 232 233 234 235 236 237 </div> 238 239 240 241 242 243 244 245 </div> 246 247 </div> 248 249 <div class="row mt-3"> 250 251 <div class="col col-lg-10"> 252 253 254 <p>Get started learning SQL with DataCamp's <a href="https://datacamp.pxf.io/5gjDNn?sharedId=learnsqlonline.org">Introduction to SQL</a> tutorial. Learn Data Science by completing interactive coding challenges and watching videos by expert instructors. <a href="https://datacamp.pxf.io/Kjxv6a?sharedId=learnsqlonline.org">Start Now!</a></p> 255 <p>This site is generously supported by <a href="https://datacamp.pxf.io/Kjxv6a?sharedId=learnsqlonline.org">DataCamp</a>. DataCamp offers online interactive <a href="https://datacamp.pxf.io/eKR5Wg?sharedId=learnsqlonline.org">SQL Tutorials</a> for Data Science. Join 11+ million other learners and get started learning <a href="https://datacamp.pxf.io/eKR5Wg?sharedId=learnsqlonline.org">SQL for data science</a> today.</p> 256 <p>Good news! You can save 25% off your Datacamp annual subscription with the code <a href="https://datacamp.pxf.io/Y9Nz7R">LEARNPYTHON23ALE25 - Click here to redeem your discount!</a></p> 257 258 259 260 <div id="inner-text"> 261 262 <h1>Welcome</h1> 263<p>Welcome to the learnsqlonline.org free interactive SQL tutorial.</p> 264<p>SQL (pronouned either as S-Q-L or Sequel) is a powerful language for querying and analyzing any amount of data in the world. 265It is the most important tool for developers, analysts and data scientists alike for being able to deal with data.</p> 266<p>SQL is commonly used for Business Intelligence so companies can make operative decisions on how to act based on data generated by the business. It is also 267used for researching data to create new insights by aggregating vast amounts of data. In the new big-data era, it is now possible to query petabytes of 268data using a single query using novel data warehouse technologies (for example: Hadoop, Spark, BigQuery, Presto/Amazon Athena, and more).</p> 269<p>SQL can also be used to construct long-running data pipelines and process data for business purposes - Spark is a great example of a technology that utilizes 270SQL syntax to create data pipelines that can continuously process large amounts of data and turn it into another form of useful data, either for insights 271or for generating new data out of existing data.</p> 272<p>To learn SQL on this website there is no need to download anything - Just click on the chapter you wish to begin from, and follow the instructions. Good luck!</p> 273<h3>Learn the Basics</h3> 274<ul> 275<li><a href='/en/Hello%2C_World%21'>Hello, World!</a></li> 276<li><a href='/en/Selecting_data'>Selecting data</a></li> 277<li><a href='/en/Creating_tables'>Creating tables</a></li> 278<li><a href='/en/Inserting_rows'>Inserting rows</a></li> 279<li><a href='/en/Updating_rows'>Updating rows</a></li> 280<li><a href='/en/Deleting_rows'>Deleting rows</a></li> 281<li><a href='/en/Joining_tables'>Joining tables</a></li> 282<li><a href='/en/Group_by'>Group by</a></li> 283<li><a href='/en/Aggregate_functions'>Aggregate functions</a></li> 284<li><a href='/en/The_HAVING_statement'>The HAVING statement</a></li> 285<li><a href='/en/Distinct_queries'>Distinct queries</a></li> 286<li><a href='/en/Order_by'>Order by</a></li> 287</ul> 288<h3>Advanced tutorials</h3> 289<ul> 290<li><a href="https://datacamp.pxf.io/ZQrAgK?sharedId=learnsqlonline.org">String operations</a></li> 291<li><a href="https://datacamp.pxf.io/ZQrAgK?sharedId=learnsqlonline.org">Inner and outer joins</a></li> 292<li><a href="https://datacamp.pxf.io/ZQrAgK?sharedId=learnsqlonline.org">The UNION statement</a></li> 293<li><a href="https://datacamp.pxf.io/ZQrAgK?sharedId=learnsqlonline.org">The CASE statement</a></li> 294<li><a href="https://datacamp.pxf.io/ZQrAgK?sharedId=learnsqlonline.org">Combining INSERT INTO and SELECT</a></li> 295<li><a href="https://datacamp.pxf.io/ZQrAgK?sharedId=learnsqlonline.org">Subqueries</a></li> 296<li><a href="https://datacamp.pxf.io/ZQrAgK?sharedId=learnsqlonline.org">Indexing</a></li> 297<li><a href="https://datacamp.pxf.io/ZQrAgK?sharedId=learnsqlonline.org">Altering tables</a></li> 298<li><a href="https://datacamp.pxf.io/ZQrAgK?sharedId=learnsqlonline.org">Views</a></li> 299<li><a href="https://datacamp.pxf.io/ZQrAgK?sharedId=learnsqlonline.org">Window functions</a></li> 300</ul> 301 </div> 302 303 <div class="row mt-2"> 304 <div class="col"> 305 <button id="start-exercise" class="btn btn-success pull-left mt-2" onclick="reset()"> 306 <i class="fas fa-play"></i> Start Exercise 307 </button> 308 </div> 309 </div> 310 311 <hr/> 312 313 <div class="row mt-2 mb-2"> 314 <div class="col"> 315 316 317 318 319 </div> 320 </div> 321 322 <div class="row mt-2"> 323 <div class="col"> 324 325 <a href="https://codingforkids.io?utm_source=learnpython&utm_medium=banner&utm_campaign=cfk-learnpython&utm_id=learnpython" target="_blank"> 326 <img src="/static/img/banners/cfk/cfk-billboard.png" style="width: 100%; margin-bottom: 10px"/> 327 </a> 328 329 330 331 332 333 334 335 336 337 338 339 340 341 </div> 342 </div> 343 344 </div> 345 346 <div class="col-2 d-none d-lg-block mt-2"> 347 <div id="google-ad-right"> 348 349 <iframe src="https://learnsqlonline-ads.datacamp.com/?page=&language=en" frameborder="0" width="160" height="600" scrolling="no" allowtransparancy="true" style="margin-bottom: 10px; border: 0;"></iframe> 350 351 352 <h4>Sponsors</h4> 353 <hr/> 354 355 356 357 <div class="mt-3"> 358 359 <a href="https://codingforkids.io?utm_source=learnpython&utm_medium=banner&utm_campaign=cfk-learnpython&utm_id=learnpython" target="_blank"> 360 <img src="/static/img/banners/cfk/promo_high.png" style="width: 100%; margin-bottom: 10px"/> 361 </a> 362 363 364 365 366 367 368 369 370 371 372 373 </div> 374 <div class="mt-3"> 375 <a href="https://digitalocean.com/" target="_blank" > 376 <img src="/static/img/banners/digital-ocean.svg" style="width: 160px" alt="Digital Ocean"> 377 </a> 378 </div> 379 <div class="mt-3"> 380 <a href="http://www.spoj.com/?utm_campaign=permanent&utm_medium=banner&utm_source=learnx" target="_blank">
381 <img src="/static/img/logos/spoj.png" style="width: 160px" alt="Sphere Engine"> 382 </a> 383 </div> 384 <div class="mt-3"> 385 386 <a href="#" data-toggle="modal" data-target="#masterschoolModal"> 387 <img src="/static/img/masterschool.png" style="width: 150px;"/> 388 </a> 389 </div> 390 <h4 class="mt-3">Chapters</h4> 391 <hr/> 392 <div class="mt-2"> 393 394 <div> 395 <a href="/en/Hello%2C_World%21">Hello, World!</a> 396 </div> 397 398 <div> 399 <a href="/en/Selecting_data">Selecting data</a> 400 </div> 401 402 <div> 403 <a href="/en/Creating_tables">Creating tables</a> 404 </div> 405 406 <div> 407 <a href="/en/Inserting_rows">Inserting rows</a> 408 </div> 409 410 <div> 411 <a href="/en/Updating_rows">Updating rows</a> 412 </div> 413 414 <div> 415 <a href="/en/Deleting_rows">Deleting rows</a> 416 </div> 417 418 <div> 419 <a href="/en/Joining_tables">Joining tables</a> 420 </div> 421 422 <div> 423 <a href="/en/Group_by">Group by</a> 424 </div> 425 426 <div> 427 <a href="/en/Aggregate_functions">Aggregate functions</a> 428 </div> 429 430 <div> 431 <a href="/en/The_HAVING_statement">The HAVING statement</a> 432 </div> 433 434 <div> 435 <a href="/en/Distinct_queries">Distinct queries</a> 436 </div> 437 438 <div> 439 <a href="/en/Order_by">Order by</a> 440 </div> 441 442 </div> 443 </div> 444 </div> 445 446 </div> <!-- row --> 447 448</div> 449 450 451<div class="bg-light mb-5 mt-5"> 452 453 <div class="container-fluid bg-light pt-3 pb-3"> 454 <div class="row"> 455 <div class="col-12 text-center"> 456 <div>Copyright © learnsqlonline.org. Read our <a href='/tos'>Terms of Use</a> and <a href='/privacy'>Privacy Policy</a></div> 457 </div> 458 </div> 459 </div> 460 461</div> 462 463<footer id="dock"> 464 <div class="container"> 465 <div class="row mb-2"> 466 <div class="col-sm-12 col-lg-6 mt-3"> 467 <div class="code-window"> 468 <div class="row mb-2"> 469 <div class="col-2"> 470 <h5>Code</h5> 471 </div> 472 473 <div class="col-10 text-right"> 474 <button id="run-button" class="btn btn-success btn-sm" onclick="execute()"> 475 <i class="fas fa-play"></i> Run 476 </button> 477 <button id="reset-button" onclick="reset()" class="btn btn-primary btn-sm"> 478 <i class="fas fa-sync-alt"></i> Reset</button> 479 <button id="solution-button" onclick="showSolution()" class="btn btn-primary btn-sm">Solution</button> 480 481 <button id="toggle-dock-button" class="btn btn-primary btn-sm" onclick="toggleMinimize()"> 482 <span class="maximized"> 483 <i class="fas fa-angle-double-down"></i> 484 </span>
485 <span class="minimized"> 486 <i class="fas fa-angle-double-up"></i> 487 </span> 488 </button> 489 490 </div> 491 </div> 492 493 <div class="row footer-toggle"> 494 <div class="col"> 495 <textarea id="code">-- Welcome to the Interactive SQL Tutorial. 496-- Start by choosing a chapter, write your code in this window. 497 498CREATE TABLE helloworld (phrase TEXT); 499INSERT INTO helloworld VALUES ("Hello, World!"); 500INSERT INTO helloworld VALUES ("Goodbye, World!"); 501 502SELECT * FROM helloworld WHERE phrase = "Hello, World!"; 503</textarea> 504 </div> 505 </div> 506 507 </div> 508 </div> 509 <div class="col-sm-12 col-lg-6 mt-3"> 510 <div class="output-window"> 511 <div class="row mb-2"> 512 <div class="col-3"> 513 <h5>Output</h5> 514 </div> 515 <div class="col-9 text-right"> 516 <button id="expected-output-button" class="btn btn-primary btn-sm" onclick="showExpected()"> 517 Expected Output 518 </button> 519 520 </div> 521 522 </div> 523 <div class="row footer-toggle"> 524 <div class="col"> 525 <div id="text-output"> 526 <textarea id="output"></textarea> 527 <div class="powered-by-sphere"> 528 Powered by <a target="_blank" href="http://sphere-engine.com/">Sphere Engine ™</a> 529 </div> 530 </div> 531 <iframe id="html-output" 532 style="border: 1px solid #ccc; box-sizing: border-box; background-color: white; display: none; height: 200px; width: 100%"></iframe> 533 <iframe id="expected-output" 534 style="border: 1px solid #ccc; box-sizing: border-box; background-color: white; display: none; height: 200px; width: 100%"></iframe> 535 </div> 536 537 </div> 538 </div> 539 </div> 540 541 </div> 542 </div> 543 544</footer> 545 546 547 548
549<script 550 src="https://code.jquery.com/jquery-1.12.4.min.js" 551 integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" 552 crossorigin="anonymous"></script>
vendor: 1 bytes, line 552
552
553<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
553 554 555 556 557 558 559 560
561<script src="/static/js/prism.js"></script>
561 562
563<script async defer src="https://buttons.github.io/buttons.js"></script>
563 564 565<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css" integrity="sha512-+4zCK9k+qNFUR5X+cKL9EIR+ZOhtIloNl9GIKS57V1MyNsYpYcUrUeQc9vNfzsWfV28IaLL3i96P9sdNyeRssA==" crossorigin="anonymous" /> 566
567<script src="/static/js/codemirror/codemirror.js"></script>
vendor: 1 bytes, line 567
567
568<script src="/static/js/codemirror/addon/edit/matchbrackets.js"></script>
vendor: 1 bytes, line 568
568
569<script src="/static/js/codemirror/mode/clike/clike.js"></script>
569 570 571 572 573 574 575 576 577
578<script src="/static/js/codemirror/mode/sql/sql.js"></script>
vendor: 1 bytes, line 578
578
579<script src="/static/js/codemirror/mode/xml/xml.js"></script>
vendor: 1 bytes, line 579
579
580<script src="/static/js/codemirror/mode/css/css.js"></script>
vendor: 1 bytes, line 580
580
581<script src="/static/js/codemirror/mode/htmlembedded/htmlembedded.js"></script>
vendor: 1 bytes, line 581
581
582<script src="/static/js/codemirror/mode/htmlmixed/htmlmixed.js"></script>
vendor: 1 bytes, line 582
582
583<script src="/static/js/bootstrap.min.js"></script>
vendor: 1 bytes, line 583
583
584<script src="/static/js/bootbox.min.js"></script>
584 585 586 587
588<script>
vendor: 339 bytes, lines 588-594
588 589 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 590 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 591 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 592 })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); 593 594 ga('create', '
594UA-22741967-17
vendor: 28 bytes, lines 594-595
594', 'learnsqlonline.org'); 595
595ga('create', 'UA-22741967-16', 'learnsqlonline.org'); 596 ga('send', 'pageview'); 597 598</script>
598 599 600 601
602<script> 603 var domainData = {"language": "sql", "language_id": 40, "codemirror_mode": "text/x-sql", "prism_mode": "language-sql", "analytics": "UA-22741967-16", "language_uppercase": "SQL", "default_code": "-- Welcome to the Interactive SQL Tutorial.\n-- Start by choosing a chapter, write your code in this window.\n\nCREATE TABLE helloworld (phrase TEXT);\nINSERT INTO helloworld VALUES (\"Hello, World!\");\nINSERT INTO helloworld VALUES (\"Goodbye, World!\");\n\nSELECT * FROM helloworld WHERE phrase = \"Hello, World!\";\n", "container_word": "", "container_indent": "", "container": "\n", "namespace": "learnsqlonline.org", "full_url": "https://www.learnsqlonline.org", "contact_email": "[email protected]", "support_email": "[email protected]", "logo": "/static/img/logos/learnsqlonline.org.png", "share_logo": "/static/img/share-logos/learnsqlonline.org.png", "favicon": "/static/img/favicons/learnsqlonline.org.ico", "styled_domain": "learnsqlonline.org", "sender": "learnsqlonline.org <[email protected]>", "courses": null, "language_code": "en"}; 604 var nextChapter = "/en/"; 605 var previousChapter = "/en/"; 606 var backChapter = "/en/"; 607 var tutorialData = {"text": "<h1>Welcome</h1>\n<p>Welcome to the learnsqlonline.org free interactive SQL tutorial.</p>\n<p>SQL (pronouned either as S-Q-L or Sequel) is a powerful language for querying and analyzing any amount of data in the world.\nIt is the most important tool for developers, analysts and data scientists alike for being able to deal with data.</p>\n<p>SQL is commonly used for Business Intelligence so companies can make operative decisions on how to act based on data generated by the business. It is also\nused for researching data to create new insights by aggregating vast amounts of data. In the new big-data era, it is now possible to query petabytes of\ndata using a single query using novel data warehouse technologies (for example: Hadoop, Spark, BigQuery, Presto/Amazon Athena, and more).</p>\n<p>SQL can also be used to construct long-running data pipelines and process data for business purposes - Spark is a great example of a technology that utilizes\nSQL syntax to create data pipelines that can continuously process large amounts of data and turn it into another form of useful data, either for insights\nor for generating new data out of existing data.</p>\n<p>To learn SQL on this website there is no need to download anything - Just click on the chapter you wish to begin from, and follow the instructions. Good luck!</p>\n<h3>Learn the Basics</h3>\n<ul>\n<li><a href='/en/Hello%2C_World%21'>Hello, World!</a></li>\n<li><a href='/en/Selecting_data'>Selecting data</a></li>\n<li><a href='/en/Creating_tables'>Creating tables</a></li>\n<li><a href='/en/Inserting_rows'>Inserting rows</a></li>\n<li><a href='/en/Updating_rows'>Updating rows</a></li>\n<li><a href='/en/Deleting_rows'>Deleting rows</a></li>\n<li><a href='/en/Joining_tables'>Joining tables</a></li>\n<li><a href='/en/Group_by'>Group by</a></li>\n<li><a href='/en/Aggregate_functions'>Aggregate functions</a></li>\n<li><a href='/en/The_HAVING_statement'>The HAVING statement</a></li>\n<li><a href='/en/Distinct_queries'>Distinct queries</a></li>\n<li><a href='/en/Order_by'>Order by</a></li>\n</ul>\n<h3>Advanced tutorials</h3>\n<ul>\n<li><a href=\"https://datacamp.pxf.io/ZQrAgK?sharedId=learnsqlonline.org\">String operations</a></li>\n<li><a href=\"https://datacamp.pxf.io/ZQrAgK?sharedId=learnsqlonline.org\">Inner and outer joins</a></li>\n<li><a href=\"https://datacamp.pxf.io/ZQrAgK?sharedId=learnsqlonline.org\">The UNION statement</a></li>\n<li><a href=\"https://datacamp.pxf.io/ZQrAgK?sharedId=learnsqlonline.org\">The CASE statement</a></li>\n<li><a href=\"https://datacamp.pxf.io/ZQrAgK?sharedId=learnsqlonline.org\">Combining INSERT INTO and SELECT</a></li>\n<li><a href=\"https://datacamp.pxf.io/ZQrAgK?sharedId=learnsqlonline.org\">Subqueries</a></li>\n<li><a href=\"https://datacamp.pxf.io/ZQrAgK?sharedId=learnsqlonline.org\">Indexing</a></li>\n<li><a href=\"https://datacamp.pxf.io/ZQrAgK?sharedId=learnsqlonline.org\">Altering tables</a></li>\n<li><a href=\"https://datacamp.pxf.io/ZQrAgK?sharedId=learnsqlonline.org\">Views</a></li>\n<li><a href=\"https://datacamp.pxf.io/ZQrAgK?sharedId=learnsqlonline.org\">Window functions</a></li>\n</ul>", "page_title": "", "links": [["Hello, World!", "/en/Hello%2C_World%21"], ["Selecting data", "/en/Selecting_data"], ["Creating tables", "/en/Creating_tables"], ["Inserting rows", "/en/Inserting_rows"], ["Updating rows", "/en/Updating_rows"], ["Deleting rows", "/en/Deleting_rows"], ["Joining tables", "/en/Joining_tables"], ["Group by", "/en/Group_by"], ["Aggregate functions", "/en/Aggregate_functions"], ["The HAV
607ING statement", "/en/The_HAVING_statement"], ["Distinct queries", "/en/Distinct_queries"], ["Order by", "/en/Order_by"]], "code": "-- Welcome to the Interactive SQL Tutorial.\n-- Start by choosing a chapter, write your code in this window.\n\nCREATE TABLE helloworld (phrase TEXT);\nINSERT INTO helloworld VALUES (\"Hello, World!\");\nINSERT INTO helloworld VALUES (\"Goodbye, World!\");\n\nSELECT * FROM helloworld WHERE phrase = \"Hello, World!\";\n", "is_tutorial": false}; 608</script>
608 609
610<script src="/static/js/learnpython.js"></script>
610 611 612 613</body> 614</html>
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.