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: hackerrank/Sql/README.md
+68-1Lines changed: 68 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -158,8 +158,75 @@ FROM station
158
158
WHERE NOT (city REGEXP'^[aeiouAEIOU]'OR city REGEXP'[aeiouAEIOU]$');
159
159
```
160
160
161
-
###
161
+
###Weather Observation Station 13
162
+
Query the sum of Northern Latitudes (LAT_N) from STATION having values greater than 38.7880 and less than 137.2345. Truncate your answer to 4 decimal places.
163
+
```sql
164
+
-- mysql
165
+
SELECT ROUND(SUM(LAT_N),4)
166
+
FROM station
167
+
WHERE LAT_N>38.7880AND LAT_N<137.2345;
168
+
```
169
+
170
+
###Weather Observation Station 14
171
+
Query the greatest value of the Northern Latitudes (LAT_N) from STATION that is less than 137.2345. Truncate your answer to 4 decimal places.
172
+
```sql
173
+
-- mysql
174
+
SELECT ROUND(LAT_N,4)
175
+
FROM station
176
+
WHERE LAT_N<137.2345
177
+
ORDER BY LAT_NDESC
178
+
LIMIT1;
179
+
```
180
+
181
+
###Weather Observation Station 15
182
+
183
+
```sql
184
+
-- mysql
185
+
186
+
```
187
+
188
+
###Weather Observation Station 16
189
+
190
+
```sql
191
+
-- mysql
192
+
193
+
```
194
+
195
+
###Weather Observation Station 17
196
+
197
+
```sql
198
+
-- mysql
199
+
200
+
```
201
+
202
+
###Weather Observation Station 18
203
+
204
+
```sql
205
+
-- mysql
206
+
207
+
```
208
+
209
+
###Weather Observation Station 19
210
+
211
+
```sql
212
+
-- mysql
213
+
214
+
```
215
+
216
+
###Weather Observation Station 20
217
+
218
+
```sql
219
+
-- mysql
220
+
221
+
```
222
+
223
+
224
+
##STUDENTS table used for all below
225
+

226
+
162
227
228
+
###Higher Than 75 Marks
229
+
Query the Name of any student in STUDENTS who scored higher than Marks. Order your output by the last three characters of each name. If two or more students both have names ending in the same last three characters (i.e.: Bobby, Robby, etc.), secondary sort them by ascending ID.