SQL Day 1.4
SQL Day 1.4
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> select * from orders where orderNumber > 10420 and orderNumber <10424;
+-------------+------------+--------------+-------------+------------
+-----------------------------------------------------+----------------+
| orderNumber | orderDate | requiredDate | shippedDate | status | comments
| customerNumber |
+-------------+------------+--------------+-------------+------------
+-----------------------------------------------------+----------------+
| 10421 | 2005-05-29 | 2005-06-06 | NULL | In Process | Custom
shipping instructions were sent to warehouse | 124 |
| 10422 | 2005-05-30 | 2005-06-11 | NULL | In Process | NULL
| 157 |
| 10423 | 2005-05-30 | 2005-06-05 | NULL | In Process | NULL
| 314 |
+-------------+------------+--------------+-------------+------------
+-----------------------------------------------------+----------------+
3 rows in set (0.00 sec)
mysql> select * from orders where orderDate >= '2005-05-01' and orderDate <'2005-
05-15';
+-------------+------------+--------------+-------------+----------
+----------------------------------------------------------------------------------
-------------------------------------------+----------------+
| orderNumber | orderDate | requiredDate | shippedDate | status | comments
| customerNumber |
+-------------+------------+--------------+-------------+----------
+----------------------------------------------------------------------------------
-------------------------------------------+----------------+
| 10411 | 2005-05-01 | 2005-05-08 | 2005-05-06 | Shipped | NULL
| 233 |
| 10412 | 2005-05-03 | 2005-05-13 | 2005-05-05 | Shipped | NULL
| 141 |
| 10413 | 2005-05-05 | 2005-05-14 | 2005-05-09 | Shipped | Customer
requested that DHL is used for this shipping
| 175 |
| 10414 | 2005-05-06 | 2005-05-13 | NULL | On Hold | Customer
credit limit exceeded. Will ship when a payment is received.
| 362 |
| 10415 | 2005-05-09 | 2005-05-20 | 2005-05-12 | Disputed | Customer
claims the scales of the models don't match what was discussed. I keep all the
paperwork though to prove otherwise | 471 |
| 10416 | 2005-05-10 | 2005-05-16 | 2005-05-14 | Shipped | NULL
| 386 |
| 10417 | 2005-05-13 | 2005-05-19 | 2005-05-19 | Disputed | Customer
doesn't like the colors and precision of the models.
| 141 |
+-------------+------------+--------------+-------------+----------
+----------------------------------------------------------------------------------
-------------------------------------------+----------------+
7 rows in set (0.00 sec)
mysql>