IT/SQL
-
문제링크 : https://www.hackerrank.com/challenges/japan-population/problem?isFullScreen=true ❓문제 Query the sum of the populations for all Japanese cities in CITY. The COUNTRYCODE for Japan is JPN. Input Format The CITY table is described as follows: 🔉 문제 설명 일본 인구의 총합을 쿼리하라. 일본의 COUNTRYCODE는 JPN이다. ❗답 SELECT SUM(POPULATION) FROM CITY WHERE COUNTRYCODE = 'JPN' 🤔풀이
[해커랭크] Japan Population문제링크 : https://www.hackerrank.com/challenges/japan-population/problem?isFullScreen=true ❓문제 Query the sum of the populations for all Japanese cities in CITY. The COUNTRYCODE for Japan is JPN. Input Format The CITY table is described as follows: 🔉 문제 설명 일본 인구의 총합을 쿼리하라. 일본의 COUNTRYCODE는 JPN이다. ❗답 SELECT SUM(POPULATION) FROM CITY WHERE COUNTRYCODE = 'JPN' 🤔풀이
2023.03.31 -
문제링크 : https://www.hackerrank.com/challenges/average-population/problem?isFullScreen=true ❓문제 Query the average population for all cities in CITY, rounded down to the nearest integer. Input Format The CITY table is described as follows: 🔉 문제 설명 모든 CITY의 인구의 평균을 쿼리 rounded down : 소수 끝자리를 자르고 정수로 쿼 ❗답 SELECT TRUNCATE(AVG(POPULATION),0) FROM CITY 🤔풀이 ROUND : 반올림 TRUNCATE : 끝자리 버리기(반드시 버릴 자릿수 명시해야 함)
[해커랭크] Average Population문제링크 : https://www.hackerrank.com/challenges/average-population/problem?isFullScreen=true ❓문제 Query the average population for all cities in CITY, rounded down to the nearest integer. Input Format The CITY table is described as follows: 🔉 문제 설명 모든 CITY의 인구의 평균을 쿼리 rounded down : 소수 끝자리를 자르고 정수로 쿼 ❗답 SELECT TRUNCATE(AVG(POPULATION),0) FROM CITY 🤔풀이 ROUND : 반올림 TRUNCATE : 끝자리 버리기(반드시 버릴 자릿수 명시해야 함)
2023.03.31 -
문제링크 : https://www.hackerrank.com/challenges/revising-aggregations-the-average-function/problem?isFullScreen=true ❓문제 Query the average population of all cities in CITY where District is California. Input Format The CITY table is described as follows: 🔉 문제 설명 지역구가 California인 CITY의 인구 평균을 쿼 ❗답 SELECT AVG(POPULATION) FROM CITY WHERE DISTRICT = 'California' 🤔풀이 AVG : 평균
[해커랭크] Revising Aggregations - Averages문제링크 : https://www.hackerrank.com/challenges/revising-aggregations-the-average-function/problem?isFullScreen=true ❓문제 Query the average population of all cities in CITY where District is California. Input Format The CITY table is described as follows: 🔉 문제 설명 지역구가 California인 CITY의 인구 평균을 쿼 ❗답 SELECT AVG(POPULATION) FROM CITY WHERE DISTRICT = 'California' 🤔풀이 AVG : 평균
2023.03.31 -
문제링크 : https://www.hackerrank.com/challenges/revising-aggregations-sum/problem?isFullScreen=true ❓문제 Query the total population of all cities in CITY where District is California. Input Format The CITY table is described as follows: 🔉 문제 설명 지역구가 California인 CITY의 총 인구수를 쿼리 ❗답 SELECT SUM(POPULATION) FROM CITY WHERE DISTRICT = 'California' 🤔풀이 SUM : 총
[해커랭크] Revising Aggregations - The Sum Function문제링크 : https://www.hackerrank.com/challenges/revising-aggregations-sum/problem?isFullScreen=true ❓문제 Query the total population of all cities in CITY where District is California. Input Format The CITY table is described as follows: 🔉 문제 설명 지역구가 California인 CITY의 총 인구수를 쿼리 ❗답 SELECT SUM(POPULATION) FROM CITY WHERE DISTRICT = 'California' 🤔풀이 SUM : 총
2023.03.31 -
문제링크 : https://www.hackerrank.com/challenges/revising-aggregations-the-count-function/problem?isFullScreen=true ❓문제 Query a count of the number of cities in CITY having a Population larger than 100,000. (인구가 100,000명보다 많은 CITY 수 출력) Input Format The CITY table is described as follows: ❗답 SELECT COUNT(*) FROM CITY WHERE POPULATION > 100000 🤔풀이 count: 개수 출력
[해커랭크] Revising Aggregations - The Count Function문제링크 : https://www.hackerrank.com/challenges/revising-aggregations-the-count-function/problem?isFullScreen=true ❓문제 Query a count of the number of cities in CITY having a Population larger than 100,000. (인구가 100,000명보다 많은 CITY 수 출력) Input Format The CITY table is described as follows: ❗답 SELECT COUNT(*) FROM CITY WHERE POPULATION > 100000 🤔풀이 count: 개수 출력
2023.03.31 -
문제링크 : https://www.hackerrank.com/challenges/what-type-of-triangle/problem?isFullScreen=true ❓문제 Write a query identifying the type of each record in the TRIANGLES table using its three side lengths. Output one of the following statements for each record in the table: Equilateral: It's a triangle with sides of equal length. (세 변의 길이가 모두 같으면 Equilateral) Isosceles: It's a triangle with sides of e..
[해커랭크] Type of Triangle문제링크 : https://www.hackerrank.com/challenges/what-type-of-triangle/problem?isFullScreen=true ❓문제 Write a query identifying the type of each record in the TRIANGLES table using its three side lengths. Output one of the following statements for each record in the table: Equilateral: It's a triangle with sides of equal length. (세 변의 길이가 모두 같으면 Equilateral) Isosceles: It's a triangle with sides of e..
2023.03.22 -
문제링크 : https://www.hackerrank.com/challenges/salary-of-employees/problem?isFullScreen=true ❓문제 Write a query that prints a list of employee names (i.e.: the name attribute) for employees in Employee having a salary greater than $2000 per month who have been employees for less than 10 months. Sort your result by ascending employee_id. (Employee 테이블에서 name을 뽑아라. 일한지 10개월 미만의 월급이 $2000가 넘는 직원. empl..
[해커랭크] Employee Salaries문제링크 : https://www.hackerrank.com/challenges/salary-of-employees/problem?isFullScreen=true ❓문제 Write a query that prints a list of employee names (i.e.: the name attribute) for employees in Employee having a salary greater than $2000 per month who have been employees for less than 10 months. Sort your result by ascending employee_id. (Employee 테이블에서 name을 뽑아라. 일한지 10개월 미만의 월급이 $2000가 넘는 직원. empl..
2023.03.21 -
문제링크 : https://www.hackerrank.com/challenges/name-of-employees/problem?isFullScreen=true ❓문제 Write a query that prints a list of employee names (i.e.: the name attribute) from the Employee table in alphabetical order. (name을 Employee 테이블에서 뽑아라. 알파벳 순서대로.) Input Format The Employee table containing employee data for a company is described as follows: where employee_id is an employee's ID number, ..
[해커랭크] Employee Names문제링크 : https://www.hackerrank.com/challenges/name-of-employees/problem?isFullScreen=true ❓문제 Write a query that prints a list of employee names (i.e.: the name attribute) from the Employee table in alphabetical order. (name을 Employee 테이블에서 뽑아라. 알파벳 순서대로.) Input Format The Employee table containing employee data for a company is described as follows: where employee_id is an employee's ID number, ..
2023.03.21