DA0-001 · Question #88
Consider the following dataset which contains information about houses that are for sale: Which of the following string manipulation commands will combine the address and region name columns to…
The correct answer is A. SELECT CONCAT(address, ' , ' , regionname) AS full_address FROM melb LIMIT 5. The expected output places the street address first, followed by a comma-and-space separator, then the region name (e.g., '85 Turner St, Northern Metropolitan'). Option A uses CONCAT(address, ' , ' , regionname), which orders the columns correctly: address → separator →…
Question
Consider the following dataset which contains information about houses that are for sale:
Which of the following string manipulation commands will combine the address and region name columns to create a full address? full_address------------------------- 85 Turner St, Northern Metropolitan 25 Bloomburg St, Northern Metropolitan 5 Charles St, Northern Metropolitan 40 Federation La, Northern Metropolitan 55a Park St, Northern Metropolitan
Exhibit
Options
- ASELECT CONCAT(address, ' , ' , regionname) AS full_address FROM melb LIMIT 5;
- BSELECT CONCAT(address, '-' , regionname) AS full_address FROM melb LIMIT 5;
- CSELECT CONCAT(regionname, ' , ' , address) AS full_address FROM melb LIMIT 5
- DSELECT CONCAT(regionname, '-' , address) AS full_address FROM melb LIMIT 5;
How the community answered
(47 responses)- A83% (39)
- B6% (3)
- C2% (1)
- D9% (4)
Explanation
The expected output places the street address first, followed by a comma-and-space separator, then the region name (e.g., '85 Turner St, Northern Metropolitan'). Option A uses CONCAT(address, ' , ' , regionname), which orders the columns correctly: address → separator → regionname. Option B uses a dash separator instead of a comma, producing the wrong format. Options C and D reverse the order, putting regionname before address, which does not match the desired output.
Topics
Community Discussion
No community discussion yet for this question.
