Вы находитесь на странице: 1из 49

mysql> create table Skuat_Reguler

-> (id_pemain char(4) primary key,


-> no_punggung int(2) unsigned not null,
-> nm_pemain varchar(30) not null,
-> kebangsaan varchar(30) not null,
-> posisi varchar(30) not null);
Query OK, 0 rows affected (0.09 sec)
mysql> Describe Skuat_Reguler;
+-------------+-----------------+------+-----+---------+-------+
| Field
| Type
| Null | Key | Default | Extra |
+-------------+-----------------+------+-----+---------+-------+
| id_pemain | char(4)
| NO | PRI | NULL
|
|
| no_punggung | int(2) unsigned | NO |
| NULL
|
|
| nm_pemain | varchar(30)
| NO |
| NULL
|
|
| kebangsaan | varchar(30)
| NO |
| NULL
|
|
| posisi
| varchar(30)
| NO |
| NULL
|
|
+-------------+-----------------+------+-----+---------+-------+
5 rows in set (0.02 sec)
mysql> create table topskorer
-> (id_topskorer char(4) primary key,
-> id_pemain char(4) not null,
-> gol int(3) unsigned not null,
-> foreign key(id_pemain) references Skuat_Reguler(id_pemain));
Query OK, 0 rows affected (0.09 sec)
mysql> describe topskorer;
+--------------+-----------------+------+-----+---------+-------+
| Field
| Type
| Null | Key | Default | Extra |
+--------------+-----------------+------+-----+---------+-------+
| id_topskorer | char(4)
| NO | PRI | NULL
|
|
| id_pemain
| char(4)
| NO | MUL | NULL
|
|
| gol
| int(3) unsigned | NO |
| NULL
|
|
+--------------+-----------------+------+-----+---------+-------+
3 rows in set (0.01 sec)
mysql> create table penampilan
-> (id_penampilan char(4) primary key,
-> starter int(2) unsigned not null,
-> digantikan int(2) unsigned not null,
-> total_penampilan int(3) unsigned not null);
Query OK, 0 rows affected (0.11 sec)
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
|
|
+------------------+-----------------+------+-----+---------+-------+
4 rows in set (0.01 sec)
mysql>
->
->
->

create table menit_bermain


(id_menit_bermain char(4) primary key,
id_penampilan char(4) not null,
total_menit int(5) unsigned not null,

-> babak_pertama int(5) unsigned not null,


-> babak_kedua int(5) unsigned not null);
Query OK, 0 rows affected (0.13 sec)
mysql> describe menit_bermain;
+------------------+-----------------+------+-----+---------+-------+
| Field
| Type
| Null | Key | Default | Extra |
+------------------+-----------------+------+-----+---------+-------+
| id_menit_bermain | char(4)
| NO | PRI | NULL
|
|
| id_penampilan
| char(4)
| NO |
| 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> create table pemain_cadangan
-> (id_cadangan char(4) primary key,
-> dicadangkan int(5) unsigned not null,
-> pemain_pengganti int(5) unsigned not null,
-> total_penampilan int(3) unsigned not null);
Query OK, 0 rows affected (0.09 sec)
mysql> describe pemain_cadangan;
+------------------+-----------------+------+-----+---------+-------+
| Field
| Type
| Null | Key | Default | Extra |
+------------------+-----------------+------+-----+---------+-------+
| id_cadangan
| char(4)
| NO | PRI | NULL
|
|
| dicadangkan
| int(5) unsigned | NO |
| NULL
|
|
| pemain_pengganti | int(5) unsigned | NO |
| NULL
|
|
| total_penampilan | int(3) unsigned | NO |
| NULL
|
|
+------------------+-----------------+------+-----+---------+-------+
4 rows in set (0.01 sec)
mysql> create table kartu
-> (id_kartu char(4) primary key,
-> kuning int(2) unsigned not null,
-> merah int(2) unsigned not null,
-> total_kartu int(2) unsigned not null);
Query OK, 0 rows affected (0.07 sec)
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
|
|
+-------------+-----------------+------+-----+---------+-------+
4 rows in set (0.02 sec)
mysql> drop table menit_bermain;
Query OK, 0 rows affected (0.10 sec)
mysql>
->
->
->
->

create table menit_bermain


(id_menit_bermain char(4) primary key,
id_penampilan char(4) not null,
total_menit int(5) unsigned not null,
babak_pertama int(5) unsigned not null,

-> babak_kedua int(5) unsigned not null,


-> foreign key(id_penampilan) references penampilan(id_penampilan));
Query OK, 0 rows affected (0.09 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(5) unsigned | NO |
| NULL
|
|
| babak_pertama
| int(5) unsigned | NO |
| NULL
|
|
| babak_kedua
| int(5) unsigned | NO |
| NULL
|
|
+------------------+-----------------+------+-----+---------+-------+
5 rows in set (0.02 sec)
Enter password: ****
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.5.28 MySQL Community Server (GPL)
Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database
|
+--------------------+
| information_schema |
| akademik
|
| bola
|
| inventory
|
| mysql
|
| performance_schema |
| test
|
| yugioh
|
+--------------------+
8 rows in set (0.00 sec)
mysql> use inventory;
Database changed
mysql> create table Skuat_Reguler
-> id_pemain char(4) primary key,
-> no_punggung int(2) unsigned not null,
-> nm_pemain varchar(30) not null,
-> show databases;
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
main char(4) primary key,
no_punggung int(2) unsigned not null,
nm_pemain v' at line 2
mysql> create table Skuat_Reguler
-> (id_pemain char(4) primary key,
-> no_punggung int(2) unsigned not null,
-> nm_pemain varchar(30) not null,

-> kebangsaan varchar(30) not null,


-> posisi varchar(30) not null);
Query OK, 0 rows affected (0.09 sec)
mysql> describe Skuat_Regular;
ERROR 1146 (42S02): Table 'inventory.skuat_regular' doesn't exist
mysql> Describe Skuat_Reguler;
+-------------+-----------------+------+-----+---------+-------+
| Field
| Type
| Null | Key | Default | Extra |
+-------------+-----------------+------+-----+---------+-------+
| id_pemain | char(4)
| NO | PRI | NULL
|
|
| no_punggung | int(2) unsigned | NO |
| NULL
|
|
| nm_pemain | varchar(30)
| NO |
| NULL
|
|
| kebangsaan | varchar(30)
| NO |
| NULL
|
|
| posisi
| varchar(30)
| NO |
| NULL
|
|
+-------------+-----------------+------+-----+---------+-------+
5 rows in set (0.02 sec)
mysql> create table topskorer
-> (id_topskorer char(4) primary key,
-> id_pemain char(4) not null,
-> gol int(3) unsigned not null,
-> foreign key(id_pemain) references Skuat_Reguler(id_pemain));
Query OK, 0 rows affected (0.09 sec)
mysql> describe topskorer;
+--------------+-----------------+------+-----+---------+-------+
| Field
| Type
| Null | Key | Default | Extra |
+--------------+-----------------+------+-----+---------+-------+
| id_topskorer | char(4)
| NO | PRI | NULL
|
|
| id_pemain
| char(4)
| NO | MUL | NULL
|
|
| gol
| int(3) unsigned | NO |
| NULL
|
|
+--------------+-----------------+------+-----+---------+-------+
3 rows in set (0.01 sec)
mysql> create table penampilan
-> (id_penampilan char(4) primary key,
-> starter int(2) unsigned not null,
-> digantikan int(2) unsigned not null,
-> total penampilan int(3) 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 'penam
pilan int(3) unsigned not null)' at line 5
mysql> create table penampilan
-> (id_penampilan char(4) primary key,
-> starter int(2) unsigned not null,
-> digantikan int(2) unsigned not null,
-> total_penampilan int(3) unsigned not null);
Query OK, 0 rows affected (0.11 sec)
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
|
|
+------------------+-----------------+------+-----+---------+-------+
4 rows in set (0.01 sec)

mysql> create table menit_bermain


-> (id_menit_bermain char(4) primary key,
-> id_penampilan char(4) not null,
-> total_menit int(5) unsigned not null,
-> babak_pertama int(5) unsigned not null,
-> babak_kedua int(5) unsigned not null);
Query OK, 0 rows affected (0.13 sec)
mysql> describe menit_bermain;
+------------------+-----------------+------+-----+---------+-------+
| Field
| Type
| Null | Key | Default | Extra |
+------------------+-----------------+------+-----+---------+-------+
| id_menit_bermain | char(4)
| NO | PRI | NULL
|
|
| id_penampilan
| char(4)
| NO |
| 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> create table pemain_cadangan
-> (id_cadangan char(4) primary key,
-> dicadangkan int(5) unsigned not null,
-> pemain_pengganti int(5) unsigned not null,
-> total_penampilan int(3) unsigned not null);
Query OK, 0 rows affected (0.09 sec)
mysql> describe pemain_cadangan;
+------------------+-----------------+------+-----+---------+-------+
| Field
| Type
| Null | Key | Default | Extra |
+------------------+-----------------+------+-----+---------+-------+
| id_cadangan
| char(4)
| NO | PRI | NULL
|
|
| dicadangkan
| int(5) unsigned | NO |
| NULL
|
|
| pemain_pengganti | int(5) unsigned | NO |
| NULL
|
|
| total_penampilan | int(3) unsigned | NO |
| NULL
|
|
+------------------+-----------------+------+-----+---------+-------+
4 rows in set (0.01 sec)
mysql> create table kartu
-> (id_kartu char(4) primary key,
-> kuning int(2) unsigned not null,
-> merah int(2) unsigned not null,
-> total_kartu int(2) unsigned not null);
Query OK, 0 rows affected (0.07 sec)
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
|
|
+-------------+-----------------+------+-----+---------+-------+
4 rows in set (0.02 sec)
mysql> drop table menit_bermain;
Query OK, 0 rows affected (0.10 sec)

mysql> create table menit_bermain


-> (id_menit_bermain char(4) primary key,
-> id_penampilan char(4) not null,
-> total_menit int(5) unsigned not null,
-> babak_pertama int(5) unsigned not null,
-> babak_kedua int(5) unsigned not null,
-> foreign key(id_penampilan) references penampilan(id_penampilan));
Query OK, 0 rows affected (0.09 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(5) unsigned | NO |
| NULL
|
|
| babak_pertama
| int(5) unsigned | NO |
| NULL
|
|
| babak_kedua
| int(5) unsigned | NO |
| NULL
|
|
+------------------+-----------------+------+-----+---------+-------+
5 rows in set (0.02 sec)
mysql> insert into Skuat_Reguler
-> values ("SH01",1,"Handanovic","Slovenia","Kiper",;
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 Skuat_Reguler add usia int(2) unsigned not null;
Query OK, 0 rows affected (0.25 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql> describe Skuat_Reguler;
+-------------+-----------------+------+-----+---------+-------+
| Field
| Type
| Null | Key | Default | Extra |
+-------------+-----------------+------+-----+---------+-------+
| id_pemain | char(4)
| NO | PRI | NULL
|
|
| no_punggung | int(2) unsigned | NO |
| NULL
|
|
| nm_pemain | varchar(30)
| NO |
| NULL
|
|
| kebangsaan | varchar(30)
| NO |
| NULL
|
|
| posisi
| varchar(30)
| NO |
| NULL
|
|
| usia
| int(2) unsigned | NO |
| NULL
|
|
+-------------+-----------------+------+-----+---------+-------+
6 rows in set (0.02 sec)
mysql> insert into Skuat_Reguler
-> values ("SH01",1,"Handanovic","Slovenia","Kiper",30),
-> ("AR23",23,"Ranocchia","Italia","Bek Tengah",25),
-> ("JJ05",5,"Juan Jesus","Brasil","Bek Tengah",22),
-> ("NG55",55,"Nagatomo","Jepang","Bek Sayap",26),
-> ("DA33",33,"D.Ambrossio","Italia","Bek Sayap",24),
-> ("KM17",17,"Kuzmanovic","Serbia","Gelandang Bertahan",27),
-> ("FG13",13,"Fredy Guarin","Kolombia","Gelandang",27),
-> ("GM18",18,"Gary Medel","Chile","Gelandang",26),
-> ("MK10",10,"Mateo Kovacic","Kroasia","Gelandang Serang",20),
-> ("MI09",9,"Mauro Icardi","Argentina","Striker",21),
-> ("PO07",7,"Pablo Osvaldo","Italia","Striker",25);
Query OK, 11 rows affected (0.04 sec)
Records: 11 Duplicates: 0 Warnings: 0
mysql> select * from Skuat_Reguler;
+-----------+-------------+---------------+------------+--------------------+---

---+
| 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),

-> ("KM17",17,"Kuzmanovic","Serbia","Gelandang Bertahan",27),


-> ("FG13",13,"Fredy Guarin","Kolombia","Gelandang",27),
-> ("GM18",18,"Gary Medel","Chile","Gelandang",26),
-> ("MK10",10,"Mateo Kovacic","Kroasia","Gelandang Serang",20),
-> ("MI09",9,"Mauro Icardi","Argentina","Striker",21),
-> ("PO07",7,"Pablo Osvaldo","Italia","Striker",25);
Query OK, 11 rows affected (0.04 sec)
Records: 11 Duplicates: 0 Warnings: 0
mysql> select * from Skuat_Reguler;
+-----------+-------------+---------------+------------+--------------------+-----+
| 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> 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

------------------------------------------------------------------------------------------

mysql> drop field main_penuh from 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 'field
main_penuh from penampilan' at line 1
mysql> drop main_penuh from 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 'main_
penuh from penampilan' at line 1
mysql> alter table penampilan drop main_penuh;
Query OK, 21 rows affected (0.28 sec)
Records: 21 Duplicates: 0 Warnings: 0
mysql> select * from penampilan;
+---------------+---------+------------+------------------+---------------+---------------+------------------+
| id_penampilan | starter | digantikan | total_penampilan | tidak_bermain | nm_p
emain
| pemain_pengganti |
+---------------+---------+------------+------------------+---------------+---------------+------------------+
| P02A
|
2 |
0 |
2 |
0 | Andr
eolli
|
0 |
| P02B
|
1 |
1 |
2 |
0 | Jona
than
|
0 |
| P03A
|
0 |
0 |
3 |
0 | Bona
zzoli
|
3 |
| P03B
|
2 |
0 |
3 |
0 | Camp
agnaro
|
1 |
| P04A
|
0 |
0 |
4 |
0 | Ibra
hima Mbaye |
4 |
| P07A
|
2 |
2 |
7 |
0 | D.Am
brossio
|
3 |
| P07B
|
1 |
2 |
7 |
0 | MVil
a
|
4 |
| P08A
|
4 |
2 |
8 |
1 | Kuzm
anovic
|
1 |
| P08B
|
0 |
5 |
8 |
0 | Obi
|
3 |
| P09A
|
7 |
1 |
9 |
0 | Naga
tomo
|
1 |
| P09B
|
8 |
0 |
9 |
1 | Vidi
c
|
0 |
| P10A
|
5 |
2 |
10 |
0 | Fred
y Guarin |
3 |
| P11A
|
5 |
1 |
11 |
0 | Hern
anes
|
5 |
| P15A
|
9 |
5 |
15 |
0 | Gary
Medel
|
1 |
| P15B
|
6 |
4 |
15 |
2 | Pala
cio
|
3 |
| P15C
|
14 |
1 |
15 |
0 | Rano

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
|
|
+------------------+-----------------+------+-----+---------+-------+

3 rows in set (0.01 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),
-> ("B0062","P07B",262),
-> ("B00","P03B",192),);
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 19
mysql> insert into penampilan
-> values ("P11B",4,1,11,0,"Pablo Osvaldo",6);
Query OK, 1 row affected (0.04 sec)
mysql> select * from penampilan;
+---------------+---------+------------+------------------+---------------+---------------+------------------+
| id_penampilan | starter | digantikan | total_penampilan | tidak_bermain | nm_p
emain
| pemain_pengganti |
+---------------+---------+------------+------------------+---------------+---------------+------------------+
| P02A
|
2 |
0 |
2 |
0 | Andr
eolli
|
0 |
| P02B
|
1 |
1 |
2 |
0 | Jona
than
|
0 |
| P03A
|
0 |
0 |
3 |
0 | Bona
zzoli
|
3 |
| P03B
|
2 |
0 |
3 |
0 | Camp
agnaro
|
1 |
| P04A
|
0 |
0 |
4 |
0 | Ibra
hima Mbaye |
4 |
| P07A
|
2 |
2 |
7 |
0 | D.Am
brossio
|
3 |
| P07B
|
1 |
2 |
7 |
0 | MVil
a
|
4 |
| P08A
|
4 |
2 |
8 |
1 | Kuzm
anovic
|
1 |
| P08B
|
0 |
5 |
8 |
0 | Obi
|
3 |
| P09A
|
7 |
1 |
9 |
0 | Naga
tomo
|
1 |
| P09B
|
8 |
0 |
9 |
1 | Vidi
c
|
0 |
| P10A
|
5 |
2 |
10 |
0 | Fred
y Guarin |
3 |
| P11A
|
5 |
1 |
11 |
0 | Hern

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
|
|
+-------------+-----------------+------+-----+---------+-------+

5 rows in set (0.04 sec)


mysql> insert into kartu
-> values ("KM18",4,1,"Gary Medel"),
-> ("KD22",3,0,"Dodo"),
-> ("KG13",3,0,"Fredy Guarin"),
-> ("KJ05",3,0,"Juan Jesus"),
-> ("KR23",3,0,"Ranocchia"),
-> ("KD33",2,0,"D.Ambrossio"),
-> ("KH88",2,0,"Hernanes"),
-> ("KK10",2,0,"Mateo Kovacic"),
-> ("KN55",2,1,"Nagatomo"),
-> ("KB97",1,0,"Bonazzoli"),
-> ("KC14",1,0,"Campagnaro"),
-> ("KH01",1,0,"Handanovic"),
-> ("KO20",1,0,"Obi"),
-> ("KO07",1,0,"Pablo Osvaldo"),
-> ("KP08",1,0,"Palacio"),
-> ("KV15",0,1,"Vidic");
ERROR 1136 (21S01): Column count doesn't match value count at row 1
mysql> insert into kartu
-> alter table kartu drop total_kartu;
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 'alter
table kartu drop total_kartu' at line 2
mysql> alter table kartu drop total_kartu;
Query OK, 0 rows affected (0.20 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql> insert into kartu
-> alter table kartu drop total_kartu;
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 'alter
table kartu drop total_kartu' at line 2
mysql> insert into kartu
-> values ("KM18",4,1,"Gary Medel"),
-> ("KD22",3,0,"Dodo"),
-> ("KG13",3,0,"Fredy Guarin"),
-> ("KJ05",3,0,"Juan Jesus"),
-> ("KR23",3,0,"Ranocchia"),
-> ("KD33",2,0,"D.Ambrossio"),
-> ("KH88",2,0,"Hernanes"),
-> ("KK10",2,0,"Mateo Kovacic"),
-> ("KN55",2,1,"Nagatomo"),
-> ("KB97",1,0,"Bonazzoli"),
-> ("KC14",1,0,"Campagnaro"),
-> ("KH01",1,0,"Handanovic"),
-> ("KO20",1,0,"Obi"),
-> ("KO07",1,0,"Pablo Osvaldo"),
-> ("KP08",1,0,"Palacio"),
-> ("KV15",0,1,"Vidic");
Query OK, 16 rows affected (0.03 sec)
Records: 16 Duplicates: 0 Warnings: 0
mysql> select * from kartu;
+----------+--------+-------+---------------+
| id_kartu | kuning | merah | nm_pemain
|
+----------+--------+-------+---------------+
| KB97
|
1 |
0 | Bonazzoli
|
| KC14
|
1 |
0 | Campagnaro
|

| 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)

mysql> drop table menit_bermain;


Query OK, 0 rows affected (0.05 sec)
mysql> drop table penampilan;
Query OK, 0 rows affected (0.06 sec)
mysql> create table penampilan
-> (id_penampilan char(4) primary key;
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> create table penampilan
-> (id_penampilan char(4) primary key,
-> nm_pemain varchar(30) not null,
-> starter int(2) unsigned not null,
-> digantikan int(2) unsigned not null,
-> pengganti int(2) unsigned not null,
-> tidak_bermain int(2) unsigned not null,
-> total_penampilan int(2) unsigned not null);
Query OK, 0 rows affected (0.14 sec)
mysql> describe penampilan;
+------------------+-----------------+------+-----+---------+-------+
| Field
| Type
| Null | Key | Default | Extra |
+------------------+-----------------+------+-----+---------+-------+
| id_penampilan
| char(4)
| NO | PRI | NULL
|
|
| nm_pemain
| varchar(30)
| NO |
| NULL
|
|
| starter
| int(2) unsigned | NO |
| NULL
|
|
| digantikan
| int(2) unsigned | NO |
| NULL
|
|
| pengganti
| int(2) unsigned | NO |
| NULL
|
|
| tidak_bermain
| int(2) unsigned | NO |
| NULL
|
|
| total_penampilan | int(2) unsigned | NO |
| NULL
|
|
+------------------+-----------------+------+-----+---------+-------+
7 rows in set (0.02 sec)
mysql> insert into penampilan
-> values ("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),;
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 '15,1,
0,0,16),
("P16C","Mauro Icardi"8,5,2,1,16),
("P16B","Handanovic"16,0,0,0,16' at line 3
mysql> insert into penampilan
-> values ("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),
-> ("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> ----------------------------------------------------------------------------------------------------

Enter password: ****


Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.5.28 MySQL Community Server (GPL)
Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database
|
+--------------------+
| information_schema |
| akademik
|
| bola
|
| inventory
|

| 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

-> order by total_menit desc;


+------------------+---------------+-------------+
| id_menit_bermain | id_penampilan | total_menit |
+------------------+---------------+-------------+
| 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 |
| BC00
| P00A
|
0 |
| BD00
| P00C
|
0 |
| BT00
| P00B
|
0 |
+------------------+---------------+-------------+
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.04 sec)
mysql>------------------------------------------------------------------------------------------

| 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

topskorer.gol, penam' at line 1


mysql>
mysql> 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
->
;
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.nm_pemain, topskorer.gol
-> from topskorer, skuat_reguler
-> where topskorer.gol>5
-> and skuat_reguler.id_pemain=topskorer.id_pemain;
+--------------+-----+
| nm_pemain
| gol |
+--------------+-----+
| Mauro Icardi | 8 |
+--------------+-----+
1 row in set (0.00 sec)
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)
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)

mysql> select skuat_reguler.nm_pemain, topskorer.gol,


->
penampilan.total_penampilan,
->
menit_bermain.total_menit,kartu.kuning
-> from skuat_reguler, topskorer, penampilan
-> where kartu.kuning>=1
->
and skuat_reguler.nm_pemain=penampilan.nm_pemain
->
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 '' at
line 7
mysql> select skuat_reguler.nm_pemain, topskorer.gol,
->
penampilan.total_penampilan,
->
menit_bermain.total_menit,kartu.kuning
-> from skuat_reguler, topskorer, penampilan
-> where kartu.kuning>=1
->
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 '' at
line 6
mysql> select skuat_reguler.nm_pemain, topskorer.gol,
->
penampilan.total_penampilan,
->
menit_bermain.total_menit,kartu.kuning
-> from skuat_reguler, topskorer, penampilan
-> where kartu.kuning>=1
->
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 '
and skuat_reguler.nm_pemain=penampilan.nm_pemain,' at line 6
mysql> select skuat_reguler.nm_pemain, topskorer.gol,
->
penampilan.total_penampilan,
->
menit_bermain.total_menit,kartu.kuning
-> from skuat_reguler, topskorer, penampilan
-> where kartu.kuning>=1
->
and skuat_reguler.id_pemain=topskorer.id_pemain
->
and skuat_reguler.nm_pemain=penampilan.nm_pemain
->
and penampilan.id_penampilan=menit_bermain.id_penampilan
->
and penampilan.nm_pemain=kartu.nm_pemain
-> ;
ERROR 1054 (42S22): Unknown column 'menit_bermain.total_menit' in 'field list'
mysql> select skuat_reguler.nm_pemain, topskorer.gol,
->
penampilan.total_penampilan,
->
menit_bermain.total_menit,
->
kartu.kuning as kartu_kuning
-> from skuat_reguler, topskorer, penampilan,
->
menit_bermain, kartu

-> where kartu.kuning>=1


->
and skuat_reguler.id_pemain=topskorer.id_pemain
->
and skuat_reguler.nm_pemain=penampilan.nm_pemain
->
and penampilan.id_penampilan=menit_bermain.id_penampilan
->
and penampilan.nm_pemain=kartu.nm_pemain
-> group by kuning desc;
+--------------+-----+------------------+-------------+--------------+
| nm_pemain
| gol | total_penampilan | total_menit | kartu_kuning |
+--------------+-----+------------------+-------------+--------------+
| Fredy Guarin | 2 |
10 |
705 |
3 |
| Hernanes
| 2 |
11 |
681 |
2 |
| Obi
| 1 |
8 |
379 |
1 |
+--------------+-----+------------------+-------------+--------------+
3 rows in set (0.00 sec)
mysql>
mysql> select skuat_reguler.nm_pemain, topskorer.gol,
->
penampilan.total_penampilan,
->
menit_bermain.total_menit,
->
kartu.kuning as kartu_kuning
-> from skuat_reguler, topskorer, penampilan,
->
menit_bermain, kartu
-> where kartu.kuning>=1
->
and skuat_reguler.id_pemain=topskorer.id_pemain
->
and skuat_reguler.nm_pemain=penampilan.nm_pemain
->
and penampilan.id_penampilan=menit_bermain.id_penampilan
->
and penampilan.nm_pemain=kartu.nm_pemain
-> order by gol desc, total_penampilan desc, total_menit desc,
-> kuning desc;
+---------------+-----+------------------+-------------+--------------+
| nm_pemain
| gol | total_penampilan | total_menit | kartu_kuning |
+---------------+-----+------------------+-------------+--------------+
| Pablo Osvaldo | 5 |
11 |
605 |
1 |
| Mateo Kovacic | 4 |
16 |
1361 |
2 |
| Ranocchia
| 2 |
15 |
1385 |
3 |
| Hernanes
| 2 |
11 |
681 |
2 |
| Fredy Guarin | 2 |
10 |
705 |
3 |
| Palacio
| 1 |
15 |
1134 |
1 |
| Obi
| 1 |
8 |
379 |
1 |
+---------------+-----+------------------+-------------+--------------+
7 rows in set (0.00 sec)
mysql> select * from skuat_reguler
-> order by starter desc;
ERROR 1054 (42S22): Unknown column 'starter' in 'order clause'
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>---------------------------------------------------------------------------------------------

mysql> select concat_ws(',','Ranocchia','Fredy Guarin'), total_penampilan from p


enampilan
-> where total_penampilan=16
-> group by total_penampilan;
+-------------------------------------------+------------------+
| concat_ws(',','Ranocchia','Fredy Guarin') | total_penampilan |
+-------------------------------------------+------------------+

| Ranocchia,Fredy Guarin
|
16 |
+-------------------------------------------+------------------+
1 row in set (0.00 sec)

1).mysql> select * from skuat_reguler


-> where posisi in("Bek")
->
and usia <=25
-> order by usia;
+-----------+-------------+----------------+------------+--------+------+
| id_pemain | no_punggung | nm_pemain
| kebangsaan | posisi | usia |
+-----------+-------------+----------------+------------+--------+------+
| ID54
|
54 | Donkor
| Ghana
| Bek
| 20 |
| IM25
|
25 | Ibrahima Mbaye | Senegal
| Bek
| 20 |
| DD22
|
22 | Dodo
| Brasil
| Bek
| 22 |
| JJ05
|
5 | Juan Jesus
| Brasil
| Bek
| 22 |
| DA33
|
33 | D.Ambrossio
| Italia
| Bek
| 24 |
| AR23
|
23 | Ranocchia
| Italia
| Bek
| 25 |
+-----------+-------------+----------------+------------+--------+------+
6 rows in set (0.00 sec)

2).mysql> select kebangsaan as asal_pemain,


-> count(kebangsaan) as total_pemain from skuat_reguler
-> group by kebangsaan;
+-------------+--------------+
| asal_pemain | total_pemain |
+-------------+--------------+
| Argentina |
4 |
| Brasil
|
4 |
| Chile
|
1 |
| Ghana
|
1 |
| Italia
|
6 |
| Jepang
|
1 |
| Kolombia
|
1 |
| Kroasia
|
1 |
| Nigeria
|
1 |
| Perancis
|
1 |
| Senegal
|
1 |
| Serbia
|
2 |
| Slovenia
|
1 |
+-------------+--------------+
13 rows in set (0.00 sec)

3).mysql> select avg(usia) as rata2_usia from skuat_reguler;


+------------+
| rata2_usia |
+------------+
|
25.4231 |
+------------+
1 row in set (0.00 sec)

4).mysql> select skuat_reguler.nm_pemain, topskorer.gol


-> from topskorer, skuat_reguler
-> where topskorer.gol>5
-> and skuat_reguler.id_pemain=topskorer.id_pemain;
+--------------+-----+
| nm_pemain
| gol |
+--------------+-----+
| Mauro Icardi | 8 |
+--------------+-----+
1 row in set (0.00 sec)

5).mysql> select skuat_reguler.nm_pemain, skuat_reguler.posisi,


->
penampilan.starter, penampilan.total_penampilan
-> from skuat_reguler, penampilan
-> where penampilan.starter=(select max(penampilan.starter)
-> from penampilan)
->
and skuat_reguler.nm_pemain=penampilan.nm_pemain;
+------------+--------+---------+------------------+
| nm_pemain | posisi | starter | total_penampilan |
+------------+--------+---------+------------------+
| Handanovic | Kiper |
16 |
16 |
+------------+--------+---------+------------------+
1 row in set (0.00 sec)

6).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)

7).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)

8).mysql> select skuat_reguler.nm_pemain, topskorer.gol,


->
penampilan.total_penampilan,
->
menit_bermain.total_menit,kartu.kuning
-> from skuat_reguler, topskorer, penampilan,
->
menit_bermain, kartu
-> where kartu.kuning>=1
->
and skuat_reguler.id_pemain=topskorer.id_pemain
->
and skuat_reguler.nm_pemain=penampilan.nm_pemain
->
and penampilan.id_penampilan=menit_bermain.id_penampilan
->
and penampilan.nm_pemain=kartu.nm_pemain
-> ;
+---------------+-----+------------------+-------------+--------+
| nm_pemain
| gol | total_penampilan | total_menit | kuning |
+---------------+-----+------------------+-------------+--------+
| Fredy Guarin | 2 |
10 |
705 |
3 |
| Obi
| 1 |
8 |
379 |
1 |
| Hernanes
| 2 |
11 |
681 |
2 |
| Palacio
| 1 |
15 |
1134 |
1 |
| Mateo Kovacic | 4 |
16 |
1361 |
2 |
| Ranocchia
| 2 |
15 |
1385 |
3 |
| Pablo Osvaldo | 5 |
11 |
605 |
1 |
+---------------+-----+------------------+-------------+--------+
7 rows in set (0.00 sec)

9).mysql> select skuat_reguler.nm_pemain, skuat_reguler.usia,


->
skuat_reguler.posisi,
->
topskorer.gol, penampilan.starter,
->
menit_bermain.total_menit as menit_bermain,
->
kartu.merah as kartu_merah
-> from skuat_reguler, topskorer, penampilan,
->
menit_bermain, kartu
-> where skuat_reguler.posisi <> "Striker"
->
and topskorer.gol>=2
->
and kartu.merah=0
->
and skuat_reguler.id_pemain=topskorer.id_pemain
->
and skuat_reguler.nm_pemain=penampilan.nm_pemain
->
and penampilan.id_penampilan=menit_bermain.id_penampilan
->
and penampilan.nm_pemain=kartu.nm_pemain;
+---------------+------+-----------+-----+---------+---------------+------------+
| nm_pemain
| usia | posisi
| gol | starter | menit_bermain | kartu_merah
|
+---------------+------+-----------+-----+---------+---------------+------------+
| Fredy Guarin | 27 | Gelandang | 2 |
5 |
705 |
0
|
| Hernanes
| 28 | Gelandang | 2 |
5 |
681 |
0
|
| Mateo Kovacic | 20 | Gelandang | 4 |
8 |
1361 |
0
|
| Ranocchia
| 25 | Bek
| 2 |
14 |
1385 |
0
|
+---------------+------+-----------+-----+---------+---------------+------------+
4 rows in set (0.00 sec)

Вам также может понравиться