[MySQL/HackerRank] New Companies
·
SQL/HackerRank
Amber's conglomerate corporation just acquired some new companies. Each of the companies follows this hierarchy: Given the table schemas below, write a query to print the company_code, founder name, total number of lead managers, total number of senior managers, total number of managers, and total number of employees. Order your output by ascending company_code.Note:The tables may contain duplic..
[MySQL/HackerRank] Binary Tree Nodes
·
SQL/HackerRank
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 Leaf..
[MySQL/HackerRank] The PADS
·
SQL/HackerRank
Generate the following two result sets:Query an alphabetically ordered list of all names in OCCUPATIONS, immediately followed by the first letter of each profession as a parenthetical (i.e.: enclosed in parentheses). For example: AnActorName(A), ADoctorName(D), AProfessorName(P), and ASingerName(S).Query the number of ocurrences of each occupation in OCCUPATIONS. Sort the occurrences in ascendin..
_xxxx
'Medium' 태그의 글 목록