Escolar Documentos
Profissional Documentos
Cultura Documentos
+-----------+-----------+------------------+
| Max
+-----------+-----------+------------------+
1 row in set (0.00 sec)
2.
mysql> select act_id, act_name, act_cost, act_notes, concat('$',
format(act_cost,2))
-> from activity
-> order by act_cost desc;
+--------+----------+----------+-----------+---------------------------------+
| act_id | act_name | act_cost | act_notes | concat('$',
format(act_cost,2)) |
+--------+----------+----------+-----------+---------------------------------+
|
10 | Lauren |
9 | Sally
6 | Sam
7 | Daphne |
8 | Sara
51.12 | NULL
22.41 | NULL
22.22 | NULL
21.11 | NULL
20.11 | NULL
| $51.12
| $22.41
| $22.22
|
|
|
| $21.11
| $20.11
|
|
+--------+----------+----------+-----------+---------------------------------+
5 rows in set (0.01 sec)
3.
+-----------+-----------+----------+----------+-----------------+----------------------------------+
| Smith
|
| Sam
| Sam
22.22 | terrible
| Rowe
|
| Daniel
| Sam
22.22 | no bueno
| Starton | Max
|
| Sam
| Darton
|
| Sam
22.22 | good
| Bull
|
| David
| Emily
| Sam
22.22 | eh
| $22.22
| $22.22
| $22.22
| $22.22
| Smith
|
| Sam
| Daphne |
21.11 | terrible
| Rowe
|
| Daniel
| Daphne |
21.11 | no bueno
| Daphne |
| Starton | Max
| $21.11
| $21.11
|
| Darton
|
| Bull
|
| David
| Emily
| Daphne |
| Daphne |
21.11 | good
| $21.11
21.11 | eh
| $21.11
| $20.11
| Smith
|
| Sam
| Sara
20.11 | terrible
| Rowe
|
| Daniel
| Sara
20.11 | no bueno
| Starton | Max
|
| Sara
| Darton
|
| Sara
20.11 | good
| Bull
|
| David
| Emily
| Sara
20.11 | eh
| $20.11
| $20.11
| $20.11
| Smith
|
| Sam
| Sally
22.41 | terrible
| Rowe
|
| Daniel
| Sally
22.41 | no bueno
| Starton | Max
|
| Sally
| Darton
|
| Sally
22.41 | good
| Bull
|
| David
| Emily
| Sally
22.41 | eh
| $22.41
| $22.41
| $22.41
| $22.41
| Smith
|
| Sam
| Lauren |
51.12 | terrible
| Rowe
|
| Daniel
| Lauren |
51.12 | no bueno
| Lauren |
| Starton | Max
|
| $51.12
| $51.12
| Darton
|
| Bull
|
| David
| Emily
| Lauren |
| Lauren |
51.12 | good
51.12 | eh
+-----------+-----------+----------+----------+-----------------+----------------------------------+
25 rows in set (0.00 sec)
5.
mysql> update student
-> set stu_lname='Stellar'
-> where stu_id='2';
Query OK, 1 row affected (0.01 sec)
Rows matched: 1 Changed: 1 Warnings: 0
| $51.12
| $51.12
+-----------+-----------+--------+
| Stellar | Daniel
2|
+-----------+-----------+--------+
1 row in set (0.00 sec)
+--------+--------------+----------+----------------+--------------------+--------------------------------------+
|
6 | Sam
NULL
|
7 | Daphne
NULL
22.22 | 2014-12-12
|
|
21.11 | 2015-12-12
|
| 2015-12-12 00:00:00 |
| 2016-12-12 00:00:00 |
|
8 | Sara
NULL
20.11 | 2016-12-12
|
| 2017-12-12 00:00:00 |
|
9 | Sally
NULL
22.41 | 2017-12-12
|
| 2018-12-12 00:00:00 |
|
10 | Lauren
NULL
51.12 | 2018-12-12
|
|
11 | archery
| 399.00 | 2013-04-01
course materials included
|
|
12 | martial arts | 599.00 | 2013-05-01
additional course materials required |
| 2019-12-12 00:00:00 |
| 2013-04-01 00:00:00 |
| 2013-08-01 00:00:00 |
+--------+--------------+----------+----------------+--------------------+--------------------------------------+
7 rows in set (0.00 sec)