MYSQL96 Symmetric Pairs 과 Self_Join You are given a table, Functions, containing two columns: X and Y.Two pairs (X1, Y1) and (X2, Y2) are said to be symmetric pairs if X1 = Y2 and X2 = Y1.Write a query to output all such symmetric pairs in ascending order by the value of X. List the rows such that X1 ≤ Y1.두 쌍 *(X1, Y1)*과 *(X2, Y2)*는 X1 = Y2이고 X2 = Y1일 때 대칭 쌍이라고 합니다.이러한 모든 대칭 쌍을 X 값의 오름차순으로 출력하는 쿼리를 작성하세요. X1 ≤ Y1인 행들만 나열하세요.SELECT.. 2025. 4. 22. Placements 과 Join You are given three tables: Students, Friends and Packages. Students contains two columns: ID and Name. Friends contains two columns: ID and Friend_ID (ID of the ONLY best friend). Packages contains two columns: ID and Salary (offered salary in $ thousands per month). 세 개의 테이블이 주어집니다: Students, Friends, Packages.Students 테이블은 두 개의 열로 구성됩니다: ID와 NameFriends 테이블은 두 개의 열로 구성됩니다: ID와 Friend_ID (유일한 .. 2025. 4. 22. SQL Project Planning과 Islands and Gaps 패턴 문제You are given a table, Projects, containing three columns: Task_ID, Start_Date and End_Date. It is guaranteed that the difference between the End_Date and the Start_Date is equal to 1 day for each row in the table. If the End_Date of the tasks are consecutive, then they are part of the same project. Samantha is interested in finding the total number of different projects completed. Write a que.. 2025. 4. 21. Contest Leaderboard 문제You did such a great job helping Julia with her last coding contest challenge that she wants you to work on this one, too!The total score of a hacker is the sum of their maximum scores for all of the challenges. Write a query to print the hacker_id, name, and total score of the hackers ordered by the descending score. If more than one hacker achieved the same total score, then sort the result .. 2025. 4. 21. Challenges 와 WITH 절 문제Julia asked her students to create some coding challenges. Write a query to print the hacker_id, name, and the total number of challenges created by each student. Sort your results by the total number of challenges in descending order. If more than one student created the same number of challenges, then sort the result by hacker_id. If more than one student created the same number of challenge.. 2025. 4. 18. Ollivander's Inventory와 서브쿼리 문제Harry Potter and his friends are at Ollivander's with Ron, finally replacing Charlie's old broken wand.Hermione decides the best way to choose is by determining the minimum number of gold galleons needed to buy each non-evil wand of high power and age. Write a query to print the id, age, coins_needed, and power of the wands that Ron's interested in, sorted in order of descending power. If more.. 2025. 4. 18. 이전 1 2 3 4 5 ··· 16 다음