해커랭크
-
[MySQL] 해커랭크 : Binary Tree Nodes학습기록 : 데이터 분석 2025. 4. 14. 14:55
문제You are given a table, BST, containing two columns: N and P, where N represents the value of a node in Binary Tree, and P is the parent of N.Write a query to find the node type of Binary Tree ordered by the value of the node. Output one of the following for each node:Root: If node is root node.Leaf: If node is leaf node.Inner: If node is neither root nor leaf node.Sample InputSample Output1 Le..
-
[MySQL] 해커랭크 문제풀이 : Occupations학습기록 : 데이터 분석 2025. 4. 10. 11:46
난이도 : Medium문제Pivot the Occupation column in OCCUPATIONS so that each Name is sorted alphabetically and displayed underneath its corresponding Occupation. The output should consist of four columns (Doctor, Professor, Singer, and Actor) in that specific order, with their respective names listed alphabetically under each column.Note: Print NULL when there are no more names corresponding to an occu..