Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit483e90f

Browse files
committed
Some sql
1 parentd0c9816 commit483e90f

File tree

1 file changed

+68
-1
lines changed

1 file changed

+68
-1
lines changed

‎hackerrank/Sql/README.md

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,75 @@ FROM station
158158
WHERE NOT (city REGEXP'^[aeiouAEIOU]'OR city REGEXP'[aeiouAEIOU]$');
159159
```
160160

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+
![alt text](students.png)
226+
162227

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.
163230
```sql
164231
-- mysql
165232

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp