no image
Revising Aggregations - The Count Function
문제 https://www.hackerrank.com/challenges/revising-aggregations-the-count-function/problem?isFullScreen=true Revising Aggregations - The Count Function | HackerRank Query the number of cities having populations larger than 100000. www.hackerrank.com 다음보다 인구가 많은 CITY 의 도시 수를 쿼리 합니다. 풀이(MSSQL) SELECT COUNT(NAME) FROM CITY WHERE POPULATION >= 100000 이번 문제는 COUNT 함수를 통해 해당 컬럼의 갯수를 알 수 있게 되었다.
2024.01.09
no image
New Companies / 새로운 회사
문제 https://www.hackerrank.com/challenges/the-company/problem?isFullScreen=true New Companies | HackerRank Find total number of employees. www.hackerrank.com Amber의 대기업은 최근 몇몇 새로운 회사를 인수했습니다. 각 회사는 다음 계층 구조를 따릅니다. 아래 테이블 스키마가 주어지면 company_code , 창립자 이름, 총 리드 관리자 수, 총 고위 관리자 수, 총 관리자 수 및 총 직원 수를 인쇄하는 쿼리를 작성합니다 . company_code 를 오름차순으로 출력을 정렬하세요. 회사: 회사_코드 는 회사의 코드이며 창립자 는 회사의 창립자를 의미합니다. Lead_Manag..
2024.01.08
no image
Binary Tree Nodes / 이진트리 조회
문제 https://www.hackerrank.com/challenges/binary-search-tree-1/problem?isFullScreen=true Binary Tree Nodes | HackerRank Write a query to find the node type of BST ordered by the value of the node. www.hackerrank.com N과 P라는 두 개의 열을 포함하는 테이블 BST가 제공됩니다. 여기서 N은 이진 트리의 노드 값을 나타내고 P는 N의 상위입니다. 두 개의 열이 포함된 테이블 BST가 주어집니다. 여기서 N은 이진 트리에서 노드의 값을 나타내고 P는 N의 부모입니다. 노드 값으로 정렬된 이진 트리의 노드 유형을 찾기 위한 쿼리를 작성합니다...
2024.01.06
no image
[MSSQL]Occupations / 직업, 이름으로 조회
문제 https://www.hackerrank.com/challenges/occupations/problem?isFullScreen=true Occupations | HackerRank Pivot the Occupation column so the Name of each person in OCCUPATIONS is displayed underneath their respective Occupation. www.hackerrank.com 각 이름이 알파벳 순으로 정렬되고 해당 직업 아래에 표시되도록 직업의 직업 열을 피벗합니다. 출력 열 머리글은 각각 Doctor, Professor, Singer, and Actor여야 합니다. 참고: 직업에 해당하는 이름이 더 이상 없을 경우 NULL을 인쇄하십시오. 풀..
2024.01.02
no image
The PADS / 사람에 따른 직업표시, 직업 수 조회
문제 https://www.hackerrank.com/challenges/the-pads/problem?isFullScreen=true The PADS | HackerRank Query the name and abbreviated occupation for each person in OCCUPATIONS. www.hackerrank.com 해석 다음 두 결과 세트를 생성합니다. 알파벳 순으로 정렬된 OCCUPATIONS 테이블의 모든 이름 목록을 쿼리한 다음 각 직업의 첫 번째 문자(예: 괄호로 묶음)를 바로 뒤에 표시합니다. 예: AnActorName(A), ADoxtorName(D), AProfessorName(P) 및 ASingerName(S)이 있습니다. OCCUPATIONS 테이블에서 각 직업의..
2023.12.29
no image
Type of Triangle / 삼각형 판단하기
문제 https://www.hackerrank.com/challenges/what-type-of-triangle/problem?isFullScreen=true Type of Triangle | HackerRank Query a triangle's type based on its side lengths. www.hackerrank.com Equilateral: It's a triangle with sides of equal length. 정삼각형 : 변의 길이가 같은 삼각형입니다. Isosceles: It's a triangle with sides of equal length. 이등변삼각형: 변의 길이가 같은 삼각형입니다. Scalene: It's a triangle with sides of differi..
2023.12.27
no image
Employee Salaries / 조건에 의한 회사원 이름 조회
문제 https://www.hackerrank.com/challenges/salary-of-employees/problem?isFullScreen=true Employee Salaries | HackerRank Print the names of employees who earn more than $2000 per month and have worked at the company for less than 10 months. www.hackerrank.com 풀이(MSSQL) SELECT NAME FROM EMPLOYEE WHERE SALARY > 2000 AND MONTHS < 10 ORDER BY EMPLOYEE_ID 조건 1. 샐러리가 2000 초과 조건 2. 일한 달 10달 미만 조건 3. 조회 순서..
2023.12.23
no image
Employee Names / 회사원 이름 순서로 조회
문제 https://www.hackerrank.com/challenges/name-of-employees/problem?isFullScreen=true Employee Names | HackerRank Print employee names. www.hackerrank.com 풀이(MSSQL) SELECT NAME FROM EMPLOYEE ORDER BY NAME
2023.12.23
no image
Higher Than 75 Marks / 75점 이상 학생 조회
문제 https://www.hackerrank.com/challenges/more-than-75-marks/problem?isFullScreen=true Higher Than 75 Marks | HackerRank Query the names of students scoring higher than 75 Marks. Sort the output by the LAST three characters of each name. www.hackerrank.com 풀이(MSSQL) SELECT NAME FROM STUDENTS WHERE MARKS > 75 ORDER BY RIGHT(NAME, 3), ID; 조건 1. 학생의 점수는 75점 이상 조건 2. 학생 조회 순서는 이름의 오른쪽 3개로 정렬 조건 3. 그 ..
2023.12.23
300x250