 [MySQL/Hackerrank] Weather Observation Station 1~12
				
				
					[MySQL/Hackerrank] Weather Observation Station 1~12
					Weather Observation Station 1 Query a list of CITY and STATE from the STATION table. The STATION table is described as follows: where LAT_N is the northern latitude and LONG_W is the western longitude. SELECT CITY, STATE FROM STATION; Weather Observation Station 3 Query a list of CITY names from STATION for cities that have an even ID number. Print the results in any order, but exclude duplicate..
 [MySQL/Hackerrank] Revising the Select Query
				
				
					[MySQL/Hackerrank] Revising the Select Query
					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...
 [MS SQL SERVER] NULLIF
				
				
					[MS SQL SERVER] NULLIF
					NULLIF 구문은 2개의 인자를 비교하여 동일할 경우 NULL, 동일하지 않을 경우 첫 번째 값을 반환한다. 경우에 따라 CASE 구문을 대체할 수 있다. SELECT NULLIF(1, 1) --NULL SELECT NULLIF(1, 2) --1 아래처럼 budgets 테이블을 생성한 후 current_year, previous_year의 값을 입력한다. COALESCE 구문을 사용하여 NULL이 아닌 값을 구하고, NULLIF 구문을 사용하여 해당 값이 0과 동일하면 0을 아니면 COALESCE 구문을 사용하여 미리 구한 값을 출력하도록 한다. CREATE TABLE dbo.budgets ( dept TINYINT IDENTITY, current_year DECIMAL NULL, previous_ye..
 [MS SQL SERVER] COALESCE
				
				
					[MS SQL SERVER] COALESCE
					COALESCE 구문은 인수를 순서대로 체크하여 처음으로 NULL이 아닌 값을 반환한다. 인수는 여러 개가 입력되어도 상관없다. SELECT COALESCE(1, NULL, NULL, 2)--1 SELECT COALESCE(NULL, NULL, NULL, 2)--2 SELECT COALESCE(NULL, 'HI', 'HELLO')--HI SELECT COALESCE(NULL, NULL, NULL, NULL)--ERROR 또, COALESCE 구문은 CASE 구문을 대체할 수 있다. 아래 COALESCE 와 CASE 는 동일한 의미를 가진다. SELECT BusinessEntityID , FirstName , Title --TITLE값이 NULL인 경우 'N/A'출력 , CASE WHEN Title IS ..
- Total
- Today
- Yesterday
- HK이노엔
- TSQL
- Weather Observation Station
- 에코캡
- 넷플릭스
- string
- tensorflow
- SQL Server
- 대원화성
- DATABASE
- 해커랭크
- 매매일지
- python
- python3
- 동국알앤에스
- insert
- 코로나19
- MS SQL Server
- hackerrank
- MSSQL
- mysql
- Tableau
- 경구치료제
- 리비안
- 분석탭
- 넥스트BT
- 미중무역전쟁
- list
- 몰누피라비르
- 테슬라
| 일 | 월 | 화 | 수 | 목 | 금 | 토 | 
|---|---|---|---|---|---|---|
| 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 |