nerdexam
CompTIA

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 →…

Data Analysis

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

DA0-001 question #88 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)
  • A
    83% (39)
  • B
    6% (3)
  • C
    2% (1)
  • D
    9% (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

#SQL#String Manipulation#Data Transformation#CONCAT function

Community Discussion

No community discussion yet for this question.

Full DA0-001 Practice