Provide XQuery expressions for the following queries based on the sample XML file (books.xml) below.
(a) List the title of the first book.
(b) List the titles of all the books along with a count of the number of books.
(c) List the title and price of each book published in the year 2003.
(d) List the title and numbers of authors of each book.
(e) List the titles of books whose price is less than $60.
(f) List the titles of books in alphabetical order.
(g) List the authors, sorted in reverse order of surname, then first name.
(h) List the authors as a single string, sorted in reverse order of surname, then first name.
(I) List the titles of books that have at least one author called Thomas Connolly.
(j) List the titles of books that have every author called Thomas Connolly.
(k) List books by author.
(l) Test whether the most expensive book is also the book with the largest number of authors/editors.
(m) List the books where Begg is an author but is not listed as the first author.
(n) List the titles of books that are more expensive than the average book price.
Correct Answer:
Verified
This ...
View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Q1: The World Wide Web is a distributed
Q2: Discuss what you consider to be the
Q3: Despite the excitement surrounding XML, it is
Q5: State the underlying type of the following
Q6: State the underlying type of the following
Q7: 'Data warehouse and the underlying support for
Q8: 'A data warehouse is a subject-oriented, integrated,
Q9: Discuss the relationship between online transaction processing
Q10: Describe the architecture and major components of
Q11: Discuss the current issues associated with the
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents