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.)
D
D
D
D is the closest to being correct but…
It must have a “group by” section at the end of the statement. Also stated as such in section 1.9 of “MySQL 4 Certification Study Guide Addendum”, see:
http://dcsg.bcs.org/sites/default/files/mysql-certification-41addendum_0.pdf
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?