전체 글

전체 글

    589 N-ary Tree Preorder Traversal

    589 N-ary Tree Preorder Traversal

    1. Description Given the root of an n-ary tree, return the preorder traversal of its nodes' values. Nary-Tree input serialization is represented in their level order traversal. Each group of children is separated by the null value. constraints : The number of nodes in the tree is in the range [0, \(10^{4}\)]. 0

    586 Customer Placing the Largest Number of Orders

    586 Customer Placing the Largest Number of Orders

    1. Description Table: Orders +-----------------+----------+ | Column Name | Type | +-----------------+----------+ | order_number | int | | customer_number | int | +-----------------+----------+ order_number is the primary key for this table. This table contains information about the order ID and the customer ID. Write an SQL query to find the customer_number for the customer who has placed the l..

    584 Find Customer Referee

    584 Find Customer Referee

    1. Description Table: Customer +-------------+---------+ | Column Name | Type | +-------------+---------+ | id | int | | name | varchar | | referee_id | int | +-------------+---------+ id is the primary key column for this table. Each row of this table indicates the id of a customer, their name, and the id of the customer who referred them. Write an SQL query to report the names of the customer ..

    See records with NULL

    In MySQL, NULL values excluded automatically while we querying data. So to see values with all NULL values, we have to add more condition to oringal query statement. # Write your MySQL query statement below SELECT name FROM customer WHERE referee_id 2 OR referee_id IS NULL; https://www.w3schools.com/mysql/mysql_where.asp MySQL WHERE Clause W3Schools offers free online tutorials, references and e..