21.2.28 / SQL / SQLD, SQL 강의 실습
Today
강의
MySQL 데이터베이스 한번에 끝내기 SQL Full Tutorial Course using MySQL Database (40:39)
스터디 내용
- SQLD 1과목 종료
- SQL 실습 강좌 수강
결과
show databases;
use world;
show tables;
show table status;
describe city;
DESC countrylanguage;
select * from city where Population <= 8000000
and population > 7000000;
select * from city where CountryCode = 'KOR';
select * from city where CountryCode = 'USA';
select * from city where CountryCode = 'KOR' and population > 3000000;
select * from city where Population between 4000000 and 8000000;
select * from city where Name IN('Seoul', 'New York', 'Tokyo');
select * from city where CountryCode IN('KOR', 'USA', 'JPN');
select * from city where CountryCode like 'KO_';
select * from city where Name like 'Tel';
select * from city where Name like 'Tel';
select * from city where CountryCode = (select CountryCode From city where name = 'Seoul') ;
select * from city where Population > ANY (select Population From city where District = 'New York') ;
select * from city where Population > SOME (select Population From city where District = 'New York') ;
select * from city where Population > ALL (select Population From city where District = 'New York') ;
select * from city order by Population desc;
select * from city order by CountryCode, Population desc;
select * from city where CountryCode = 'KOR' order by Population desc;
desc country;
select * from Country order by SurfaceArea desc;
select distinct CountryCode From city;
select * from city order by Population desc limit 10;
select CountryCode, AVG(Population) as 평균 from city group by CountryCode;
select CountryCode, MAX(Population) as 최대인구 from city group by CountryCode;
select count(*) from city;
select avg(population) from city;
select CountryCode, MAX(Population) as 최대인구 from city group by CountryCode having 최대인구 > 8000000;
select CountryCode, NAME, sum(Population) as 최대인구 from city group by CountryCode, name with rollup;
select * from city join country on city.CountryCode = country.Code
join Countrylanguage on city.CountryCode = Countrylanguage.CountryCode;
Select length('asdfawedsfasf');
select concat('My ', 'SQl op', ' ENee');
select locate('abc', 'asadfsefadsfaabcasfw');
select left('Mysql is an open source relational database management system', 5);
select right('Mysql is an open source relational database management system', 5);
select lower('Mysql is an open source relational database management system');
select upper('Mysql is an open source relational database management system');
select replace('mssql','ms','my');
select trim(' Mysql '),
trim(leading '#' from '###Mysql###'),
trim(trailing '#' from '###Mysql###');
Tomorrow
- SQL 실습 강좌 복습
- SQLD 2과목 풀이
Summary
- sqld 1과목 마무리했는데 대부분 암기내용이라 틈틈히 봐야겠다.
- 2과목 내용은 실습과 병행하며 익혀야겠다.
Author And Source
이 문제에 관하여(21.2.28 / SQL / SQLD, SQL 강의 실습), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://velog.io/@actpjk/21.2.28-SQL-SQLD-SQL-강의-실습
저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
- sqld 1과목 마무리했는데 대부분 암기내용이라 틈틈히 봐야겠다.
- 2과목 내용은 실습과 병행하며 익혀야겠다.
Author And Source
이 문제에 관하여(21.2.28 / SQL / SQLD, SQL 강의 실습), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://velog.io/@actpjk/21.2.28-SQL-SQLD-SQL-강의-실습저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)