[xquery-talk] my question again
Michael Rys
mrys at microsoft.com
Wed Mar 15 22:50:49 PST 2006
I think it is not clear what your grouping criteria is doing. In this
case you don't need a group by to to get the result 2. Just
count(/bookstore/book[ ... predicate .... ]) gives you 2....
Best regards
Michael
> -----Original Message-----
> From: talk-bounces at xquery.com [mailto:talk-bounces at xquery.com] On
Behalf
> Of fatma helmy
> Sent: Wednesday, March 15, 2006 8:12 PM
> To: talk at xquery.com
> Subject: [xquery-talk] my question again
>
> dear all
> i forwarded this email, i just need to know , is it
> possible to do that, if not please reply with no
>
> 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
> _______________________________________________
> talk at xquery.com
> http://xquery.com/mailman/listinfo/talk
More information about the talk
mailing list