You execute the following code:

You need to select the task that has an IsFinished value of true from the Project that has an Id value of 1.
Which code segment should you use?

You execute the following code:
You need to select the task that has an IsFinished value of true from the Project that has an Id value of 1.
Which code segment should you use?
To retrieve a task with an IsFinished value of true from the project with Id value of 1, we should use an XQuery expression that correctly navigates the XML structure and filters tasks based on the IsFinished attribute. The correct query should specifically target elements with the IsFinished attribute set to 'true'. Option B uses the correct XQuery syntax to achieve this by querying the details column of the Projects table with the appropriate path and condition.
I think is the A due to if you choose de B you should use //*:task[IsFinished="True"]
No its not neccessary to use wildcards in xquery, the right answer is D.. https://stackoverflow.com/questions/17055000/filtering-xml-query-by-attribute-value
Agree with Kepty, D is correct.
@isfinished would be for an attribute
A Error XQuery [dbo.Projects.details.query()]: Syntax error near '[', expected a step expression. B Correct C Error Argument data type xml is invalid for argument 1 of like function. D Error XQuery [dbo.Projects.details.query()]: Syntax error near '[', expected a step expression.