· 6 years ago · Sep 28, 2019, 04:04 AM
1Time: 0.001s
2company_database> insert into orders (ordernumber, id, email) values (3, 402, 'wow@aol.com');
3INSERT 0 1
4Time: 0.001s
5company_database> select * from orders;
6+---------------+------+--------------+-----------------------+
7| ordernumber | id | dateplaced | email |
8|---------------+------+--------------+-----------------------|
9| 1 | 400 | <null> | jfordnose64@gmail.com |
10| 2 | 401 | <null> | google@gmail.com |
11| 3 | 402 | <null> | wow@aol.com |
12+---------------+------+--------------+-----------------------+
13SELECT 3
14Time: 0.012s
15company_database> i
16
17Time: 0.012s
18company_database> select id from employees;
19+------+
20| id |
21|------|
22| 4 |
23| 4 |
24| 3 |
25| 3 |
26| 1 |
27| 1 |
28+------+
29SELECT 6
30Time: 0.043s
31company_database> select full_name, id from employees where id = 2;
32+-------------+------+
33| full_name | id |
34|-------------+------|
35+-------------+------+
36SELECT 0
37Time: 0.012s
38company_database>
39
40
41company_database> select full_name, id from employees where id = 4;
42+--------------+------+
43| full_name | id |
44|--------------+------|
45| jackson ford | 4 |
46| billy bob | 4 |
47+--------------+------+
48SELECT 2
49Time: 0.011s
50company_database>
51
52Time: 0.011s
53company_database> select * from employees;
54+--------------+----------+--------------------+-------------------+-------------+-----------------------+------+
55| full_name | salary | job_position | phone_extension | part_time | parking_spot_number | id |
56|--------------+----------+--------------------+-------------------+-------------+-----------------------+------|
57| jackson ford | 450 | developer | 123 | True | 67 | 4 |
58| billy bob | 4500 | Software developer | 423 | True | 34 | 4 |
59| billy bob | 300 | CFO | 423 | True | 34 | 3 |
60| Henry ford | 40050 | CEO | 153 | True | 50 | 3 |
61| Sam Smith | 500 | Cook | 423 | True | 1 | 1 |
62| Mark Dewey | 500 | Cook | 423 | True | 100 | 1 |
63+--------------+----------+--------------------+-------------------+-------------+-----------------------+------+
64SELECT 6
65Time: 0.013s
66company_database> select phone_extension from employees where id = 3;
67+-------------------+
68| phone_extension |
69|-------------------|
70| 423 |
71| 153 |
72+-------------------+
73SELECT 2
74Time: 0.012s
75company_database>
76
77
78Time: 0.001s
79company_database> select orders.id, orders.ordernumber from orders join product on
80................. product.id = orders.ordernumber;
81
82e: 0.012s
83company_database> select * from orders;
84+---------------+------+--------------+-----------------------+
85| ordernumber | id | dateplaced | email |
86|---------------+------+--------------+-----------------------|
87| 1 | 400 | <null> | jfordnose64@gmail.com |
88| 2 | 401 | <null> | google@gmail.com |
89| 3 | 402 | <null> | wow@aol.com |
90| 4 | 403 | <null> | yahoo@bing.com |
91| 5 | 404 | <null> | wow@aol.com |
92+---------------+------+--------------+-----------------------+
93SELECT 5
94Time: 0.012s
95company_database> insert into product(id, price, name,description, numberinstock)
96................. values(3,
97................. 500,
98................. 'milk',
99................. 'Milk is the livelyhood of the recently born',
100................. 40);
101INSERT 0 1
102Time: 0.005s
103company_database>
104
105Time: 0.005s
106company_database> insert into orders(ordernumber, id, email) values (6, 405, '1k2k
107................. @gmail.com');
108INSERT 0 1
109Time: 0.001s
110company_database>