Question: consider the following XML document. Impression 2000 10 37 Expression 900 9 85 Expression 50000 10 92 2. XQuery. Write down the following English
consider the following XML document. Impression 2000 10 37 Expression 900 9 85 Expression 50000 10 92 2. XQuery. Write down the following English language queries in XQuery, and show the result of evaluating the XQuery query on the given XML document. (a) For each distinct period p, for which no artist in that period p has a rating lower than 10, return an element node that lists the period and, for each artist of that period, an attribute child artist that lists the name of the artist. [5 marks] (b) For each pair of artists, where each of the two artists has produced at least 1000 pieces, return an element node pair with two element children artist that contain the name of the artist as a string, respectively. For full marks, a pair cannot contain the same artist twice, and there must not be any pairs where the order of the artists is simply swapped. [5 marks] (c) For every distinct rating, return an element node rating with an attribute child called value that lists the rating and an element child average age that contains the average age of artists with that rating. [5 marks]
Step by Step Solution
3.41 Rating (145 Votes )
There are 3 Steps involved in it
The question is about the XML document provided and how to write certain XQuery expressions to extra... View full answer
Get step-by-step solutions from verified subject matter experts
