티스토리 뷰
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
- insert
- HK이노엔
- list
- Weather Observation Station
- tensorflow
- SQL Server
- 에코캡
- python
- 코로나19
- DATABASE
- python3
- 동국알앤에스
- MS SQL Server
- MSSQL
- 몰누피라비르
- Tableau
- 매매일지
- TSQL
- 대원화성
- mysql
- 경구치료제
- 테슬라
- 해커랭크
- hackerrank
- 미중무역전쟁
- 넷플릭스
- 분석탭
- string
- 넥스트BT
- 리비안
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함