You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Big-Spender/readme.md
+19-2Lines changed: 19 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,6 +61,10 @@ INSERT YOUR QUERY HERE
61
61
62
62
**Claire:** I think that's all the same to me.
63
63
64
+
**You:** And is it always singular? I mean: do you ever use fees or FEES?
65
+
66
+
**Claire:** ...Maybe?
67
+
64
68
**You:** Then here's the query for that:
65
69
66
70
```sql
@@ -91,6 +95,14 @@ CREATE YOUR QUERY HERE
91
95
INSERT YOUR QUERY HERE
92
96
```
93
97
98
+
**Farnoosh:** Oh, how do I know who these suppliers are? There's only numbers here.
99
+
100
+
**You:** Whoops! I gave you ids to key the totals, but let me give you names instead.
101
+
102
+
```sql
103
+
INSERT YOUR QUERY HERE
104
+
```
105
+
94
106
**Claire:** Thanks, that's really helpful. I can't quite figure out...what is the total amount spent on each of these two dates (1st March 2021 and 1st April 2021)?
95
107
96
108
**You:** I think you can use the BETWEEN clause to get the total amount spent on a range of dates, just like we used earlier.
@@ -105,10 +117,15 @@ CREATE YOUR QUERY HERE
105
117
106
118
**Farnoosh:** Fantastic. One last thing, looks like we missed something. Can we add a new transaction to the spends table with a description of 'Computer Hardware Dell' and an amount of £32,000?
107
119
108
-
**You:** Sure thing. To confirm, the transaction number is 38104091, the supplier invoice number is 3780119655, the supplier is 'Dell', the expense type is 'Hardware' and the expense area is 'IT'. Here's the query for that:
120
+
**You:** When was this?
121
+
122
+
**Farnoosh:** The receipt says August 19, 2021
123
+
124
+
**You:** Sure thing. To confirm, the date is August 19, 2021, the transaction number is 38104091, the supplier invoice number is 3780119655, the supplier is 'Dell', the expense type is 'Hardware' and the expense area is 'IT'. Here's the query for that:
109
125
110
126
```sql
111
-
INSERT YOUR QUERY HERE
127
+
INSERT YOUR QUERIES HERE
128
+
112
129
```
113
130
114
131
**Claire:** Great, that's everything we need. Thanks for your help.
0 commit comments