五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

leetcode2504. Concatenate the Name and the Profession

2022-12-18 16:00 作者:您是打尖兒還是住店呢  | 我要投稿

Description

Table:?Person

+-------------+---------+

| Column Name | Type|?

+-------------+---------+?

| person_id ? |int ? ? |

| name ? ? ? ?| varchar |?

| profession ?| ENUM ? ?|?

+-------------+---------+?

person_id is the primary key for this table. Each row in this table contains a person's ID, name, and profession. The profession ? column in an enum of the type ('Doctor', 'Singer', 'Actor', 'Player', 'Engineer', or 'Lawyer')

?

Write an SQL query to report each person's name followed by the first letter of their profession enclosed in parentheses.

Return the result table?ordered?by?person_id?in?descending order.

The query result format is shown in the following example.

?

Example 1:

Input: Person table:?

+-----------+-------+------------+?

| person_id | name ?| profession |?

+-----------+-------+------------+?

| 1 ? ? ? ? | Alex ?| Singer ? ? |

| 3 ? ? ? ? | Alice | Actor ? ? ?|?

| 2 ? ? ? ? | Bob ? | Player ? ? |?

| 4 ? ? ? ? | Messi | Doctor ? ? |?

| 6 ? ? ? ? | Tyson | Engineer ? |?

| 5 ? ? ? ? | Meir ?| Lawyer ? ? |?

+-----------+-------+------------+

Output:?

+-----------+----------+?

| person_id | name ? ? |

+-----------+----------+?

| 6 ? ? ? ? | Tyson(E) |?

| 5 ? ? ? ? | Meir(L) ?|?

| 4 ? ? ? ? | Messi(D) |?

| 3 ? ? ? ? | Alice(A) |?

| 2 ? ? ? ? | Bob(P) ? |?

| 1 ? ? ? ? | Alex(S) ?|?

+-----------+----------+

Explanation: Note that there should not be any white space between the name and the first letter of the profession.

Easy?

person_id name

6 Tyson(E)

5 Meir(L)

4 Messi(D)

3 Alice(A)

2 Bob(P)

1 Alex(S)


leetcode2504. Concatenate the Name and the Profession的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
平昌县| 阳信县| 常宁市| 旬阳县| 安图县| 顺平县| 旬阳县| 霍城县| 中江县| 昌黎县| 德州市| 年辖:市辖区| 卓资县| 南昌县| 泾阳县| 维西| 文化| 山东| 阳曲县| 磴口县| 盈江县| 木里| 临武县| 广东省| 桃江县| 齐齐哈尔市| 烟台市| 凤城市| 张北县| 新田县| 枣庄市| 五寨县| 奇台县| 陆川县| 泰宁县| 金湖县| 商洛市| 尉氏县| 铁岭市| 定结县| 郧西县|