[xquery-talk] grouping by , where statement
fatma helmy
fatmahelmy2000 at yahoo.com
Tue Mar 14 23:46:43 PST 2006
Let &j= <bookstore>
<book id="1">
<title>seven years in trenton</title>
<author>
<firstname>joe</firstname>
<lastname>bob</lastname>
<degree>B.A</degree>
</author>
<price>12</price>
</book>
<book>
<title>history of trenton</title>
<author>
<firstname>mary</firstname>
<lastname>bob</lastname>
<degree>PhD</degree>
<degree>MSC</degree>
</author>
<price>55</price>
</book>
<book>
<title>trenton today, trenton tomorrow</title>
<author>
<firstname>toni</firstname>
<lastname>bob</lastname>
<degree>PhD</degree>
<degree>MSC</degree>
</author>
<price>55</price>
</book>
</bookstore>
let $whrcnd = Book/author/lastname= bob and
book/price=55
I need to select count(*) from $j where $whrcnd
Group by <records of book>
The result is 2
How to transform that into xquery.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the talk
mailing list