C2090-543 Free Dumps Study Materials
Question 6: Click the Exhibit button.
CREATE TABLE store(sid INTEGER, info XML);
INSERT INTO store VALUES (1,
'<storeinfo sid="1">
<name>Grocery A</name>
<items>
<fruit><name>Mango</name><price>1.20</price></fruit>
<fruit><name>Apple</name><price>0.50</price></fruit>
<dessert><name>Ice Cream</name><price>6.00</price></dessert>
</items>
</storeinfo>');
Given the statements shown in the exhibit, a user executes the query shown below:
XQUERY for $store in db2-fn:xmlcolumn('STORE.INFO')/storeinfo
let $items := $store/items/fruit, $count := fn:count($items)
return <itemcount>$count</itemcount>
What is the output?
A. 2
B. <itemcount>2</itemcount>
C. <itemcount>1</itemcount>
D. <itemcount>$count</itemcount>
Correct Answer: D