상품정보(products) 테이블에서 5개 레코드만 조회하세요.
select *
from `thelook_ecommerce.products`
limit 5;
회원(users) 테이블에서 이메일 주소(email) 20개를 조회하세요.
select email
from `thelook_ecommerce.users`
limit 20;
주문정보(orders) 테이블에서 상태정보(status)를 중복제거하여 아래와 같이 결과가 나오도록 조회하세요.
select distinct status
FROM `thelook_ecommerce.orders`
상품정보(products) 테이블에서 카테고리(category)를 중복제거하여 아래와 같이 조회하세요.
select distinct category
from `thelook_ecommerce.products`
상품정보(products) 테이블에서 카테고리(category), 브랜드(brand)를 중복제거하여 30개 조회하세요.
각 결과 컬럼의 이름은 다음과 같이 지정하세요.
select
distinct category as product_category,
brand as product_brand
from `thelook_ecommerce.products`
limit 30;
상품정보(products) 테이블에서 id, 카테고리(category), 이름(name), 판매가격(retail_price), 비용(cost), 판매이익(판매가격 - 비용), 수익율을 조회하세요.