受付で飼い主の一覧を印刷するのですが、電話番号の欄が空だと見た目がよくありません。owners テーブルから name と電話番号を選び、電話番号が空(NULL)のところには代わりに 'none' を出してください。
idPKnamecityphoneidPKnamekindageweightowner_idFKpets.owner_id → owners.id
| id | name | city | phone |
|---|---|---|---|
| 1 | Lena | Oslo | 555-0101 |
| 2 | Marco | Rome | NULL |
| 3 | Priya | Oslo | 555-0103 |
| 4 | Omar | Cairo | NULL |
| 5 | Sofia | Rome | 555-0105 |
| id | name | kind | age | weight | owner_id |
|---|---|---|---|---|---|
| 1 | Biscuit | dog | 3 | 12 | 1 |
| 2 | Mochi | cat | 5 | 4 | 1 |
| 3 | Pepper | dog | 8 | 20 | 2 |
| 4 | Nemo | fish | 1 | NULL | 3 |
| 5 | Luna | cat | 2 | 3 | 3 |
| 6 | Rex | dog | 11 | 30 | NULL |
| 7 | Kiwi | bird | 4 | NULL | 5 |
| 8 | Tofu | cat | 7 | 5 | NULL |
idPKnamecityphoneidPKnamekindageweightowner_idFKpets.owner_id → owners.id
| id | name | city | phone |
|---|---|---|---|
| 1 | Lena | Oslo | 555-0101 |
| 2 | Marco | Rome | NULL |
| 3 | Priya | Oslo | 555-0103 |
| 4 | Omar | Cairo | NULL |
| 5 | Sofia | Rome | 555-0105 |
| id | name | kind | age | weight | owner_id |
|---|---|---|---|---|---|
| 1 | Biscuit | dog | 3 | 12 | 1 |
| 2 | Mochi | cat | 5 | 4 | 1 |
| 3 | Pepper | dog | 8 | 20 | 2 |
| 4 | Nemo | fish | 1 | NULL | 3 |
| 5 | Luna | cat | 2 | 3 | 3 |
| 6 | Rex | dog | 11 | 30 | NULL |
| 7 | Kiwi | bird | 4 | NULL | 5 |
| 8 | Tofu | cat | 7 | 5 | NULL |
-- ここにコードを書く:下のクエリの phone を COALESCE(phone, 'none') に変えたもの(ここに書いて、下のクエリは消す) SELECT name, phone FROM owners;
実行するとクエリの結果が表示されます。よさそうなら提出しましょう。