Mounika@MOUNIKA-PC c:\xampp
# ram.cmd
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 10.4.18-MariaDB mariadb.org binary distribution
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> use classicmodels;
Database changed
MariaDB [classicmodels]> select customernumber,min(amount) from payments;
+----------------+-------------+
| customernumber | min(amount) |
+----------------+-------------+
| 103 | 615.45 |
+----------------+-------------+
1 row in set (0.002 sec)
MariaDB [classicmodels]> select customernumber,min(amount) from payments
-> group by customernumber limit 20;
+----------------+-------------+
| customernumber | min(amount) |
+----------------+-------------+
| 103 | 1676.14 |
| 112 | 14191.12 |
| 114 | 7565.08 |
| 119 | 19501.82 |
| 121 | 1491.38 |
| 124 | 11044.30 |
| 128 | 7466.32 |
| 129 | 16537.85 |
| 131 | 22292.62 |
| 141 | 20009.53 |
| 144 | 7674.94 |
| 145 | 4710.73 |
| 146 | 39712.10 |
| 148 | 2611.84 |
| 151 | 20314.44 |
| 157 | 35152.12 |
| 161 | 2434.25 |
| 166 | 22474.17 |
| 167 | 12538.01 |
| 171 | 18997.89 |
+----------------+-------------+
20 rows in set (0.001 sec)
MariaDB [classicmodels]> select customernumber,max(amount) from payments
-> group by customernumber limit 20;
+----------------+-------------+
| customernumber | max(amount) |
+----------------+-------------+
| 103 | 14571.44 |
| 112 | 33347.88 |
| 114 | 82261.22 |
| 119 | 49523.67 |
| 121 | 50218.95 |
| 124 | 111654.40 |
| 128 | 33820.62 |
| 129 | 26248.78 |
| 131 | 50025.35 |
| 141 | 120166.58 |
| 144 | 36005.71 |
| 145 | 53959.21 |
| 146 | 49614.72 |
| 148 | 105743.00 |
| 151 | 58841.35 |
| 157 | 63357.13 |
| 161 | 50743.65 |
| 166 | 44160.92 |
| 167 | 85024.46 |
| 171 | 42783.81 |
+----------------+-------------+
20 rows in set (0.001 sec)
MariaDB [classicmodels]> select customernumber,min(amount) from payments
-> group by customernumber order by min(amount) limit 20;
+----------------+-------------+
| customernumber | min(amount) |
+----------------+-------------+
| 398 | 615.45 |
| 381 | 1128.20 |
| 121 | 1491.38 |
| 103 | 1676.14 |
| 456 | 1679.92 |
| 350 | 1834.56 |
| 172 | 1960.80 |
| 161 | 2434.25 |
| 148 | 2611.84 |
| 323 | 2880.00 |
| 216 | 3101.40 |
| 219 | 3452.75 |
| 484 | 3474.66 |
| 205 | 3879.96 |
| 204 | 4424.40 |
| 209 | 4632.31 |
| 145 | 4710.73 |
| 181 | 5494.78 |
| 256 | 5759.42 |
| 198 | 5858.56 |
+----------------+-------------+
20 rows in set (0.020 sec)
MariaDB [classicmodels]>
No comments:
Post a Comment
Note: only a member of this blog may post a comment.