The Demographics xml data type column in AdventureWorks.Sales.Store contains the row sample below.
How would I write the path for Demographics.query() to retun all rows with
AnnualSales >=300000
I'm using variations of this statement but can't find an example of a path without elements.
SELECT
demographics.query('declare namespace AWMI="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey";/ '
) as ResultFROM
Sales.Store
<
StoreSurvey xmlns="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey"><
AnnualSales>300000</AnnualSales><
AnnualRevenue>30000</AnnualRevenue><
BankName>International Bank</BankName><
BusinessType>BM</BusinessType><
YearOpened>1970</YearOpened><
Specialty>Road</Specialty><
SquareFeet>7000</SquareFeet><
Brands>AW</Brands><
Internet>T1</Internet><
NumberEmployees>2</NumberEmployees></
StoreSurvey>