Microsoft
70-433 · Question #17
70-433 Question #17: Real Exam Question with Answer & Explanation
Sign in or unlock 70-433 to reveal the answer and full explanation for question #17. The question stem and answer options stay visible for context.
Question
You work for a company that provides marketing data to other companies. You have the following Transact-SQL statement: DECLARE @CustomerDemographics XML SET @CustomerDemographics=N' <CustomerDemographics> <Customer CustomerID="1" Age="21" Education="High School"> <IsCoffeeDrinker>0</IsCoffeeDrinker> </Customer> <Customer CustomerID="2" Age="27" Education="College"> <IsCoffeeDrinker>1</IsCoffeeDrinker> <IsFriendly>1</IsFriendly> </Customer> <Customer CustomerID="3" Age="35" Education="Unknown"> <IsCoffeeDrinker>1</IsCoffeeDrinker> <IsFriendly>1</IsFriendly> </Customer> </CustomerDemographics>' DECLARE @OutputAgeOfCoffeeDrinkers XML SET @OutputAgeOfCoffeeDrinkers = @CustomerDemographics.query(' for $output in /child::CustomerDemographics/child::Customer[( child::IsCoffeeDrinker[1 ] cast as xs:boolean )] return <CoffeeDrinkingCustomer> { $output/attribute::Age } </CoffeeDrinkingCustomer>') SELECT @OutputAgeOfCoffeeDrinkers You need to determine the result of the query. What result should you expect?
Options
- A<CoffeeDrinkingCustomer Age="27" />
- B<CoffeeDrinkingCustomer Age="21" />
- C<CustomerDemographics>
- D<CustomerDemographics>
Unlock 70-433 to see the answer
You've previewed enough free 70-433 questions. Unlock 70-433 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.