- team_projects
id name start_date end_date aws_cost 1 일조 2023-01-01 2023-01-07 30000 2 꿈꾸는이조 2023-03-15 2023-03-22 50000 3 보람삼조 2023-11-20 2023-11-30 80000 4 사조참치 2022-07-01 2022-07-30 75000
team_projects테이블에서 AWS 예산(aws_cost)이 40000 이상 들어간 프로젝트들의 이름을 선택하는 쿼리를 작성해주세요!1. select name from team_projects where aws_cost >= 40000
team_projects테이블에서 2022년에 시작된 프로젝트를 선택하는 쿼리를 작성해주세요! 단, start_date < ‘2023-01-01’ 조건을 사용하지 말고 쿼리를 작성해주세요!1. select * from team_projects where YEAR(start_date) = 2022 2. select * from team_projects where DATE_FORMAT(start_date, '%Y') = 2022
team_projects테이블에서 현재 진행중인 프로젝트를 선택하는 쿼리를 작성해주세요. 단, 지금 시점의 날짜를 하드코딩해서 쿼리하지 말아주세요!1. select * from team_projects where CURDATE() between start_date and end_date 2. select * from team_projects where start_date <= CURDATE() AND end_date >= CURDATE();
team_projects테이블에서 각 프로젝트의 지속 기간을 일 수로 계산하는 쿼리를 작성해주세요!1. SELECT id, name, start_date, end_date, DATEDIFF(end_date, start_date) AS duration_days, aws_cost FROM team_projects;