Академический Документы
Профессиональный Документы
Культура Документы
---+
| id_pemain | no_punggung | nm_pemain
| kebangsaan | posisi
| us
ia |
+-----------+-------------+---------------+------------+--------------------+-----+
| AR23
|
23 | Ranocchia
| Italia
| Bek Tengah
|
25 |
| DA33
|
33 | D.Ambrossio | Italia
| Bek Sayap
|
24 |
| FG13
|
13 | Fredy Guarin | Kolombia | Gelandang
|
27 |
| GM18
|
18 | Gary Medel
| Chile
| Gelandang
|
26 |
| JJ05
|
5 | Juan Jesus
| Brasil
| Bek Tengah
|
22 |
| KM17
|
17 | Kuzmanovic
| Serbia
| Gelandang Bertahan |
27 |
| MI09
|
9 | Mauro Icardi | Argentina | Striker
|
21 |
| MK10
|
10 | Mateo Kovacic | Kroasia
| Gelandang Serang |
20 |
| NG55
|
55 | Nagatomo
| Jepang
| Bek Sayap
|
26 |
| PO07
|
7 | Pablo Osvaldo | Italia
| Striker
|
25 |
| SH01
|
1 | Handanovic
| Slovenia | Kiper
|
30 |
+-----------+-------------+---------------+------------+--------------------+-----+
11 rows in set (0.00 sec)
mysql> insert into topskorer
-> values (;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near '' at
line 2
mysql> Insert into Skuat_Reguler
-> values ("JC30",30,"Carrizo","Argentina","Kiper",30),
-> ("TB46",46,"Tommaso Berni","Italia","Kiper",31),
-> ("CJ02",2,"Jonathan","Brasil","Bek Sayap",26),
-> ("MA06",6,"Andreolli","Italia","Bek Tengah",26),
-> ("HC14",14,"Campagnaro","Argentina","Bek",34),
-> ("NV15",15,"Vidic","Serbia","Bek",33),
-> ("DD22",22,"Dodo","Brasil","Bek Sayap",22),
-> ("IM25",25,"Ibrahima Mbaye","Senegal","Bek",20),
-> ("ID54",54,"Donkor","Ghana","Bek",20),
-> ("JO20",20,"Obi","Nigeria","Gelandang",23),
-> ("AH88",88,"Hernanes","Brasil","Gelandang",28),
-> ("YM90",90,"MVila","Perancis","Gelandang",24),
-> ("RP08",8,"Palacio","Argentina","Striker",30),
-> ("FB97",97,"Bonazzoli","Italia","Striker",17);
Query OK, 14 rows affected (0.04 sec)
Records: 14 Duplicates: 0 Warnings: 0
mysql> select * from Skuat_Reguler;
+-----------+-------------+----------------+------------+--------------------+-----+
| id_pemain | no_punggung | nm_pemain
| kebangsaan | posisi
| u
sia |
+-----------+-------------+----------------+------------+--------------------+--
----+
| AH88
|
88 | Hernanes
| Brasil
| Gelandang
|
28 |
| AR23
|
23 | Ranocchia
| Italia
| Bek Tengah
|
25 |
| CJ02
|
2 | Jonathan
| Brasil
| Bek Sayap
|
26 |
| DA33
|
33 | D.Ambrossio
| Italia
| Bek Sayap
|
24 |
| DD22
|
22 | Dodo
| Brasil
| Bek Sayap
|
22 |
| FB97
|
97 | Bonazzoli
| Italia
| Striker
|
17 |
| FG13
|
13 | Fredy Guarin | Kolombia | Gelandang
|
27 |
| GM18
|
18 | Gary Medel
| Chile
| Gelandang
|
26 |
| HC14
|
14 | Campagnaro
| Argentina | Bek
|
34 |
| ID54
|
54 | Donkor
| Ghana
| Bek
|
20 |
| IM25
|
25 | Ibrahima Mbaye | Senegal
| Bek
|
20 |
| JC30
|
30 | Carrizo
| Argentina | Kiper
|
30 |
| JJ05
|
5 | Juan Jesus
| Brasil
| Bek Tengah
|
22 |
| JO20
|
20 | Obi
| Nigeria
| Gelandang
|
23 |
| KM17
|
17 | Kuzmanovic
| Serbia
| Gelandang Bertahan |
27 |
| MA06
|
6 | Andreolli
| Italia
| Bek Tengah
|
26 |
| MI09
|
9 | Mauro Icardi | Argentina | Striker
|
21 |
| MK10
|
10 | Mateo Kovacic | Kroasia
| Gelandang Serang |
20 |
| NG55
|
55 | Nagatomo
| Jepang
| Bek Sayap
|
26 |
| NV15
|
15 | Vidic
| Serbia
| Bek
|
33 |
| PO07
|
7 | Pablo Osvaldo | Italia
| Striker
|
25 |
| RP08
|
8 | Palacio
| Argentina | Striker
|
30 |
| SH01
|
1 | Handanovic
| Slovenia | Kiper
|
30 |
| TB46
|
46 | Tommaso Berni | Italia
| Kiper
|
31 |
| YM90
|
90 | MVila
| Perancis | Gelandang
|
24 |
+-----------+-------------+----------------+------------+--------------------+-----+
25 rows in set (0.00 sec)
mysql>----------------------------------------------------------------------------------------> ("DA33",33,"D.Ambrossio","Italia","Bek Sayap",24),
-> ("RP08",8,"Palacio","Argentina","Striker",30),
-> ("FB97",97,"Bonazzoli","Italia","Striker",17);
Query OK, 14 rows affected (0.04 sec)
Records: 14 Duplicates: 0 Warnings: 0
mysql> select * from Skuat_Reguler;
+-----------+-------------+----------------+------------+--------------------+-----+
| id_pemain | no_punggung | nm_pemain
| kebangsaan | posisi
| u
sia |
+-----------+-------------+----------------+------------+--------------------+-----+
| AH88
|
88 | Hernanes
| Brasil
| Gelandang
|
28 |
| AR23
|
23 | Ranocchia
| Italia
| Bek Tengah
|
25 |
| CJ02
|
2 | Jonathan
| Brasil
| Bek Sayap
|
26 |
| DA33
|
33 | D.Ambrossio
| Italia
| Bek Sayap
|
24 |
| DD22
|
22 | Dodo
| Brasil
| Bek Sayap
|
22 |
| FB97
|
97 | Bonazzoli
| Italia
| Striker
|
17 |
| FG13
|
13 | Fredy Guarin | Kolombia | Gelandang
|
27 |
| GM18
|
18 | Gary Medel
| Chile
| Gelandang
|
26 |
| HC14
|
14 | Campagnaro
| Argentina | Bek
|
34 |
| ID54
|
54 | Donkor
| Ghana
| Bek
|
20 |
| IM25
|
25 | Ibrahima Mbaye | Senegal
| Bek
|
20 |
| JC30
|
30 | Carrizo
| Argentina | Kiper
|
30 |
| JJ05
|
5 | Juan Jesus
| Brasil
| Bek Tengah
|
22 |
| JO20
|
20 | Obi
| Nigeria
| Gelandang
|
23 |
| KM17
|
17 | Kuzmanovic
| Serbia
| Gelandang Bertahan |
27 |
| MA06
|
6 | Andreolli
| Italia
| Bek Tengah
|
26 |
| MI09
|
9 | Mauro Icardi | Argentina | Striker
|
21 |
| MK10
|
10 | Mateo Kovacic | Kroasia
| Gelandang Serang |
20 |
| NG55
|
55 | Nagatomo
| Jepang
| Bek Sayap
|
26 |
| NV15
|
15 | Vidic
| Serbia
| Bek
|
33 |
| PO07
|
7 | Pablo Osvaldo | Italia
| Striker
|
25 |
| RP08
|
8 | Palacio
| Argentina | Striker
|
30 |
| SH01
|
1 | Handanovic
| Slovenia | Kiper
|
30 |
| TB46
|
46 | Tommaso Berni | Italia
| Kiper
|
31 |
| YM90
|
90 | MVila
| Perancis | Gelandang
|
24 |
+-----------+-------------+----------------+------------+--------------------+-----+
25 rows in set (0.00 sec)
mysql> insert into topskorer
-> values ("MI01","MI09",8),
-> ("PO02","PO07",5),
-> ("MK03","MK10",4),
-> ("FG04","FG13",2),
-> ("AH04","AH88",2),
-> ("AR04","AR23",2),
-> ("RP05","RP08",1),
-> ("JO05","JO20",1);
Query OK, 8 rows affected (0.06 sec)
Records: 8 Duplicates: 0 Warnings: 0
mysql> select * from topskorer;
+--------------+-----------+-----+
| id_topskorer | id_pemain | gol |
+--------------+-----------+-----+
| AH04
| AH88
| 2 |
| AR04
| AR23
| 2 |
| FG04
| FG13
| 2 |
| JO05
| JO20
| 1 |
| MI01
| MI09
| 8 |
| MK03
| MK10
| 4 |
| PO02
| PO07
| 5 |
| RP05
| RP08
| 1 |
+--------------+-----------+-----+
8 rows in set (0.00 sec)
mysql> select * from topskorer
-> order by gol;
+--------------+-----------+-----+
| id_topskorer | id_pemain | gol |
+--------------+-----------+-----+
| JO05
| JO20
| 1 |
| RP05
| RP08
| 1 |
| AH04
| AH88
| 2 |
| AR04
| AR23
| 2 |
| FG04
| FG13
| 2 |
| MK03
| MK10
| 4 |
| PO02
| PO07
| 5 |
| MI01
| MI09
| 8 |
+--------------+-----------+-----+
8 rows in set (0.00 sec)
mysql> select * from topskorer
-> order by gol desc;
+--------------+-----------+-----+
| id_topskorer | id_pemain | gol |
+--------------+-----------+-----+
| MI01
| MI09
| 8 |
| PO02
| PO07
| 5 |
| MK03
| MK10
| 4 |
| AH04
| AH88
| 2 |
| AR04
| AR23
| 2 |
| FG04
| FG13
| 2 |
| JO05
| JO20
| 1 |
| RP05
| RP08
| 1 |
+--------------+-----------+-----+
8 rows in set (0.00 sec)
mysql> insert into penampilan
-> values ("ST01","",8),,
-> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near '' at
line 2
mysql> alter table penampilan add main_penuh int(2) unsigned not null;
Query OK, 0 rows affected (0.21 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql> describe penampilan;
+------------------+-----------------+------+-----+---------+-------+
| Field
| Type
| Null | Key | Default | Extra |
+------------------+-----------------+------+-----+---------+-------+
| id_penampilan
| char(4)
| NO | PRI | NULL
|
|
| starter
| int(2) unsigned | NO |
| NULL
|
|
| digantikan
| int(2) unsigned | NO |
| NULL
|
|
| total_penampilan | int(3) unsigned | NO |
| NULL
|
|
| main_penuh
| int(2) unsigned | NO |
| NULL
|
|
+------------------+-----------------+------+-----+---------+-------+
5 rows in set (0.01 sec)
mysql> values ("ST01","",8),,
-> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'value
s ("ST01","",8),,' at line 1
mysql> alter table penampilan add tidak_bermain int(2) unsigned not null;
Query OK, 0 rows affected (0.20 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql> describe penampilan;
+------------------+-----------------+------+-----+---------+-------+
| Field
| Type
| Null | Key | Default | Extra |
+------------------+-----------------+------+-----+---------+-------+
| id_penampilan
| char(4)
| NO | PRI | NULL
|
|
| starter
| int(2) unsigned | NO |
| NULL
|
|
| digantikan
| int(2) unsigned | NO |
| NULL
|
|
| total_penampilan | int(3) unsigned | NO |
| NULL
|
|
| main_penuh
| int(2) unsigned | NO |
| NULL
|
|
| tidak_bermain
| int(2) unsigned | NO |
| NULL
|
|
+------------------+-----------------+------+-----+---------+-------+
6 rows in set (0.02 sec)
mysql> alter table penampilan add nm_pemain varchar(30) not null;
Query OK, 0 rows affected (0.29 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql> describe table;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'table
' at line 1
mysql> describe penampilan;
+------------------+-----------------+------+-----+---------+-------+
| Field
| Type
| Null | Key | Default | Extra |
+------------------+-----------------+------+-----+---------+-------+
| id_penampilan
| char(4)
| NO | PRI | NULL
|
|
| starter
| int(2) unsigned | NO |
| NULL
|
|
| digantikan
| int(2) unsigned | NO |
| NULL
|
|
| total_penampilan | int(3) unsigned | NO |
| NULL
|
|
| main_penuh
| int(2) unsigned | NO |
| NULL
|
|
| tidak_bermain
| int(2) unsigned | NO |
| NULL
|
|
| nm_pemain
| varchar(30)
| NO |
| NULL
|
|
+------------------+-----------------+------+-----+---------+-------+
7 rows in set (0.02 sec)
mysql> values ("TP16",7,7,16,7,0,"Dodo"),
-> ("P16B"16,0,16,16,0,"Handanovic"),
-> values ("TP16",7,7,16,7,0,"Dodo"),;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'value
s ("TP16",7,7,16,7,0,"Dodo"),
("P16B"16,0,16,16,0,"Handanovic"),
values ("T' at line 1
mysql> values ("P16A",7,7,16,7,0,"Do;
"> ;
">
">
">
"> ';
">
"> "
-> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'value
s ("P16A",7,7,16,7,0,"Do;
;
';
"' at line 1
mysql> drop table pemain cadangan;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'cadan
gan' at line 1
mysql> drop table pemain_cadangan;
Query OK, 0 rows affected (0.06 sec)
mysql> drop table penampilan;
ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constrai
nt fails
mysql> alter table penampilan add pemain_pengganti int(2) unsigned not null;
Query OK, 0 rows affected (0.20 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql> describe penampilan;
+------------------+-----------------+------+-----+---------+-------+
| Field
| Type
| Null | Key | Default | Extra |
+------------------+-----------------+------+-----+---------+-------+
| id_penampilan
| char(4)
| NO | PRI | NULL
|
|
| starter
| int(2) unsigned | NO |
| NULL
|
|
| digantikan
| int(2) unsigned | NO |
| NULL
|
|
| total_penampilan | int(3) unsigned | NO |
| NULL
|
|
| main_penuh
| int(2) unsigned | NO |
| NULL
|
|
| tidak_bermain
| int(2) unsigned | NO |
| NULL
|
|
| nm_pemain
| varchar(30)
| NO |
| NULL
|
|
| pemain_pengganti | int(2) unsigned | NO |
| NULL
|
|
+------------------+-----------------+------+-----+---------+-------+
8 rows in set (0.01 sec)
mysql> values ("P16A",7,7,16,7,0,"Dodo",2),
-> ("P16B",16,0,16,16,0,"Handanovic",0),
-> ("P16C",8,5,16,8,1,"Handanovic",2),
-> ("P16D",15,1,16,15,0,"Handanovic",2),;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'value
s ("P16A",7,7,16,7,0,"Dodo",2),
("P16B",16,0,16,16,0,"Handanovic",0),
("P16' at line 1
mysql> values ("P16A",7,7,16,7,0,"Dodo",2),
-> ("P16B",16,0,16,16,0,"Handanovic",0),
-> ("P16C",8,5,16,8,1,"Mauro Icardi",2),
-> ("P16D",15,1,16,15,0,"Juan Jesus",0),
-> ("P16E",8,6,16,8,1,"Mateo Kovacic",1),
-> ("P15A",9,5,15,9,0,"Gary Medel",1),
-> ("P15B",6,4,15,6,2,"Palacio",3),
-> ("P15C",14,1,15,14,0,"Ranocchia",0),
-> ("P11A",5,1,11,5,0,"Hernanes",5),
-> ("P11B",4,1,11,4,0,"Hernanes",6),
-> ,;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'value
s ("P16A",7,7,16,7,0,"Dodo",2),
("P16B",16,0,16,16,0,"Handanovic",0),
("P16' at line 1
mysql> values ("P16A",7,7,16,7,0,"Dodo",2),
-> ("P16B",16,0,16,16,0,"Handanovic",0),
-> ("P16C",8,5,16,8,1,"Mauro Icardi",2),
-> ("P16D",15,1,16,15,0,"Juan Jesus",0),
-> ("P16E",8,6,16,8,1,"Mateo Kovacic",1),
-> ("P15A",9,5,15,9,0,"Gary Medel",1),
-> ("P15B",6,4,15,6,2,"Palacio",3),
-> ("P15C",14,1,15,14,0,"Ranocchia",0),
-> ("P11A",5,1,11,5,0,"Hernanes",5),
-> ("P11B",4,1,11,4,0,"Pablo Osvaldo",6),
-> ("P11B",5,2,10,5,0,"Fredy Guarin",3),
-> ("P11B",5,2,10,5,0,"Fredy Guarin",3),;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'value
s ("P16A",7,7,16,7,0,"Dodo",2),
("P16B",16,0,16,16,0,"Handanovic",0),
("P16' at line 1
mysql> values ("P16A",7,7,16,7,0,"Dodo",2),
-> ("P16B",16,0,16,16,0,"Handanovic",0),
-> ("P16C",8,5,16,8,1,"Mauro Icardi",2),
-> ("P16D",15,1,16,15,0,"Juan Jesus",0),
-> ("P16E",8,6,16,8,1,"Mateo Kovacic",1),
-> ("P15A",9,5,15,9,0,"Gary Medel",1),
-> ("P15B",6,4,15,6,2,"Palacio",3),
-> ("P15C",14,1,15,14,0,"Ranocchia",0),
-> ("P11A",5,1,11,5,0,"Hernanes",5),
-> ("P11B",4,1,11,4,0,"Pablo Osvaldo",6),
-> ("P10A",5,2,10,5,0,"Fredy Guarin",3),
->
->
->
->
("P09A",7,1,9,7,0,"Nagatomo",1),
("P09B",8,0,9,8,1,"Vidic",0),
("P08A",4,2,8,4,1,"Vidic",1),
("P08A",4,2,8,4,1,"Vidic",1),^V
------------------------------------------------------------------------------------------
cchia
| P16A
0 |
|
7 |
7 |
16 |
0 | Dodo
2 |
| P16B
|
16 |
0 |
16 |
0 | Hand
anovic
|
0 |
| P16C
|
8 |
5 |
16 |
1 | Maur
o Icardi |
2 |
| P16D
|
15 |
1 |
16 |
0 | Juan
Jesus
|
0 |
| P16E
|
8 |
6 |
16 |
1 | Mate
o Kovacic |
1 |
+---------------+---------+------------+------------------+---------------+---------------+------------------+
21 rows in set (0.00 sec)
mysql> insert into menit_bermain
-> values (;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near '' at
line 2
mysql> alter table menit_bermain drop babak_1, babak_2;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'babak
_2' at line 1
mysql> alter table menit_bermain drop babak_1;
ERROR 1091 (42000): Can't DROP 'babak_1'; check that column/key exists
mysql> describe menit bermain;
ERROR 1146 (42S02): Table 'inventory.menit' doesn't exist
mysql> describe menit_bermain;
+------------------+-----------------+------+-----+---------+-------+
| Field
| Type
| Null | Key | Default | Extra |
+------------------+-----------------+------+-----+---------+-------+
| id_menit_bermain | char(4)
| NO | PRI | NULL
|
|
| id_penampilan
| char(4)
| NO | MUL | NULL
|
|
| total_menit
| int(5) unsigned | NO |
| NULL
|
|
| babak_pertama
| int(5) unsigned | NO |
| NULL
|
|
| babak_kedua
| int(5) unsigned | NO |
| NULL
|
|
+------------------+-----------------+------+-----+---------+-------+
5 rows in set (0.01 sec)
mysql> alter table menit_bermain drop babak_pertama, babak_kedua;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'babak
_kedua' at line 1
mysql> alter table menit_bermain drop babak_pertama;
Query OK, 0 rows affected (0.17 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql> alter table menit_bermain drop babak_kedua;
Query OK, 0 rows affected (0.23 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql> describe menit_bermain;
+------------------+-----------------+------+-----+---------+-------+
| Field
| Type
| Null | Key | Default | Extra |
+------------------+-----------------+------+-----+---------+-------+
| id_menit_bermain | char(4)
| NO | PRI | NULL
|
|
| id_penampilan
| char(4)
| NO | MUL | NULL
|
|
| total_menit
| int(5) unsigned | NO |
| NULL
|
|
+------------------+-----------------+------+-----+---------+-------+
anes
| P11B
o Osvaldo
| P15A
Medel
| P15B
cio
| P15C
cchia
| P16A
5 |
|
4 |
|
|
9 |
11 |
0 | Pabl
5 |
15 |
0 | Gary
4 |
15 |
2 | Pala
1 |
15 |
0 | Rano
7 |
16 |
0 | Dodo
1 |
|
6 |
3 |
|
14 |
0 |
|
1 |
6 |
7 |
2 |
| P16B
|
16 |
0 |
16 |
0 | Hand
anovic
|
0 |
| P16C
|
8 |
5 |
16 |
1 | Maur
o Icardi |
2 |
| P16D
|
15 |
1 |
16 |
0 | Juan
Jesus
|
0 |
| P16E
|
8 |
6 |
16 |
1 | Mate
o Kovacic |
1 |
+---------------+---------+------------+------------------+---------------+---------------+------------------+
22 rows in set (0.00 sec)
mysql> values ("B515","P16B",1515),
-> ("B486","P16D",1486),
-> ("B385","P15C",1385),
-> ("B361","P16E",1361),
-> ("B251","P15A",1251),
-> ("B238","P16C",1238),
-> ("B211","P16A",1211),
-> ("B134","P15B",1134),
-> ("B052","P09B",852),
-> ("B005","P10A",705),
-> ("B081","P11A",681),
-> ("B068","P08A",668),
-> ("B066","P09A",666),
-> ("B605","P11B",605),
-> ("B405","P07A",405),
-> ("B079","P08B",379),
-> ("B062","P07B",262),
-> ("B092","P03B",192),
-> ("B089","P02A",189),
-> ("B080","P02B",180),
-> ("B007","P04A",107),
-> ("B003","P03A",43);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'value
s ("B515","P16B",1515),
("B486","P16D",1486),
("B385","P15C",1385),
("B361"' at line 1
mysqlinsert into menit_bermain
values ("B515","P16B",1515),
("B486","P16D",1486),
("B385","P15C",1385),
("B361","P16E",1361),
("B251","P15A",1251),
("B238","P16C",1238),
("B211","P16A",1211),
("B134","P15B",1134),
("B052","P09B",852),
("B005","P10A",705),
("B081","P11A",681),
("B068","P08A",668),
("B066","P09A",666),
("B605","P11B",605),
("B405","P07A",405),
("B079","P08B",379),
("B062","P07B",262),
("B092","P03B",192),
("B089","P02A",189),
("B080","P02B",180),
("B007","P04A",107),
("B003","P03A",43),
Query OK, 22 rows affected (0.08 sec)
Records: 22 Duplicates: 0 Warnings: 0
mysql> select * from menit_bermain;
+------------------+---------------+-------------+
| id_menit_bermain | id_penampilan | total_menit |
+------------------+---------------+-------------+
| B003
| P03A
|
43 |
| B005
| P10A
|
705 |
| B007
| P04A
|
107 |
| B052
| P09B
|
852 |
| B062
| P07B
|
262 |
| B066
| P09A
|
666 |
| B068
| P08A
|
668 |
| B079
| P08B
|
379 |
| B080
| P02B
|
180 |
| B081
| P11A
|
681 |
| B089
| P02A
|
189 |
| B092
| P03B
|
192 |
| B134
| P15B
|
1134 |
| B211
| P16A
|
1211 |
| B238
| P16C
|
1238 |
| B251
| P15A
|
1251 |
| B361
| P16E
|
1361 |
| B385
| P15C
|
1385 |
| B405
| P07A
|
405 |
| B486
| P16D
|
1486 |
| B515
| P16B
|
1515 |
| B605
| P11B
|
605 |
+------------------+---------------+-------------+
22 rows in set (0.00 sec)
mysql> alter table kartu add nm_pemain varchar(30) not null;
Query OK, 0 rows affected (0.19 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql> describe kartu;
+-------------+-----------------+------+-----+---------+-------+
| Field
| Type
| Null | Key | Default | Extra |
+-------------+-----------------+------+-----+---------+-------+
| id_kartu
| char(4)
| NO | PRI | NULL
|
|
| kuning
| int(2) unsigned | NO |
| NULL
|
|
| merah
| int(2) unsigned | NO |
| NULL
|
|
| total_kartu | int(2) unsigned | NO |
| NULL
|
|
| nm_pemain | varchar(30)
| NO |
| NULL
|
|
+-------------+-----------------+------+-----+---------+-------+
| KD22
|
3 |
0 | Dodo
|
| KD33
|
2 |
0 | D.Ambrossio |
| KG13
|
3 |
0 | Fredy Guarin |
| KH01
|
1 |
0 | Handanovic
|
| KH88
|
2 |
0 | Hernanes
|
| KJ05
|
3 |
0 | Juan Jesus
|
| KK10
|
2 |
0 | Mateo Kovacic |
| KM18
|
4 |
1 | Gary Medel
|
| KN55
|
2 |
1 | Nagatomo
|
| KO07
|
1 |
0 | Pablo Osvaldo |
| KO20
|
1 |
0 | Obi
|
| KP08
|
1 |
0 | Palacio
|
| KR23
|
3 |
0 | Ranocchia
|
| KV15
|
0 |
1 | Vidic
|
+----------+--------+-------+---------------+
16 rows in set (0.00 sec)
mysql> -------------------------------------------------------------------------------------| P04A
|
0 |
0 |
4 |
0 | Ibra
hima Mbaye |
4 |
| P03B
|
2 |
0 |
3 |
0 | Camp
agnaro
|
1 |
| P03A
|
0 |
0 |
3 |
0 | Bona
zzoli
|
3 |
| P02B
|
1 |
1 |
2 |
0 | Jona
than
|
0 |
| P02A
|
2 |
0 |
2 |
0 | Andr
eolli
|
0 |
+---------------+---------+------------+------------------+---------------+---------------+------------------+
22 rows in set (0.00 sec)
mysql> drop penampilan;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'penam
pilan' at line 1
mysql> drop table penampilan;
ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constrai
nt fails
mysql> describe penampilan;
+------------------+-----------------+------+-----+---------+-------+
| Field
| Type
| Null | Key | Default | Extra |
+------------------+-----------------+------+-----+---------+-------+
| id_penampilan
| char(4)
| NO | PRI | NULL
|
|
| starter
| int(2) unsigned | NO |
| NULL
|
|
| digantikan
| int(2) unsigned | NO |
| NULL
|
|
| total_penampilan | int(3) unsigned | NO |
| NULL
|
|
| tidak_bermain
| int(2) unsigned | NO |
| NULL
|
|
| nm_pemain
| varchar(30)
| NO |
| NULL
|
|
| pemain_pengganti | int(2) unsigned | NO |
| NULL
|
|
+------------------+-----------------+------+-----+---------+-------+
7 rows in set (0.02 sec)
mysql> select * from menit_bermain;
+------------------+---------------+-------------+
| id_menit_bermain | id_penampilan | total_menit |
+------------------+---------------+-------------+
| B003
| P03A
|
43 |
| B005
| P10A
|
705 |
| B007
| P04A
|
107 |
| B052
| P09B
|
852 |
| B062
| P07B
|
262 |
| B066
| P09A
|
666 |
| B068
| P08A
|
668 |
| B079
| P08B
|
379 |
| B080
| P02B
|
180 |
| B081
| P11A
|
681 |
| B089
| P02A
|
189 |
| B092
| P03B
|
192 |
| B134
| P15B
|
1134 |
| B211
| P16A
|
1211 |
| B238
| P16C
|
1238 |
| B251
| P15A
|
1251 |
| B361
| P16E
|
1361 |
| B385
| P15C
|
1385 |
| B405
| P07A
|
405 |
| B486
| P16D
|
1486 |
| B515
| P16B
|
1515 |
| B605
| P11B
|
605 |
+------------------+---------------+-------------+
22 rows in set (0.06 sec)
mysql> describe menit bermain;
ERROR 1146 (42S02): Table 'inventory.menit' doesn't exist
mysql> describe menit_bermain;
+------------------+-----------------+------+-----+---------+-------+
| Field
| Type
| Null | Key | Default | Extra |
+------------------+-----------------+------+-----+---------+-------+
| id_menit_bermain | char(4)
| NO | PRI | NULL
|
|
| id_penampilan
| char(4)
| NO | MUL | NULL
|
|
| total_menit
| int(5) unsigned | NO |
| NULL
|
|
+------------------+-----------------+------+-----+---------+-------+
3 rows in set (0.02 sec)
mysql> alter table modify id_penampilan char(4) not null;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'id_pe
nampilan char(4) not null' at line 1
mysql> alter table menit_bermin modify id_penampilan char(4) not null;
ERROR 1146 (42S02): Table 'inventory.menit_bermin' doesn't exist
mysql> alter table menit_bermain modify id_penampilan char(4) not null;
Query OK, 0 rows affected (0.07 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql> describe table;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'table
' at line 1
mysql> describe menit_bermain;
+------------------+-----------------+------+-----+---------+-------+
| Field
| Type
| Null | Key | Default | Extra |
+------------------+-----------------+------+-----+---------+-------+
| id_menit_bermain | char(4)
| NO | PRI | NULL
|
|
| id_penampilan
| char(4)
| NO | MUL | NULL
|
|
| total_menit
| int(5) unsigned | NO |
| NULL
|
|
+------------------+-----------------+------+-----+---------+-------+
3 rows in set (0.02 sec)
-> ("P16B","Handanovic",16,0,0,0,16),
-> ("P16A","Dodo",7,7,2,0,16),
-> ("P15A","Gary Medel",9,5,1,0,15),
-> ("P15B","Palacio",6,4,3,2,15),
-> ("P15C","Ranocchia",14,1,0,0,15),
-> ("P11B","Pablo Osvaldo",4,1,6,0,11),
-> ("P11A","Hernanes",5,1,5,0,11),
-> ("P10A","Fredy Guarin",5,2,3,0,10),
-> ("P09B","Vidic",8,0,0,1,9),
-> ("P09A","Nagatomo",7,1,1,0,9),
-> ("P08B","Obi",0,5,3,0,8),
-> ("P08A","Kuzmanovic",0,5,3,0,8),
-> ("P07A","D.Ambrossio",2,2,3,0,7),
-> ("P07B","MVila",1,2,4,0,7),
-> ("P04A","Ibrahima Mbaye",0,0,4,0,4),
-> ("P03B","Campagnaro",2,0,1,0,3),
-> ("P03A","Bonazzoli",0,0,3,0,3),
-> ("P02B","Jonathan",1,1,0,0,2),
-> ("P02A","Andreolli",2,0,0,0,2),
-> ("P00A","Carrizo",0,0,0,0,0),
-> ("P00B","Tommaso Berni",0,0,0,0,0),
-> ("P00C","Donkor",0,0,0,0,0);
Query OK, 25 rows affected (0.10 sec)
Records: 25 Duplicates: 0 Warnings: 0
mysql> select * from penampilan;
+---------------+----------------+---------+------------+-----------+--------------+------------------+
| id_penampilan | nm_pemain
| starter | digantikan | pengganti | tidak_berm
ain | total_penampilan |
+---------------+----------------+---------+------------+-----------+--------------+------------------+
| P00A
| Carrizo
|
0 |
0 |
0 |
0 |
0 |
| P00B
| Tommaso Berni |
0 |
0 |
0 |
0 |
0 |
| P00C
| Donkor
|
0 |
0 |
0 |
0 |
0 |
| P02A
| Andreolli
|
2 |
0 |
0 |
0 |
2 |
| P02B
| Jonathan
|
1 |
1 |
0 |
0 |
2 |
| P03A
| Bonazzoli
|
0 |
0 |
3 |
0 |
3 |
| P03B
| Campagnaro
|
2 |
0 |
1 |
0 |
3 |
| P04A
| Ibrahima Mbaye |
0 |
0 |
4 |
0 |
4 |
| P07A
| D.Ambrossio
|
2 |
2 |
3 |
0 |
7 |
| P07B
| MVila
|
1 |
2 |
4 |
0 |
7 |
| P08A
| Kuzmanovic
|
0 |
5 |
3 |
0 |
8 |
| P08B
| Obi
|
0 |
5 |
3 |
0 |
8 |
| P09A
| Nagatomo
|
7 |
1 |
1 |
0 |
9 |
| P09B
| Vidic
|
8 |
0 |
0 |
1 |
9 |
| P10A
| Fredy Guarin |
5 |
2 |
3 |
0 |
10 |
| P11A
| Hernanes
|
5 |
1 |
5 |
0 |
11 |
| P11B
| Pablo Osvaldo |
4 |
1 |
6 |
0 |
11 |
| P15A
| Gary Medel
|
9 |
5 |
1 |
0 |
15 |
| P15B
| Palacio
|
6 |
4 |
3 |
2 |
15 |
| P15C
| Ranocchia
|
14 |
1 |
0 |
0 |
15 |
| P16A
| Dodo
|
7 |
7 |
2 |
0 |
16 |
| P16B
| Handanovic
|
16 |
0 |
0 |
0 |
16 |
| P16C
| Mauro Icardi |
8 |
5 |
2 |
1 |
16 |
| P16D
| Juan Jesus
|
15 |
1 |
0 |
0 |
16 |
| P16E
| Mateo Kovacic |
8 |
6 |
1 |
1 |
16 |
+---------------+----------------+---------+------------+-----------+--------------+------------------+
25 rows in set (0.00 sec)
mysql> select * from penampilan
-> order by total_penampilan desc;
+---------------+----------------+---------+------------+-----------+--------------+------------------+
| id_penampilan | nm_pemain
| starter | digantikan | pengganti | tidak_berm
ain | total_penampilan |
+---------------+----------------+---------+------------+-----------+--------------+------------------+
| P16E
| Mateo Kovacic |
8 |
6 |
1 |
1 |
16 |
| P16D
| Juan Jesus
|
15 |
1 |
0 |
0 |
16 |
| P16C
| Mauro Icardi |
8 |
5 |
2 |
1 |
16 |
| P16B
| Handanovic
|
16 |
0 |
0 |
0 |
16 |
| P16A
| Dodo
|
7 |
7 |
2 |
0 |
16 |
| P15A
| Gary Medel
|
9 |
5 |
1 |
0 |
15 |
| P15B
| Palacio
|
6 |
4 |
3 |
2 |
15 |
| P15C
| Ranocchia
|
14 |
1 |
0 |
0 |
15 |
| P11B
| Pablo Osvaldo |
4 |
1 |
6 |
0 |
11 |
| P11A
| Hernanes
|
5 |
1 |
5 |
0 |
11 |
| P10A
| Fredy Guarin |
5 |
2 |
3 |
0 |
10 |
| P09B
| Vidic
|
8 |
0 |
0 |
1 |
9 |
| P09A
| Nagatomo
|
7 |
1 |
1 |
0 |
9 |
| P08B
| Obi
|
0 |
5 |
3 |
0 |
8 |
| P08A
| Kuzmanovic
|
0 |
5 |
3 |
0 |
8 |
| P07B
| MVila
|
1 |
2 |
4 |
0 |
7 |
| P07A
| D.Ambrossio
|
2 |
2 |
3 |
0 |
7 |
| P04A
| Ibrahima Mbaye |
0 |
0 |
4 |
0 |
4 |
| P03A
| Bonazzoli
|
0 |
0 |
3 |
0 |
3 |
| P03B
| Campagnaro
|
2 |
0 |
1 |
0 |
3 |
| P02B
| Jonathan
|
1 |
1 |
0 |
0 |
2 |
| P02A
| Andreolli
|
2 |
0 |
0 |
0 |
2 |
| P00C
| Donkor
|
0 |
0 |
0 |
0 |
0 |
| P00B
| Tommaso Berni |
0 |
0 |
0 |
0 |
0 |
| P00A
| Carrizo
|
0 |
0 |
0 |
0 |
0 |
+---------------+----------------+---------+------------+-----------+--------------+------------------+
25 rows in set (0.00 sec)
mysql> select * from penampilan
-> order by starter, digantikan, pengganti, tidak_bermain, total_penampilan
desc;
+---------------+----------------+---------+------------+-----------+--------------+------------------+
| id_penampilan | nm_pemain
| starter | digantikan | pengganti | tidak_berm
ain | total_penampilan |
+---------------+----------------+---------+------------+-----------+--------------+------------------+
| P00A
| Carrizo
|
0 |
0 |
0 |
0 |
0 |
| P00B
| Tommaso Berni |
0 |
0 |
0 |
0 |
0 |
| P00C
| Donkor
|
0 |
0 |
0 |
0 |
0 |
| P03A
| Bonazzoli
|
0 |
0 |
3 |
0 |
3 |
| P04A
| Ibrahima Mbaye |
0 |
0 |
4 |
0 |
4 |
| P08B
| Obi
|
0 |
5 |
3 |
0 |
8 |
| P08A
| Kuzmanovic
|
0 |
5 |
3 |
0 |
8 |
| P02B
| Jonathan
|
1 |
1 |
0 |
0 |
2 |
| P07B
| MVila
|
1 |
2 |
4 |
0 |
7 |
| P02A
| Andreolli
|
2 |
0 |
0 |
0 |
2 |
| P03B
| Campagnaro
|
2 |
0 |
1 |
0 |
3 |
| P07A
| D.Ambrossio
|
2 |
2 |
3 |
0 |
7 |
| P11B
| Pablo Osvaldo |
4 |
1 |
6 |
0 |
11 |
| P11A
| Hernanes
|
5 |
1 |
5 |
0 |
11 |
| P10A
| Fredy Guarin |
5 |
2 |
3 |
0 |
10 |
| P15B
| Palacio
|
6 |
4 |
3 |
2 |
15 |
| P09A
| Nagatomo
|
7 |
1 |
1 |
0 |
9 |
| P16A
| Dodo
|
7 |
7 |
2 |
0 |
16 |
| P09B
| Vidic
|
8 |
0 |
0 |
1 |
9 |
| P16C
| Mauro Icardi |
8 |
5 |
2 |
1 |
16 |
| P16E
| Mateo Kovacic |
8 |
6 |
1 |
1 |
16 |
| P15A
| Gary Medel
|
9 |
5 |
1 |
0 |
15 |
| P15C
| Ranocchia
|
14 |
1 |
0 |
0 |
15 |
| P16D
| Juan Jesus
|
15 |
1 |
0 |
0 |
16 |
| P16B
| Handanovic
|
16 |
0 |
0 |
0 |
16 |
+---------------+----------------+---------+------------+-----------+--------------+------------------+
25 rows in set (0.00 sec)
mysql> select * from penampilan
-> order by starter desc, digantikan desc, pengganti desc, tidak_bermain des
c, total_penampilan desc;
+---------------+----------------+---------+------------+-----------+--------------+------------------+
| id_penampilan | nm_pemain
| starter | digantikan | pengganti | tidak_berm
ain | total_penampilan |
+---------------+----------------+---------+------------+-----------+--------------+------------------+
| P16B
| Handanovic
|
16 |
0 |
0 |
0 |
16 |
| P16D
| Juan Jesus
|
15 |
1 |
0 |
0 |
16 |
| P15C
| Ranocchia
|
14 |
1 |
0 |
0 |
15 |
| P15A
| Gary Medel
|
9 |
5 |
1 |
0 |
15 |
| P16E
| Mateo Kovacic |
8 |
6 |
1 |
1 |
16 |
| P16C
| Mauro Icardi |
8 |
5 |
2 |
1 |
16 |
| P09B
| Vidic
|
8 |
0 |
0 |
1 |
9 |
| P16A
| Dodo
|
7 |
7 |
2 |
0 |
16 |
| P09A
| Nagatomo
|
7 |
1 |
1 |
0 |
9 |
| P15B
| Palacio
|
6 |
4 |
3 |
2 |
15 |
| P10A
| Fredy Guarin |
5 |
2 |
3 |
0 |
10 |
| P11A
| Hernanes
|
5 |
1 |
5 |
0 |
11 |
| P11B
| Pablo Osvaldo |
4 |
1 |
6 |
0 |
11 |
| P07A
| D.Ambrossio
|
2 |
2 |
3 |
0 |
7 |
| P03B
| Campagnaro
|
2 |
0 |
1 |
0 |
3 |
| P02A
| Andreolli
|
2 |
0 |
0 |
0 |
2 |
| P07B
| MVila
|
1 |
2 |
4 |
0 |
7 |
| P02B
| Jonathan
|
1 |
1 |
0 |
0 |
2 |
| P08B
| Obi
|
0 |
5 |
3 |
0 |
8 |
| P08A
| Kuzmanovic
|
0 |
5 |
3 |
0 |
8 |
| P04A
| Ibrahima Mbaye |
0 |
0 |
4 |
0 |
4 |
| P03A
| Bonazzoli
|
0 |
0 |
3 |
0 |
3 |
| P00C
| Donkor
|
0 |
0 |
0 |
0 |
0 |
| P00B
| Tommaso Berni |
0 |
0 |
0 |
0 |
0 |
| P00A
| Carrizo
|
0 |
0 |
0 |
0 |
0 |
+---------------+----------------+---------+------------+-----------+--------------+------------------+
25 rows in set (0.00 sec)
mysql> ----------------------------------------------------------------------------------------------------
| mysql
|
| performance_schema |
| test
|
| yugioh
|
+--------------------+
8 rows in set (0.00 sec)
mysql> use inventory;
Database changed
mysql> select * from skuat_reguler;
+-----------+-------------+----------------+------------+--------------------+-----+
| id_pemain | no_punggung | nm_pemain
| kebangsaan | posisi
| u
sia |
+-----------+-------------+----------------+------------+--------------------+-----+
| AH88
|
88 | Hernanes
| Brasil
| Gelandang
|
28 |
| AR23
|
23 | Ranocchia
| Italia
| Bek Tengah
|
25 |
| CJ02
|
2 | Jonathan
| Brasil
| Bek Sayap
|
26 |
| DA33
|
33 | D.Ambrossio
| Italia
| Bek Sayap
|
24 |
| DD22
|
22 | Dodo
| Brasil
| Bek Sayap
|
22 |
| FB97
|
97 | Bonazzoli
| Italia
| Striker
|
17 |
| FG13
|
13 | Fredy Guarin | Kolombia | Gelandang
|
27 |
| GM18
|
18 | Gary Medel
| Chile
| Gelandang
|
26 |
| HC14
|
14 | Campagnaro
| Argentina | Bek
|
34 |
| ID54
|
54 | Donkor
| Ghana
| Bek
|
20 |
| IM25
|
25 | Ibrahima Mbaye | Senegal
| Bek
|
20 |
| JC30
|
30 | Carrizo
| Argentina | Kiper
|
30 |
| JJ05
|
5 | Juan Jesus
| Brasil
| Bek Tengah
|
22 |
| JO20
|
20 | Obi
| Nigeria
| Gelandang
|
23 |
| KM17
|
17 | Kuzmanovic
| Serbia
| Gelandang Bertahan |
27 |
| MA06
|
6 | Andreolli
| Italia
| Bek Tengah
|
26 |
| MI09
|
9 | Mauro Icardi | Argentina | Striker
|
21 |
| MK10
|
10 | Mateo Kovacic | Kroasia
| Gelandang Serang |
20 |
| NG55
|
55 | Nagatomo
| Jepang
| Bek Sayap
|
26 |
| NV15
|
15 | Vidic
| Serbia
| Bek
|
33 |
| PO07
|
7 | Pablo Osvaldo | Italia
| Striker
|
25 |
| RP08
|
8 | Palacio
| Argentina | Striker
|
30 |
| SH01
|
1 | Handanovic
| Slovenia | Kiper
|
30 |
| TB46
|
46 | Tommaso Berni | Italia
| Kiper
|
31 |
| YM90
|
90 | MVila
| Perancis | Gelandang
|
24 |
+-----------+-------------+----------------+------------+--------------------+-----+
25 rows in set (0.00 sec)
mysql> select * from topskorer
-> order by gol desc;
+--------------+-----------+-----+
| id_topskorer | id_pemain | gol |
+--------------+-----------+-----+
| MI01
| MI09
| 8 |
| PO02
| PO07
| 5 |
| MK03
| MK10
| 4 |
| AH04
| AH88
| 2 |
| AR04
| AR23
| 2 |
| FG04
| FG13
| 2 |
| JO05
| JO20
| 1 |
| RP05
| RP08
| 1 |
+--------------+-----------+-----+
8 rows in set (0.00 sec)
mysql> select * from penampilan;
+---------------+----------------+---------+------------+-----------+--------------+------------------+
| id_penampilan | nm_pemain
| starter | digantikan | pengganti | tidak_berm
ain | total_penampilan |
+---------------+----------------+---------+------------+-----------+--------------+------------------+
| P00A
| Carrizo
|
0 |
0 |
0 |
0 |
0 |
| P00B
| Tommaso Berni |
0 |
0 |
0 |
0 |
0 |
| P00C
| Donkor
|
0 |
0 |
0 |
0 |
0 |
| P02A
| Andreolli
|
2 |
0 |
0 |
0 |
2 |
| P02B
| Jonathan
|
1 |
1 |
0 |
0 |
2 |
| P03A
| Bonazzoli
|
0 |
0 |
3 |
0 |
3 |
| P03B
| Campagnaro
|
2 |
0 |
1 |
0 |
3 |
| P04A
| Ibrahima Mbaye |
0 |
0 |
4 |
0 |
4 |
| P07A
| D.Ambrossio
|
2 |
2 |
3 |
0 |
7 |
| P07B
| MVila
|
1 |
2 |
4 |
0 |
7 |
| P08A
| Kuzmanovic
|
0 |
5 |
3 |
0 |
8 |
| P08B
| Obi
|
0 |
5 |
3 |
0 |
8 |
| P09A
| Nagatomo
|
7 |
1 |
1 |
0 |
9 |
| P09B
| Vidic
|
8 |
0 |
0 |
1 |
9 |
| P10A
| Fredy Guarin |
5 |
2 |
3 |
0 |
10 |
| P11A
| Hernanes
|
5 |
1 |
5 |
0 |
11 |
| P11B
| Pablo Osvaldo |
4 |
1 |
6 |
0 |
11 |
| P15A
| Gary Medel
|
9 |
5 |
1 |
0 |
15 |
| P15B
| Palacio
|
6 |
4 |
3 |
2 |
15 |
| P15C
| Ranocchia
|
14 |
1 |
0 |
0 |
15 |
| P16A
| Dodo
|
7 |
7 |
2 |
0 |
16 |
| P16B
| Handanovic
|
16 |
0 |
0 |
0 |
16 |
| P16C
| Mauro Icardi |
8 |
5 |
2 |
1 |
16 |
| P16D
| Juan Jesus
|
15 |
1 |
0 |
0 |
16 |
| P16E
| Mateo Kovacic |
8 |
6 |
1 |
1 |
16 |
+---------------+----------------+---------+------------+-----------+--------------+------------------+
25 rows in set (0.00 sec)
mysql> select * from penampilan
-> order by starter desc;
+---------------+----------------+---------+------------+-----------+--------------+------------------+
| id_penampilan | nm_pemain
| starter | digantikan | pengganti | tidak_berm
ain | total_penampilan |
+---------------+----------------+---------+------------+-----------+--------------+------------------+
| P16B
| Handanovic
|
16 |
0 |
0 |
0 |
16 |
| P16D
| Juan Jesus
|
15 |
1 |
0 |
0 |
16 |
| P15C
| Ranocchia
|
14 |
1 |
0 |
0 |
15 |
| P15A
| Gary Medel
|
9 |
5 |
1 |
0 |
15 |
| P16E
| Mateo Kovacic |
8 |
6 |
1 |
1 |
16 |
| P16C
| Mauro Icardi |
8 |
5 |
2 |
1 |
16 |
| P09B
| Vidic
|
8 |
0 |
0 |
1 |
9 |
| P16A
| Dodo
|
7 |
7 |
2 |
0 |
16 |
| P09A
| Nagatomo
|
7 |
1 |
1 |
0 |
9 |
| P15B
| Palacio
|
6 |
4 |
3 |
2 |
15 |
| P10A
| Fredy Guarin |
5 |
2 |
3 |
0 |
10 |
| P11A
| Hernanes
|
5 |
1 |
5 |
0 |
11 |
| P11B
| Pablo Osvaldo |
4 |
1 |
6 |
0 |
11 |
| P03B
| Campagnaro
|
2 |
0 |
1 |
0 |
3 |
| P02A
| Andreolli
|
2 |
0 |
0 |
0 |
2 |
| P07A
| D.Ambrossio
|
2 |
2 |
3 |
0 |
7 |
| P02B
| Jonathan
|
1 |
1 |
0 |
0 |
2 |
| P07B
| MVila
|
1 |
2 |
4 |
0 |
7 |
| P04A
| Ibrahima Mbaye |
0 |
0 |
4 |
0 |
4 |
| P03A
| Bonazzoli
|
0 |
0 |
3 |
0 |
3 |
| P08B
| Obi
|
0 |
5 |
3 |
0 |
8 |
| P08A
| Kuzmanovic
|
0 |
5 |
3 |
0 |
8 |
| P00C
| Donkor
|
0 |
0 |
0 |
0 |
0 |
| P00B
| Tommaso Berni |
0 |
0 |
0 |
0 |
0 |
| P00A
| Carrizo
|
0 |
0 |
0 |
0 |
0 |
+---------------+----------------+---------+------------+-----------+--------------+------------------+
25 rows in set (0.00 sec)
mysql> select * from menit_bermain;
ERROR 1146 (42S02): Table 'inventory.menit_bermain' doesn't exist
mysql> create table menit_bermain
-> (id_menit_bermain char(4) primary key,
-> (id_penampilan char(4) not null,
-> (total_menit int(6) unsigned not null,
-> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near '(id_p
enampilan char(4) not null,
(total_menit int(6) unsigned not null,' at line 3
mysql> create table menit_bermain
-> (id_menit_bermain char(4) primary key,
-> id_penampilan char(4) not null,
-> total_menit int(6) unsigned not null,
-> foreign key
-> (id_penampilan) references penampilan(id_penampilan));
Query OK, 0 rows affected (0.11 sec)
mysql> describe menit_bermain;
+------------------+-----------------+------+-----+---------+-------+
| Field
| Type
| Null | Key | Default | Extra |
+------------------+-----------------+------+-----+---------+-------+
| id_menit_bermain | char(4)
| NO | PRI | NULL
|
|
| id_penampilan
| char(4)
| NO | MUL | NULL
|
|
| total_menit
| int(6) unsigned | NO |
| NULL
|
|
+------------------+-----------------+------+-----+---------+-------+
3 rows in set (0.02 sec)
mysql> insert into menit_bermain
->
values ("B515","P16B",1515),
->
("B486","P16D",1486),
->
("B385","P15C",1385),
->
("B361","P16E",1361),
->
("B251","P15A",1251),
->
("B238","P16C",1238),
->
("B211","P16A",1211),
->
("B134","P15B",1134),
->
("B052","P09B",852),
->
("B005","P10A",705),
->
("B081","P11A",681),
->
("B068","P08A",668),
->
("B066","P09A",666),
->
("B605","P11B",605),
->
("B405","P07A",405),
->
("B079","P08B",379),
->
("B062","P07B",262),
->
("B092","P03B",192),
->
("B089","P02A",189),
->
("B080","P02B",180),
->
("B007","P04A",107),
->
("B003","P03A",43),
->
("BT00","P00B",0),
->
("BC00","P00A",0),
->
("BD00","P00C",0);
Query OK, 25 rows affected (0.05 sec)
Records: 25 Duplicates: 0 Warnings: 0
mysql> select * from menit_bermain;
+------------------+---------------+-------------+
| id_menit_bermain | id_penampilan | total_menit |
+------------------+---------------+-------------+
| B003
| P03A
|
43 |
| B005
| P10A
|
705 |
| B007
| P04A
|
107 |
| B052
| P09B
|
852 |
| B062
| P07B
|
262 |
| B066
| P09A
|
666 |
| B068
| P08A
|
668 |
| B079
| P08B
|
379 |
| B080
| P02B
|
180 |
| B081
| P11A
|
681 |
| B089
| P02A
|
189 |
| B092
| P03B
|
192 |
| B134
| P15B
|
1134 |
| B211
| P16A
|
1211 |
| B238
| P16C
|
1238 |
| B251
| P15A
|
1251 |
| B361
| P16E
|
1361 |
| B385
| P15C
|
1385 |
| B405
| P07A
|
405 |
| B486
| P16D
|
1486 |
| B515
| P16B
|
1515 |
| B605
| P11B
|
605 |
| BC00
| P00A
|
0 |
| BD00
| P00C
|
0 |
| BT00
| P00B
|
0 |
+------------------+---------------+-------------+
25 rows in set (0.00 sec)
mysql> select * from menit_bermain
| JO20
|
20 | Obi
| Nigeria
| Gelandang
|
23 |
| KM17
|
17 | Kuzmanovic
| Serbia
| Gelandang Bertahan |
27 |
| MA06
|
6 | Andreolli
| Italia
| Bek Tengah
|
26 |
| MI09
|
9 | Mauro Icardi | Argentina | Striker
|
21 |
| MK10
|
10 | Mateo Kovacic | Kroasia
| Gelandang Serang |
20 |
| NG55
|
55 | Nagatomo
| Jepang
| Bek Sayap
|
26 |
| NV15
|
15 | Vidic
| Serbia
| Bek
|
33 |
| PO07
|
7 | Pablo Osvaldo | Italia
| Striker
|
25 |
| RP08
|
8 | Palacio
| Argentina | Striker
|
30 |
| SH01
|
1 | Handanovic
| Slovenia | Kiper
|
30 |
| TB46
|
46 | Tommaso Berni | Italia
| Kiper
|
31 |
| YM90
|
90 | MVila
| Perancis | Gelandang
|
24 |
+-----------+-------------+----------------+------------+--------------------+-----+
25 rows in set (0.00 sec)
mysql> select * from topskorer
-> order by gol desc;
+--------------+-----------+-----+
| id_topskorer | id_pemain | gol |
+--------------+-----------+-----+
| MI01
| MI09
| 8 |
| PO02
| PO07
| 5 |
| MK03
| MK10
| 4 |
| AH04
| AH88
| 2 |
| AR04
| AR23
| 2 |
| FG04
| FG13
| 2 |
| JO05
| JO20
| 1 |
| RP05
| RP08
| 1 |
+--------------+-----------+-----+
8 rows in set (0.00 sec)
mysql> select * from penampilan
-> order by starter desc;
+---------------+----------------+---------+------------+-----------+--------------+------------------+
| id_penampilan | nm_pemain
| starter | digantikan | pengganti | tidak_berm
ain | total_penampilan |
+---------------+----------------+---------+------------+-----------+--------------+------------------+
| P16B
| Handanovic
|
16 |
0 |
0 |
0 |
16 |
| P16D
| Juan Jesus
|
15 |
1 |
0 |
0 |
16 |
| P15C
| Ranocchia
|
14 |
1 |
0 |
0 |
15 |
| P15A
| Gary Medel
|
9 |
5 |
1 |
0 |
15 |
| P16E
| Mateo Kovacic |
8 |
6 |
1 |
1 |
16 |
| P16C
| Mauro Icardi |
8 |
5 |
2 |
1 |
16 |
| P09B
| Vidic
|
8 |
0 |
0 |
1 |
9 |
| P16A
| Dodo
|
7 |
7 |
2 |
0 |
16 |
| P09A
| Nagatomo
|
7 |
1 |
1 |
0 |
9 |
| P15B
| Palacio
|
6 |
4 |
3 |
2 |
15 |
| P10A
| Fredy Guarin |
5 |
2 |
3 |
0 |
10 |
| P11A
| Hernanes
|
5 |
1 |
5 |
0 |
11 |
| P11B
| Pablo Osvaldo |
4 |
1 |
6 |
0 |
11 |
| P03B
| Campagnaro
|
2 |
0 |
1 |
0 |
3 |
| P02A
| Andreolli
|
2 |
0 |
0 |
0 |
2 |
| P07A
| D.Ambrossio
|
2 |
2 |
3 |
0 |
7 |
| P02B
| Jonathan
|
1 |
1 |
0 |
0 |
2 |
| P07B
| MVila
|
1 |
2 |
4 |
0 |
7 |
| P04A
| Ibrahima Mbaye |
0 |
0 |
4 |
0 |
4 |
| P03A
| Bonazzoli
|
0 |
0 |
3 |
0 |
3 |
| P08B
| Obi
|
0 |
5 |
3 |
0 |
8 |
| P08A
| Kuzmanovic
|
0 |
5 |
3 |
0 |
8 |
| P00C
| Donkor
|
0 |
0 |
0 |
0 |
0 |
| P00B
| Tommaso Berni |
0 |
0 |
0 |
0 |
0 |
| P00A
| Carrizo
|
0 |
0 |
0 |
0 |
0 |
+---------------+----------------+---------+------------+-----------+--------------+------------------+
25 rows in set (0.00 sec)
mysql> select * from menit_bermain
-> order by total_menit;
+------------------+---------------+-------------+
| id_menit_bermain | id_penampilan | total_menit |
+------------------+---------------+-------------+
| BT00
| P00B
|
0 |
| BD00
| P00C
|
0 |
| BC00
| P00A
|
0 |
| B003
| P03A
|
43 |
| B007
| P04A
|
107 |
| B080
| P02B
|
180 |
| B089
| P02A
|
189 |
| B092
| P03B
|
192 |
| B062
| P07B
|
262 |
| B079
| P08B
|
379 |
| B405
| P07A
|
405 |
| B605
| P11B
|
605 |
| B066
| P09A
|
666 |
| B068
| P08A
|
668 |
| B081
| P11A
|
681 |
| B005
| P10A
|
705 |
| B052
| P09B
|
852 |
| B134
| P15B
|
1134 |
| B211
| P16A
|
1211 |
| B238
| P16C
|
1238 |
| B251
| P15A
|
1251 |
| B361
| P16E
|
1361 |
| B385
| P15C
|
1385 |
| B486
| P16D
|
1486 |
| B515
| P16B
|
1515 |
+------------------+---------------+-------------+
25 rows in set (0.00 sec)
mysql> select * from kartu
-> order by kuning desc;
+----------+--------+-------+---------------+
| id_kartu | kuning | merah | nm_pemain
|
+----------+--------+-------+---------------+
| KM18
|
4 |
1 | Gary Medel
|
| KR23
|
3 |
0 | Ranocchia
|
| KD22
|
3 |
0 | Dodo
|
| KG13
|
3 |
0 | Fredy Guarin |
| KJ05
|
3 |
0 | Juan Jesus
|
| KK10
|
2 |
0 | Mateo Kovacic |
| KH88
|
2 |
0 | Hernanes
|
| KN55
|
2 |
1 | Nagatomo
|
| KD33
|
2 |
0 | D.Ambrossio |
| KO20
|
1 |
0 | Obi
|
| KP08
|
1 |
0 | Palacio
|
| KO07
|
1 |
0 | Pablo Osvaldo |
| KB97
|
1 |
0 | Bonazzoli
|
| KH01
|
1 |
0 | Handanovic
|
| KC14
|
1 |
0 | Campagnaro
|
| KV15
|
0 |
1 | Vidic
|
+----------+--------+-------+---------------+
16 rows in set (0.00 sec)
mysql> select skuat_reguler.no_punggung, skuat_reguler.nm_pemain
-> topskorer.gol, penampilan.toskorer
-> from skuat_reguler, topskorer,
-> ;l
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near '.gol,
penampilan.toskorer
from skuat_reguler, topskorer,' at line 2
-> select skuat_reguler.no_punggung, skuat_reguler.nm_pemain
-> topskorer.gol, penampilan.starter
-> from skuat_reguler, topskorer, penampilan
-> where penampilan.starter>=6
->
and skuat_reguler.id_pemain=topskorer.id_pemain
->
and skuat_reguler.nm_pemain=penampilan.nm_pemain;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'l
select skuat_reguler.no_punggung, skuat_reguler.nm_pemain
-> ;
+---------------+------------------+-----+---------+------------------+
| nm_pemain
| posisi
| gol | starter | total_penampilan |
+---------------+------------------+-----+---------+------------------+
| Mauro Icardi | Striker
| 8 |
8 |
16 |
| Mateo Kovacic | Gelandang Serang | 4 |
8 |
16 |
| Ranocchia
| Bek Tengah
| 2 |
14 |
15 |
| Palacio
| Striker
| 1 |
6 |
15 |
+---------------+------------------+-----+---------+------------------+
4 rows in set (0.00 sec)
mysql> select skuat_reguler.nm_pemain, skuat_reguler.kebangsaan
->
,max(topskorer.gol), max(penampilan.pengganti)
-> from skuat_reguler, topskorer, penampilan
-> where skuat_reguler.kebangsaan like "I%"
->
and skuat_reguler.id_pemain=topskorer.id_pemain
->
and skuat_reguler.nm_pemain=penampilan.nm_pemain
-> ;
+---------------+------------+--------------------+---------------------------+
| nm_pemain
| kebangsaan | max(topskorer.gol) | max(penampilan.pengganti) |
+---------------+------------+--------------------+---------------------------+
| Pablo Osvaldo | Italia
|
5 |
6 |
+---------------+------------+--------------------+---------------------------+
1 row in set (0.03 sec)
mysql> select skuat_reguler.nm_pemain, skuat_reguler.kebangsaan
->
,max(topskorer.gol) as gol
->
,max(penampilan.pengganti) as pemain_pengganti
-> from skuat_reguler, topskorer, penampilan
-> where skuat_reguler.kebangsaan like "I%"
->
and skuat_reguler.id_pemain=topskorer.id_pemain
->
and skuat_reguler.nm_pemain=penampilan.nm_pemain
-> ;
+---------------+------------+------+------------------+
| nm_pemain
| kebangsaan | gol | pemain_pengganti |
+---------------+------------+------+------------------+
| Pablo Osvaldo | Italia
|
5 |
6 |
+---------------+------------+------+------------------+
1 row in set (0.04 sec)
mysql> select skuat_reguler.nm_pemain, skuat_reguler.posisi,
->
min(skuat_reguler.usia) as usia,
->
topskorer.gol, penampilan.starter
-> from skuat_reguler, topskorer, penampilan
-> where penampilan.starter=0
->
and skuat_reguler.id_pemain=topskorer.id_pemain
->
and skuat_reguler.nm_pemain=penampilan.nm_pemain
-> ;
+-----------+-----------+------+-----+---------+
| nm_pemain | posisi
| usia | gol | starter |
+-----------+-----------+------+-----+---------+
| Obi
| Gelandang | 23 | 1 |
0 |
+-----------+-----------+------+-----+---------+
1 row in set (0.00 sec)
mysql>------------------------------------------------------------------------------------------------->
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near '.gol,
penampilan.starter
from skuat_reguler, topskorer, penampilan
where penamp' at line 2
mysql> select skuat_reguler.no_punggung, skuat_reguler.nm_pemain
-> topskorer.gol
-> from skuat_reguler, topskorer
-> where topskorer.gol>=5
->
and skuat_reguler.id_pemain=topskorer.id_pemain;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near '.gol
from skuat_reguler, topskorer
where topskorer.gol>=5
and skuat_regul' at line 2
mysql>
mysql> select skuat_reguler.no_punggung, skuat_reguler.nm_pemain
-> skuat_reguler.posisi, topskorer.gol
-> from topskorer, skuat_reguler
-> where topskorer.gol>5
-> and skuat_reguler.id_pemain=topskorer.id_pemain;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near '.posi
si, topskorer.gol
from topskorer, skuat_reguler
where topskorer.gol>5
and s' at line 2
mysql> select skuat_reguler.no_punggung, skuat_reguler.nm_pemain
-> topskorer.gol from topskorer, skuat_reguler
-> where topskorer.gol>5
-> and skuat_reguler.id_pemain=topskorer.id_pemain;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near '.gol
from topskorer, skuat_reguler
where topskorer.gol>5
and skuat_reguler.id_pe' at line 2
mysql> select skuat_reguler.nm_pemain, topskorer.gol
-> penampilan.starter
-> from topskorer, skuat_reguler, penampilan
-> where penampilan.starter>=6
-> and skuat_reguler.id_pemain=topskorer.id_pemain
-> and skuat_reguler.nm_pemain=penampilan.nm_pemain;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near '.star
ter
from topskorer, skuat_reguler, penampilan
where penampilan.starter>=6
a' at line 2
mysql> select skuat_reguler.nm_pemain, topskorer.gol,
-> penampilan.starter
-> from topskorer, skuat_reguler, penampilan
-> where penampilan.starter>=6
-> and skuat_reguler.id_pemain=topskorer.id_pemain
-> and skuat_reguler.nm_pemain=penampilan.nm_pemain;
+---------------+-----+---------+
| nm_pemain
| gol | starter |
+---------------+-----+---------+
| Palacio
| 1 |
6 |
| Ranocchia
| 2 |
14 |
| Mauro Icardi | 8 |
8 |
| Mateo Kovacic | 4 |
8 |
+---------------+-----+---------+
4 rows in set (0.00 sec)
mysql> select skuat_reguler.nm_pemain, skuat_reguler.posisi, topskorer.gol
-> ,penampilan.starter, penampilan.total_penampilan
-> from skuat_reguler, topskorer, penampilan
-> where penampilan.starter>=6
->
and skuat_reguler.id_pemain=topskorer.id_pemain
->
and skuat_reguler.nm_pemain=penampilan.nm_pemain
-> ;
+---------------+------------------+-----+---------+------------------+
| nm_pemain
| posisi
| gol | starter | total_penampilan |
+---------------+------------------+-----+---------+------------------+
| Palacio
| Striker
| 1 |
6 |
15 |
| Ranocchia
| Bek Tengah
| 2 |
14 |
15 |
| Mauro Icardi | Striker
| 8 |
8 |
16 |
| Mateo Kovacic | Gelandang Serang | 4 |
8 |
16 |
+---------------+------------------+-----+---------+------------------+
4 rows in set (0.00 sec)
mysql> select skuat_reguler.nm_pemain, skuat_reguler.posisi,
->
topskorer.gol, penampilan.starter,
->
penampilan.total_penampilan
-> where penampilan.starter>=6
->
and skuat_reguler.id_pemain=topskorer.id_pemain
->
and skuat_reguler.nm_pemain=penampilan.nm_pemain
-> order by gol desc
-> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'where
penampilan.starter>=6
and skuat_reguler.id_pemain=topskorer.id_pemai' at line 4
mysql> select skuat_reguler.nm_pemain, skuat_reguler.posisi,
->
topskorer.gol, penampilan.starter,
->
penampilan.total_penampilan
-> from skuat_reguler, topskorer, penampilan
-> where penampilan.starter>=6
->
and skuat_reguler.id_pemain=topskorer.id_pemain
->
and skuat_reguler.nm_pemain=penampilan.nm_pemain
-> order by gol desc
-> ;
+---------------+------------------+-----+---------+------------------+
| nm_pemain
| posisi
| gol | starter | total_penampilan |
+---------------+------------------+-----+---------+------------------+
| Mauro Icardi | Striker
| 8 |
8 |
16 |
| Mateo Kovacic | Gelandang Serang | 4 |
8 |
16 |
| Ranocchia
| Bek Tengah
| 2 |
14 |
15 |
| Palacio
| Striker
| 1 |
6 |
15 |
+---------------+------------------+-----+---------+------------------+
4 rows in set (0.00 sec)
mysql> select skuat_reguler.nm_pemain, skuat_reguler.kebangsaan
->
,max(topskorer.gol), max(penampilan.pengganti)
-> from skuat_reguler, topskorer, penampilan
-> where skuat_reguler.kebangsaan like "I%"
->
and skuat_reguler.id_pemain=topskorer.id_pemain
->
and skuat_reguler.nm_pemain=penampilan.nm_pemain
-> ;
+---------------+------------+--------------------+---------------------------+
| nm_pemain
| kebangsaan | max(topskorer.gol) | max(penampilan.pengganti) |
+---------------+------------+--------------------+---------------------------+
| Pablo Osvaldo | Italia
|
5 |
6 |
+---------------+------------+--------------------+---------------------------+
1 row in set (0.03 sec)
| DD22
|
22 | Dodo
| Brasil
| Bek Sayap
|
22 |
| FB97
|
97 | Bonazzoli
| Italia
| Striker
|
17 |
| FG13
|
13 | Fredy Guarin | Kolombia | Gelandang
|
27 |
| GM18
|
18 | Gary Medel
| Chile
| Gelandang
|
26 |
| HC14
|
14 | Campagnaro
| Argentina | Bek
|
34 |
| ID54
|
54 | Donkor
| Ghana
| Bek
|
20 |
| IM25
|
25 | Ibrahima Mbaye | Senegal
| Bek
|
20 |
| JC30
|
30 | Carrizo
| Argentina | Kiper
|
30 |
| JJ05
|
5 | Juan Jesus
| Brasil
| Bek Tengah
|
22 |
| JO20
|
20 | Obi
| Nigeria
| Gelandang
|
23 |
| KM17
|
17 | Kuzmanovic
| Serbia
| Gelandang Bertahan |
27 |
| MA06
|
6 | Andreolli
| Italia
| Bek Tengah
|
26 |
| MI09
|
9 | Mauro Icardi | Argentina | Striker
|
21 |
| MK10
|
10 | Mateo Kovacic | Kroasia
| Gelandang Serang |
20 |
| NG55
|
55 | Nagatomo
| Jepang
| Bek Sayap
|
26 |
| NV15
|
15 | Vidic
| Serbia
| Bek
|
33 |
| PO07
|
7 | Pablo Osvaldo | Italia
| Striker
|
25 |
| RP08
|
8 | Palacio
| Argentina | Striker
|
30 |
| SH01
|
1 | Handanovic
| Slovenia | Kiper
|
30 |
| TB46
|
46 | Tommaso Berni | Italia
| Kiper
|
31 |
| YM90
|
90 | MVila
| Perancis | Gelandang
|
24 |
+-----------+-------------+----------------+------------+--------------------+-----+
25 rows in set (0.00 sec)
mysql>---------------------------------------------------------------------------------------------
| Ranocchia,Fredy Guarin
|
16 |
+-------------------------------------------+------------------+
1 row in set (0.00 sec)