-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsql-page.html
1015 lines (860 loc) · 53.8 KB
/
sql-page.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- FONTS -->
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Oswald:wght@300;400;600&family=Ropa+Sans&display=swap" rel="stylesheet">
<!--FONT AWESOME ICONS-->
<link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css" integrity="sha384-AYmEC3Yw5cVb3ZcuHtOA93w35dYTsvhLPVnYs9eStHfGJvOvKxVfELGroGkvsg+p" crossorigin="anonymous" />
<!-- RESET.CSS AND STYLE.CSS -->
<link rel="stylesheet" href="style/style.css">
<!-- FAVICON -->
<link rel="shortcut icon" type="image/jpg" href="src/img/favicon.ico">
<title>WebFromScratch SQL</title>
</head>
<body>
<div class="wrapper">
<!-- HEADER-->
<header>
<nav class="navigation">
<a href="index.html" class="nav__logo hero__nav-logo"><svg id="hero__nav-logo" width="150" height="70"
viewBox="0 0 732 511" fill="none" xmlns="http://www.w3.org/2000/svg">
<path id='logo-w'
d="M22.428 3.36996H80.99L135.191 365.956L203.098 5.23897H252.938L321.468 367.825L374.423 3.36996H431.739L350.749 508H299.663L229.264 134.2L158.242 508H104.664L22.428 3.36996Z" />
<path id='logo-f'
d="M596.718 510.553C554.762 510.553 522.678 497.596 500.466 471.682C478.665 445.768 466.531 410.188 464.063 364.941L525.763 348.282C527.82 380.366 533.99 406.28 544.273 426.024C554.968 445.768 572.449 455.64 596.718 455.64C614.817 455.64 628.391 450.704 637.44 440.832C646.901 430.549 651.631 415.946 651.631 397.025C651.631 376.458 647.312 359.388 638.674 345.814C630.036 332.24 616.256 317.226 597.335 300.773L513.423 226.733C496.558 211.925 484.218 196.089 476.403 179.224C468.999 161.948 465.297 140.97 465.297 116.29C465.297 79.6813 475.786 51.2993 496.764 31.144C517.742 10.9887 546.33 0.910981 582.527 0.910981C622.015 0.910981 651.837 11.4 671.992 32.378C692.147 53.356 704.282 85.8513 708.395 129.864L649.163 145.906C647.106 116.701 641.348 94.2836 631.887 78.653C622.838 62.611 606.384 54.59 582.527 54.59C564.84 54.59 551.266 59.3203 541.805 68.781C532.344 77.8303 527.614 91.4043 527.614 109.503C527.614 124.311 530.082 136.857 535.018 147.14C539.954 157.012 548.386 167.09 560.315 177.373L644.844 251.413C666.645 270.746 683.921 291.724 696.672 314.347C709.835 336.97 716.416 362.679 716.416 391.472C716.416 428.081 705.31 457.08 683.098 478.469C660.886 499.858 632.093 510.553 596.718 510.553Z" />
<path id='logo-s'
d="M402.871 5.22996H595.992V55.207H472.592V221.797H568.227V271.157H472.592V505H402.871V5.22996Z"
fill-opacity="0.35" />
</svg></a>
<ul class="navigation__list">
<li>
<a class="nav__link hero__nav-link" href="articles.html">Articles</a> </li>
<li>
<a class="nav__link hero__nav-link" href="topic-cards.html">Learning</a>
</li>
</ul>
<div class="nav__registration">
<a href="#!" class="nav__login">Login</a>
<span class="bar">|</span>
<a href="#!" class="nav__reg">Sign Up</a>
</div>
</nav>
</header>
<!-- MAIN -->
<main>
<!-- SQL Section -->
<section class="sql">
<div class="container">
<div class="sql__container-for-text-menu">
<div class="sql__container-topic">
<!-- SQL WELCOME Section -->
<div class="title welcome sql__welcome">
<h2 id="sql__title"> What is SQL ?</h2>
<h3 id="sql__subtitle">At the end of this topic you will:</h3>
<ul class="main-text sql__text-points">
<li><span>understand basic SQL principles</span></li>
<li><span>create tables</span></li>
<li><span>start using SQL</span></li>
<li><span>make simple queries</span></li>
</ul>
</div>
<!-- SQL Topics -->
<div class="sql__topics topics">
<!-- SQL Topic 0 -->
<div class="sql_topic topic">
<h4 id="topic0" class="sql__topic-title"> Why should we know SQL?</h4>
<p>
Although it has existed since the 70s of last century, it is still very widely used, and without it it will be difficult to create something serious.
</p>
<p>
Most full-stack frameworks are able to work with SQL. Among them: ActiveRecord, Doctrine, Hibernate and many others. Despite this, sometimes you have to “dirty hands” and go into real SQL.
</p>
<p>
That is why we have prepared a short introduction, in which we will walk through the fundamental things in SQL. We strongly recommend you to try all the examples below yourself, because, as you know, theory is nothing without practice. Well, here we go!
</p>
</div>
<!-- SQL Topic 1 -->
<div class="sql__topic topic">
<h4 id="topic1" class="sql__topic-title">Let's create a table!</h4>
<p>
In order to create a table in SQL, the expression <b>CREATE TABLE</b> is used.It accepts as parameters all columns that we want to enter, as well as their data types.Let’s create a table called “Months”, which will
have three columns:
</p>
<p>
<b>id </b> – in other words, the ordinal number of the month (integer type or int)
</p>
<p>
<b>name </b> – month name (string or varchar(10) (10 characters – maximum string length))
</p>
<p>
<b>days</b> – number of days in a certain month (integer type or int) The code will look like this:
</p>
<p>
Also, when creating tables, it’s customary to add the so-called primary key. This is a column where the values are unique.
</p>
<p>
Most often, the primary key column is id, but in our case it can also be name, since the names of all months are unique. For more information, please follow this link.
</p>
</div>
<!-- SQL Topic 2 -->
<div class="sql__topic topic">
<h4 id="topic2" class="sql__topic-title">Data Entry</h4>
<p>
Now let’s add a couple of months to our plaque. You can do that with the <INSERT> command.
</p>
<p>There are two different ways to use
<b>INSERT</b>:</p>
<p>
he first method does not involve specifying column names, but only takes the values in the order they are in the table.
</p>
<p>
<code class="code-block">INSERT INTO months VALUES (1, 'January',31);</code>
</p>
<p>
The first method is shorter than the second, but if we want to add more columns in the future, all previous requests will not work. We should use the second method to solve this problem. Its essence is that we specify the names of columns before entering
the data.
</p>
<p>
<code class="code-block">INSERT INTO months (id,name,days) VALUES
(2,'February',29);</code>
</p>
<p>
If we don’t specify one of the columns, we’ll write NULL or the default value, but that’s a different story.
</p>
</div>
<!-- SQL Topic 3 -->
<div class="sql__topic topic">
<h4 id="topic3" class="sql__topic-title">SELECT </h4>
<p>
This query is used when we need to show data in a table. Probably the easiest example of SELECT usage is the following query:
</p>
<code class="code-block">SELECT * FROM characters</code>
<p>
The result of this query is a table with all data in the table. An asterisk (*) sign means that we want to show all columns from the table without exception.
</p>
<p>
Since there is usually more than one table in the database, we need to specify the name of the table from which we want to see the data. We can do this by using the FROM keyword.
</p>
<p>
When you only need some columns from a table, you can specify their names by comma instead of an asterisk.
</p>
<code class="code-block">SELECT name, weapon FROM characters</code>
<p>
Also, sometimes we need to sort the output. For this we use ORDER BY “column name”.
<b>ORDER BY</b> has two modifiers: <b>ASC</b> (ascending) (default) and
<b>DESC</b> (descending).
</p>
<code class="code-block">SELECT name, weapon FROM "characters" ORDER BY name
DESC</code>
</div>
<!-- SQL Topic 4 -->
<div class="sql__topic topic">
<h4 id="topic4" class="sql__topic-title">WHERE </h4>
<p>
Now we know how to show only specific columns, but what if we want to include only some specific rows in the output? We use <b>WHERE</b> for that. This keyword allows us to filter the data by a specific condition.
In the next query, we will only output characters that use the gun as a weapon.
</p>
<code class="code-block">SELECT *
FROM characters
WHERE weapon = 'pistol'; </code>
</div>
<!-- SQL Topic 5 -->
<div class="sql__topic topic">
<h4 id="topic5" class="sql__topic-title">AND/OR</h4>
<p>
Conditions in WHERE can be written using logical operators (AND/OR) and mathematical comparison operators (=, < , >, <=, >=, <>). For example, we have a tablet that records data on 4 of the best selling music albums of all time. Let’s display
only those that are rock genre, and sales were less than 50 million copies.
</p>
<p>
<code class="code-block">SELECT *
FROM albums
WHERE genre = 'rock' AND sales_in_millions <= 50 ORDER BY released
</code></p>
</div>
</div>
<!-- SQL Topic 6 -->
<div class="sql__topic topic">
<h4 id="topic6" class="sql__topic-title">IN/BETWEEN/LIKE</h4>
<p>
Conditions in WHERE can be written using several other commands, which are:
</p>
<p>
<b>IN</b> – compares the value in a column with several possible values and returns true if the value matches at least one value
</p>
<p>
<b>BETWEEN</b> – checks if the value is in a certain interval
</p>
<p>
<b>LIKE</b> – looking for a pattern
</p>
<p>
For example, we can make a query to display data about albums in pop or soul genre:
</p>
<code class="code-block">SELECT * FROM albums WHERE genre IN ('pop',
'soul');
</code>
<p>
If we want to output all albums that were released between 1975 and 1985, we can use the following record:
</p>
<code class="code-block">
SELECT * FROM albums WHERE released BETWEEN 197 SELECT * FROM albums
WHERE released BETWEEN 1975
AND 1985;
</code>
<p>
Also, if we want to output all albums that have an ‘R’ in their title, we can use the following record:
</p>
<code class="code-block">
SELECT * FROM albums WHERE album LIKE '%R%';
</code>
<p>
The % sign means any sequence of characters (0 characters also counts as a sequence).
</p>
<p>
If we want to output all albums with ‘R’ as the first letter in their title, the record will change slightly:
</p>
<code class="code-block">SELECT * FROM albums WHERE album LIKE
'R%'; </code>
<p>
SQL also has an inversion. For example, try to write NOT before any logical expression in the condition (NOT BETWEEN and so on).
</p>
</div>
<!-- SQL TOPIC 7 -->
<div class="sql__topic topic">
<h4 id="topic7" class="sql__topic-title">FUNCTIONS</h4>
<p>
SQL is full of built-in functions for performing various operations. We will show you only the most frequently used functions:
</p>
<p>
<b>COUNT()</b> – returns the number of lines
</p>
<p>
<b>SUM()</b> – returns the sum of all fields with numerical values in them
</p>
<p>
<b>AVG() </b> – returns the average value among rows
</p>
<p>
<b>MIN()/MAX() </b> – returns minimum/maximum value among rows
</p>
<p>
To display the year of release of the oldest album, you can use the following query in the table:
</p>
<code class="code-block">
SELECT MAX(released) FROM albums;
</code>
<p>
Note that if you write a query asking, for example, for the name and average of something, you will get an error in the output. Let’s say that you are writing such a query:
</p>
<code class="code-block">SELECT name, avg(age) FROM students;</code>
<p>
To avoid the error, you should add the following line:
</p>
<code class="code-block">
GROUP BY name
</code>
<p>
The reason for this is that the avg(age) record is aggregated and you need to group the values by name.
</p>
</div>
<!-- SQL TOPIC 8 -->
<div class="sql__topic topic">
<h4 id="topic8" class="sql__topic-title">ATTACHED SELECT </h4>
<p>
In the previous steps, we learned how to make simple calculations with data. If we want to use the result of these calculations, we often need to use so-called nested queries. Let’s say we need to display the artist, the album and the year of the oldest
album in the table. You can display these columns using the following query:
</p>
<code class="code-block">
SELECT artist, album, released FROM albums;
</code>
<p>
We also know how to get the earliest year available:
</p>
<code class="code-block">
SELECT MIN(released) FROM album;
</code>
<p>
You can merge these queries in WHERE:
</p>
<code class="code-block">
SELECT artist,album,released
FROM albums
WHERE released = (
SELECT MIN(released) FROM albums
);
</code>
</div>
<!-- SQL TOPIC 9 -->
<div class="sql__topic topic">
<h4 id="topic9" class="sql__topic-title">ATTACHMENT OF TABLES</h4>
<p>
In complex databases, we most often have several linked tables. For example, we have two tables: about video games and about developers.
</p>
<p>
In video_games table we have developer_id column, in this case it is so called foreign_key. To make it easier to understand, developer_id is a link between two tables.
</p>
<p>
If we want to display all information about the game, including information about its developer, we need to connect the second table. To do this, we can use INNER JOIN:
</p>
<code class="code-block">
SELECT video_games.name, video_games.genre,
game_developers.name,
game_developers.country.
FROM video_games
INNER JOIN game_developers
ON video_games.developer_id = game_developers.id;
</code>
<p>
This is probably the simplest example of using JOIN. There are several other ways to use it. For more information, please follow this link.
</p>
</div>
<!-- SQL Topic 10 -->
<div class="sql__topic topic">
<h4 id="topic10" class="sql__topic-title">ALIASES</h4>
<p>
If you look at the previous example, you will notice that there are two columns named equally: “name”. This can often be confusing. The solution to this problem are pseudonyms. By the way, they help make the column name more beautiful or understandable
when necessary.
</p>
<p>
To assign an alias to a column, you can use the keyword AS:
</p>
<code class="code-block">
SELECT games.name, games.genre, devs.name AS developer,
devs.country
FROM video_games AS games
INNER JOIN game_developers AS devs
ON games.developer_id = devs.id;
</code>
</div>
<!-- SQL Topic 11 -->
<div class="sql__topic topic">
<h4 id="topic11" class="sql__topic-title">UPDATE </h4>
<p>
Often, we need to change the data in the table. In SQL, this is done using
<b>UPDATE.</b>
</p>
<p>
Using UPDATE includes:
</p>
<p>
- selecting the table that contains the field we want to change
</p>
<p>
- new value entry;
</p>
<p>
- using WHERE to indicate a specific location in the table.
</p>
<p>
Let’s say we have a table of the most highly regarded shows of all time. However, we have a problem: “Game of Thrones” is marked as a comedy and we definitely need to change that:
</p>
<code class="code-block">
UPDATE tv_series.
SET genre = 'drama'
WHERE name = 'Game of Thrones';
</code>
</div>
<!-- SQL Topic 12 -->
<div class="sql__topic topic">
<h4 id="topic12" class="sql__topic-title">REMOVING RECORDS FROM THE TABLE </h4>
<p>
Deleting a record from a table via SQL is a very simple operation. All you need to do is designate what we want to delete.
</p>
<code class="code-block">
DELETE FROM tv_series
WHERE id = 4;
</code>
<p>
Note: make sure you use WHERE when you delete an entry from the table. Otherwise, you will delete all records from the table without wanting to.
</p>
</div>
<!-- SQL Topic 13 -->
<div class="sql__topic topic">
<h4 id="topic13" class="sql__topic-title">DELETING TABLES</h4>
<p>
If we want to remove all data from the table, but leave the table itself, we should use the <b>TRUNCATE</b> command:
</p>
<code class="code-block">
TRUNCATE TABLE table_name;
</code>
<p>
If we want to remove the table itself, we should use the <b>DROP</b> command:
</p>
<code class="code-block">
DROP TABLE table_name;
</code>
</div>
<!-- SQL Topic 14 -->
<div class="sql__topic topic">
<h4 id="topic14" class="sql__topic-title">CONCLUSION</h4>
<p>
On this note, we conclude this SQL tutorial. Of course, that’s not all, and there is still a lot to learn to fully master, but this introduction will give you an incentive to further explore.
</p>
</div>
<!-- Lower Row -->
<div class="link_popups">
<!-- Comments -->
<div class="link_tasks">
<p class="tasks">
<a href="">Tasks to Practice</a>
</p>
</div>
<!-- Rating -->
<div class="rating-area">
<p class=rate_article> Rate This Article!</p>
<input type="radio" id="star-5" name="rating" value="5">
<label class="star" for="star-5" title="mark «5»"></label>
<input type="radio" id="star-4" name="rating" value="4">
<label class="star" for="star-4" title="mark «4»"></label>
<input type="radio" id="star-3" name="rating" value="3">
<label class="star" for="star-3" title="mark «3»"></label>
<input type="radio" id="star-2" name="rating" value="2">
<label class="star" for="star-2" title="mark «2»"></label>
<input type="radio" id="star-1" name="rating" value="1">
<label class="star" for="star-1" title="mark «1»"></label>
</div>
<div class="link__mistakes">
<p class="mistakes">
<a href="">Found Mistakes?</br> Help Us!</a>
</p>
</div>
</div>
<!-- Comments -->
<div class="comments">
<!-- Comments Input -->
<div class="comments__write">
<div class="comments__avatar">
</div>
<textarea placeholder="Join the conversation..." name="comment" class="comments__textarea"></textarea>
<button class="btn comments__btn">Send</button>
</div>
<!-- Comment -->
<div class="comments__items">
<div class="comments__item comment">
<div class="comment__avatar">
</div>
<div class="comment__content">
<div class="comment__name">
<span class="comment__initial">Nazar</span>
<span class="comment__dot"></span>
<span class="comment__time">2 days ago</span>
</div>
<div class="comment__text">
<p>awesome website. thank you!</p>
</div>
<div class="comment__actions">
<p class="comment__action">
<i data-id="like" class="far fa-thumbs-up"></i>
<span class="comment__like-counter">1</span>
</p>
<div class="comment__action">
<i data-id="dislike" class="far fa-thumbs-down"></i>
<span class="comment__dislike-counter">0</span>
</div>
<div class="comment__reply">
Reply
</div>
</div>
</div>
</div>
<!-- Comment -->
<div class="comments__item comment">
<div class="comment__avatar">
</div>
<div class="comment__content">
<div class="comment__name">
<span class="comment__initial">Natalia</span>
<span class="comment__dot"></span>
<span class="comment__time">2 days ago</span>
</div>
<div class="comment__text">
<p>Amazing!!</p>
</div>
<div class="comment__actions">
<p class="comment__action">
<i data-id="like" class="far fa-thumbs-up"></i>
<span class="comment__like-counter">5</span>
</p>
<div class="comment__action">
<i data-id="dislike" class="far fa-thumbs-down"></i>
<span class="comment__dislike-counter">0</span>
</div>
<div class="comment__reply">
Reply
</div>
</div>
</div>
</div>
<!-- Comment -->
<div class="comments__item comment">
<div class="comment__avatar">
</div>
<div class="comment__content">
<div class="comment__name">
<span class="comment__initial">Tatsiana</span>
<span class="comment__dot"></span>
<span class="comment__time">2 days ago</span>
</div>
<div class="comment__text">
<p>i loved this article!</p>
</div>
<div class="comment__actions">
<p class="comment__action">
<i data-id="like" class="far fa-thumbs-up"></i>
<span class="comment__like-counter">2</span>
</p>
<div class="comment__action">
<i data-id="dislike" class="far fa-thumbs-down"></i>
<span class="comment__dislike-counter">3</span>
</div>
<div class="comment__reply">
Reply
</div>
</div>
</div>
</div>
</div>
</div>
<!-- SQL TOPICS DIV -->
</div>
<!-- Menu -->
<div id="article_menu" class="main-text article_right_menu">
<div id="fix_menu">
<ul class="article_menu1">
<li class="article_li"><a href="#sql__title" class="mainmenu1">Home
SQL</a></li>
<li class="article_li"><a href="#topic1" class="mainmenu1">Tables</a>
</li>
<!-- <li type="disc" class="article_li"><a href="#topic2" class="mainmenu1">DATA ENTRY</a></li> -->
<li class="article_li"><a href="#topic3" class="mainmenu1">Select </a>
</li>
<li class="article_li"><a href="#topic4" class="mainmenu1">Operators</a>
</li>
<!--<li type="disc" class="article_li"><a href="#topic5" class="mainmenu1">AND/OR</a></li>
<li type="disc" class="article_li"><a href="#topic6" class="mainmenu1">IN/BETWEEN/LIKE</a></li> -->
<li class="article_li"><a href="#topic7" class="mainmenu1">Functions</a>
</li>
<!-- <li type="disc" class="article_li"><a href="#topic8" class="mainmenu1">ATTACHED SELECT</a></li>
<li type="disc" class="article_li"><a href="#topic9" class="mainmenu1">ATTACHMENT OF TABLES</a></li> -->
<li class="article_li"><a href="#topic10" class="mainmenu1">Other</a>
</li>
<!-- <li type="disc" class="article_li"><a href="#topic11" class="mainmenu1">UPDATE</a></li>
<li type="disc" class="article_li"><a href="#topic12" class="mainmenu1">REMOVING RECORDS FROM THE TABLE</a></li>
<li type="disc" class="article_li"><a href="#topic13" class="mainmenu1">DELETING TABLES</a></li>
<li type="disc" class="article_li"><a href="#topic14" class="mainmenu1">CONCLUSION</a></li> -->
</ul>
<!-- burger sql menu</i> -->
<nav class="nav_sql_menu">
<div class="nav__showmenu" for="showmenu">
<img src="src/img/arrow-btn.svg" alt="Open Button">
</div>
<ul class="menu">
<div class="nav__back">
<img src="src/img/exit-btn.svg" alt="Back Buttin">
</div>
<li><a class="menu__item" href="#sql__title">Home</a></li>
<li><a class="menu__item" href="#topic3">Select</a></li>
<li><a class="menu__item" href="#topic4">Operators</a></li>
<li><a class="menu__item" href="#topic7">Functions</a></li>
<li><a class="menu__item" href="#topic10">Other</a></li>
</ul>
</nav>
</div>
</div>
</div>
</div>
</section>
<!-- Vertical Bar -->
<div class="vertical__bar">
<div class="vertical__content">
<div class="vertical__menu">
<i class="search-btn fas fa-search"></i>
<a href="index.html" class="sidebar__logo">
<img src="src/img/logo.svg" alt="">
</a>
<i class="burger-icon fas fa-bars"></i>
<i class="close-burger fas fa-times"></i>
</div>
<ul class="burger__list">
<li><a href="articles.html" class="burger__link">Articles</a></li>
<li><a href="topic-cards.html" class="burger__link">Learning</a></li>
</ul>
<div class="registration">
<a href="" class="burger__log">Login</a>
<span>|</span>
<a href="" class="burger__reg">Sign Up</a>
</div>
<div class="vertical__icons">
<div class="vertical__icon envelope">
<span class="fa-stack fa-4x">
<i class="fas fa-square fa-stack-2x"></i>
<i class="fas fa-envelope fa-stack-1x fa-inverse"></i>
</span>
<div class="envelope__popup">
<h4 class="envelope__popup-title">
Copied Email! <i class="fas fa-clipboard-check"></i>
</h4>
</div>
</div>
<a href="https://github.com/hidemydreams/WebFromScratch" target="_blank" class="vertical__icon">
<span class="fa-stack fa-4x">
<i class="fas fa-square fa-stack-2x"></i>
<i class="fab fa-github fa-stack-1x fa-inverse"></i>
</span>
</a>
<a href="#!" class="vertical__icon">
<span class="fa-stack fa-4x">
<i class="fas fa-square fa-stack-2x"></i>
<i class="fab fa-facebook fa-stack-1x fa-inverse"></i>
</span>
</a>
<a href="#!" class="vertical__icon">
<span class="fa-stack fa-4x">
<i class="fas fa-square fa-stack-2x"></i>
<i class="fab fa-linkedin-in fa-stack-1x fa-inverse"></i>
</span>
</a>
</div>
</div>
</div>
</main>
<!-- Footer -->
<footer>
<div class="container">
<div class="footer__row">
<div class="footer__column">
<h1 class="footer__title">
Menu
</h1>
<ul class="footer__list">
<li><a href="/index.html" class="footer__link">Home</a></li>
<li><a href="/index.html#questions-section" class="footer__link">Faq</a></li>
<li><a href="/topic-cards.html" class="footer__link">Learning</a></li>
<li><a href="/index.html#about" class="footer__link">About</a></li>
<li><a href="/index.html#form-section" class="footer__link">Contact</a></li>
<li><a href="/articles.html" class="footer__link">Articles</a></li>
<li><a href="/index.html#newsletter-section" class="footer__link">Newsletter</a></li>
</ul>
</div>
<div class="footer__column">
<h1 class="footer__title">
Topics
</h1>
<ul class="footer__list">
<li><a href="html-page.html" class="footer__link">HTML</a></li>
<li><a href="js-page.html" class="footer__link">JS</a></li>
<li><a href="css-page.html" class="footer__link">CSS</a></li>
<li><a href="basic-page.html" class="footer__link">Basics</a></li>
<li><a href="sql-page.html" class="footer__link">SQL</a></li>
<li><a href="git-page.html" class="footer__link">GIT</a></li>
</ul>
</div>
<div class="footer__info">
<p>WebFromScratch</p>
<p>Educational Project.</p>
<p>Created by Wild Code School Students.</p>
<p>All Rights Reserved.</p>
</div>
<div class="footer__icons">
<a href="#!" class="footer__icon">
<span class="fa-stack fa-4x">
<i class="fas fa-square fa-stack-2x"></i>
<i class="fas fa-envelope fa-stack-1x fa-inverse"></i>
</span>
</a>
<a href="https://github.com/hidemydreams/WebFromScratch" class="footer__icon">
<span class="fa-stack fa-4x">
<i class="fas fa-square fa-stack-2x"></i>
<i class="fab fa-github fa-stack-1x fa-inverse"></i>
</span>
</a>
<a href="#!" class="footer__icon">
<span class="fa-stack fa-4x">
<i class="fas fa-square fa-stack-2x"></i>
<i class="fab fa-facebook fa-stack-1x fa-inverse"></i>
</span>
</a>
<a href="#!" class="footer__icon">
<span class="fa-stack fa-4x">
<i class="fas fa-square fa-stack-2x"></i>
<i class="fab fa-linkedin-in fa-stack-1x fa-inverse"></i>
</span>
</a>
</div>
</div>
</div>
</footer>
</div>
<!-- Not Visible -->
<!-- Search Form -->
<div class="search-form">
<input class='search-input' type="text" placeholder='I am serching for...'>
<div class="search__content">
<div class="search__column">
<h3 class="search__title">
Learning
</h3>
<div class="search__results">
<ul>
<li><a href="#!" class="search__result">HTML</a></li>
<li><a href="#!" class="search__result">CSS</a></li>
<li><a href="#!" class="search__result">Basics</a></li>
<li><a href="#!" class="search__result">SQL</a></li>
<li><a href="#!" class="search__result">Javascript</a></li>
</ul>
</div>
</div>
<div class="search__column">
<h3 class="search__title">
Articles
</h3>
<div class="search__results">
<ul>
<li><a href="#!" class="search__result">Animations Crash Course</a></li>
<li><a href="#!" class="search__result">Margin Collapse</a></li>
<li><a href="#!" class="search__result">Small guide to SCSS</a></li>
</ul>
</div>
</div>
<div class="search__column">
<h3 class="search__title">
Cheatsheets
</h3>
<div class="search__results">
<ul>
<li><a href="#!" class="search__result">HTML Cheatsheet</a></li>
<li><a href="#!" class="search__result">CS Cheatsheets</a></li>
<li><a href="#!" class="search__result">JS Cheatsheet</a></li>
<li><a href="#!" class="search__result">:nth-child Cheatsheet</a></li>
<li>
<a href="#!" class="search__result">SQL Cheatsheet</a></li>
</ul>
</div>
</div>
</div>
<div class="search-close">
<i class="fas fa-times"></i>
</div>
</div>
<!-- Pop Up rating -->
<div class="popup rating_popup">
<div class="modal rating_modal">
<p class="popup_rat">Thank Your For Your Grading</p>
<button class="btn btn_rating modal__btn">Exit</button>
</div>
</div>
<!-- Pop Up comments -->
<div class="popup comments_popup">
<div class="modal comments_modal">
<p class=" comments_title ">Leave Your Comment!</p>
<div class=" comments_comment">
<input class="name_comment" placeholder="Name " type="text">
<textarea placeholder="Your Comment" class="message_comment" name="comment"></textarea>
</div>
<button class="btn button_article modal__btn">Send</button>
<div class=" items_comments ">
<div class="item_comment comment ">
<p class=" comment_name ">Nazar</p>
<p>Awesome Website! Thank you for this topic</p>
</div>
<div class="item_comments comment ">
<p class=" comment_name ">Tatsiana</p>
<p>nice explanation. loved it!</p>
</div>
<div class="item_comments comment ">
<p class=" comment_name">Natalia</p>
<p>best website!</p>
</div>
</div>
<button class="btn btn_quit modal__btn">Quit</button>
</div>
</div>
<!-- Pop up Tasks -->
<div class="popup tasks_popup">
<div class="modal tasks_modal">
<p class="popup_title ">Tasks for Topic 1:</p>
<div class="task ">
<h4>Task1</h4>
<p class="task1 ">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen
book.
</p>
</div>
<div class="task ">
<h4>Task1</h4>
<p class="task1 ">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen
book.
</p>
</div>
<div class="task ">
<h4>Task1</h4>
<p class="task1 ">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen
book.
</p>
</div>
<button class="btn btn_tasks modal__btn">Quit</button>
</div>
</div>
<!-- Pop Up Mistake -->
<div class="popup mistake_popup">
<div class="modal mistake_modal ">
<p class="pop_up_mistakes ">Found Mistakes?</br> Help Us!</p>
<div class="mistake_item ">
<input class="email" placeholder="Your name" type="text">
<textarea placeholder="Describe any mistakes you found, or maybe some material is outdated... " class="message" name="message"></textarea>
</div>
<button class="btn btn_mistake modal__btn ">Send</button>
</div>
</div>
<!-- Response Pop Up-->
<div class="popup response_popup">
<div class="modal response_modal">
<p class="popup_res">Thank Your For Your Response</p>
<button class="btn modal__btn btn_res"><i class="far fa-times-circle"></i></button>
</div>
</div>
<!-- PopUps -->
<div class="popup log__popup">
<div class="modal log__modal">
<h3 class=" modal__item log__title">Log In</h3>
<input placeholder='Email' class=' modal__item log__login' type="text">
<input placeholder='Password' class='modal__item log__pass' type="password">
<button class="btn modal__item log__btn modal__btn">Log in</button>
<a href="fullpage-registration.html" class="modal__link">Full Page <i
class="far fa-arrow-alt-circle-right"></i></a>
</div>
</div>
<div class="popup reg__popup">
<div class="modal reg__modal ">
<h3 class=" modal__item reg__title">Sign Up</h3>
<input placeholder='Email' class=' modal__item reg__login' type="text">
<input placeholder='Password' class='modal__item log__pass' type="password">
<input placeholder='Repeat your password' class='modal__item reg__pass' type="password">
<button class="btn modal__item reg__btn modal__btn">Sign Up</button>
<a href="fullpage-registration.html" class="modal__link">Full Page <i
class="far fa-arrow-alt-circle-right"></i></a>
</div>
</div>
<!-- Preloader -->
<div class="preloader">
<div class="preloader__content">
<div class="preloader__first">
</div>
<div class="preloader__second">
</div>
<div class="preloader__third">
</div>
</div>
</div>
<!-- Scroll Indicator -->