XQuery Homework

Using this folder of XML as your source, create an XQuery that returns a valid and well-formed XML with the following questions answered:

  1. What's the unique ID of each finding aid?
  2. What's the title of each finding aid?
  3. What's the number of years each finding aid covers (e.g., 1982-2000 = 2000 minus 1982 = 18 years)?
  4. What's the name of the person who encoded each finding aid?
  5. How many times was each finding aid changed?
  6. What's the physical extent of each finding aid?
  7. In a single element per collection, could you list all of the access restrictions separated by a |?
  8. What are the indexing terms used for each collection? Please express this in sub-elements with each term in its own element.
  9. How many files are in each collection?
  10. Could I see these returned from largest to smallest collection in terms of volume? There are a few ways you might try to calculate this based on available data, so please explain your rationale in a comment in your code.

Please submit a link to this XQuery in Canvas and host your query on GitHub.