⚡️ Pass with Confidence Sale - 40% off ALL packages! ⚡️

2 days, 0 hour remaining!

CompTIA Data+ DA0-002 (V2) Practice Question

You are writing a cross-platform SQL query against a cloud data warehouse that does not implement either the ANSI concatenation operator (||) or SQL Server's + operator. The platform does support the multi-argument scalar function CONCAT() but not the convenience function CONCAT_WS(). The table employees contains the columns department_code, last_name, and other fields. The report must return a single column named employee_key whose value is the department code, a dash, and the employee's last name in upper-case (for example FIN-SMITH). Which SQL snippet satisfies the requirement without relying on unsupported operators or functions?

  • SELECT department_code || '-' || UPPER(last_name) AS employee_key FROM employees;

  • SELECT department_code + '-' + UPPER(last_name) AS employee_key FROM employees;

  • SELECT CONCAT(department_code, '-', UPPER(last_name)) AS employee_key FROM employees;

  • SELECT CONCAT_WS('-', department_code, UPPER(last_name)) AS employee_key FROM employees;

CompTIA Data+ DA0-002 (V2)
Data Acquisition and Preparation
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot