본문 바로가기
  • KEEP HUSTLE!

hackerrank7

[HacKerRank SQL] Placements - MYSQL 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). Write a query to output the names of those students whose best friends got offered a higher salary than them. Names must be order.. 2021. 3. 14.
[HacKerRank SQL] SQL Project Planning - MYSQL 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 query.. 2021. 3. 9.
[HacKerRank SQL] Ollivander's Inventory - MYSQL Input Format The following tables contain data on the wands in Ollivander's inventory: Wands: Wands_Property: 'code'와 'age'는 1:1 대응 관계, 즉 (code, age) 쌍은 다른 쌍과 중복되지 않음 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 .. 2021. 2. 25.
[HacKerRank SQL] Top Competitors - MYSQL Input Format The following tables contain contest data: Hackers: Difficulty: Challenges: Submissions: Julia just finished conducting a coding contest, and she needs your help assembling the leaderboard! Write a query to print the respective hacker_id and name of hackers who achieved full scores for more than one challenge. Order your output in descending order by the total number of challenges i.. 2021. 2. 24.
[HacKerRank SQL] The Report - MYSQL Ketty gives Eve a task to generate a report containing three columns: Name, Grade and Mark. Ketty doesn't want the NAMES of those students who received a grade lower than 8. The report must be in descending order by grade -- i.e. higher grades are entered first. If there is more than one student with the same grade (8-10) assigned to them, order those particular students by their name alphabetic.. 2021. 2. 24.
[HacKerRank SQL] Asian Population- MYSQL Note: CITY.CountryCode and COUNTRY.Code are matching key columns. Input Format The CITY and COUNTRY tables are described as follows: Given the CITY and COUNTRY tables, query the sum of the populations of all cities where the CONTINENT is 'Asia'. SELECT SUM(A.POPULATION) FROM CITY AS A INNER JOIN COUNTRY AS B ON A.COUNTRYCODE = B.CODE WHERE B.CONTINENT = 'Asia'; Given the CITY and COUNTRY tables,.. 2021. 2. 24.