티스토리 뷰
728x90
Revising the Select Query I
Query all columns for all American cities in the CITY table with populations larger than 100000. The CountryCode for America is USA.The CITY table is described as follows:
SELECT *
FROM CITY
WHERE POPULATION > 100000
AND COUNTRYCODE = 'USA';
Revising the Select Query II
Query the NAME field for all American cities in the CITY table with populations larger than 120000. The CountryCode for America is USA.
The CITY table is described as follows:
SELECT NAME FROM CITY
WHERE CountryCode = 'USA'
AND POPULATION > 120000;
Select All
Query all columns (attributes) for every row in the CITY table.
The CITY table is described as follows:
SELECT *
FROM CITY;
Select By ID
Query all columns for a city in CITY with the ID 1661.
The CITY table is described as follows:
SELECT *
FROM CITY
WHERE ID = 1661;
Japanese Cities' Attributes
Query all attributes of every Japanese city in the CITY table. The COUNTRYCODE for Japan is JPN.
The CITY table is described as follows:
SELECT *
FROM CITY
WHERE COUNTRYCODE = 'JPN';
728x90
LIST
'Programming > MySQL' 카테고리의 다른 글
[MySQL/Hackerrank] Occupations (0) | 2021.11.02 |
---|---|
[MySQL/Hackerrank] The PADS (0) | 2021.11.02 |
[MySQL/Hackerrank] Type of Triangle (0) | 2021.11.02 |
[MySQL/Hackerrank] Higher Than 75 Marks, Employee Names, Employee Salaries (0) | 2021.11.02 |
[MySQL/Hackerrank] Weather Observation Station 1~12 (0) | 2021.11.02 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- list
- 리비안
- 에코캡
- tensorflow
- python3
- 테슬라
- mysql
- 미중무역전쟁
- 분석탭
- 경구치료제
- 해커랭크
- 코로나19
- TSQL
- 대원화성
- Tableau
- python
- SQL Server
- 몰누피라비르
- DATABASE
- 동국알앤에스
- 넷플릭스
- MS SQL Server
- string
- 매매일지
- Weather Observation Station
- insert
- 넥스트BT
- hackerrank
- MSSQL
- HK이노엔
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
글 보관함