What query would achieve this?

Consider the query and its output:
Mysql> SELECT Language As Lang FROM countrylanguage
->WHERE countrycode =’GBR’;

A user wants to have an output as shown:

What query would achieve this?

Consider the query and its output:
Mysql> SELECT Language As Lang FROM countrylanguage
->WHERE countrycode =’GBR’;

A user wants to have an output as shown:

What query would achieve this?

A.
SELECT GROUP_IMPLODE (Language) As Lang FROM countrylanguage WHERE
countrycode= ‘GBR’;

B.
SELECT GROUP_CAT(Language) As Lang FROM countrylanguage WHERE
countrycode=’GBR’;

C.
SELECT GROUP_CSV(Language) As Lang FROM countrylanguage WHERE
countrycode=’GBR’;

D.
SELECT GROUP_CONCAT (Language) As Lang FROM countrylanguage WHERE
countrycode=’GBR’;

Explanation:
Reference:
http://dcsg.bcs.org/sites/default/files/mysql-certification-41addendum_0.pdf (page 32, 1.9.)



Leave a Reply 5

Your email address will not be published. Required fields are marked *


AnswerMeIfYouPassedTheExam

AnswerMeIfYouPassedTheExam

Tested and it’s D. Abraham i used it with out the GROUP BY statement and it worked great :D.
Anyone who passed the exam: Did this question helped you for the exam?