Updated queries with a station id that is in all datasets.
Project: http://git-wip-us.apache.org/repos/asf/vxquery/repo Commit: http://git-wip-us.apache.org/repos/asf/vxquery/commit/f16c5479 Tree: http://git-wip-us.apache.org/repos/asf/vxquery/tree/f16c5479 Diff: http://git-wip-us.apache.org/repos/asf/vxquery/diff/f16c5479 Branch: refs/heads/master Commit: f16c5479d78172b5790ad94c60770261af774f69 Parents: 481f9ed Author: Preston Carman <[email protected]> Authored: Fri Jun 27 14:27:37 2014 -0700 Committer: Preston Carman <[email protected]> Committed: Fri Jun 27 14:27:37 2014 -0700 ---------------------------------------------------------------------- .../src/main/resources/noaa-ghcn-daily/queries/q00.xq | 13 ++++++++----- .../src/main/resources/noaa-ghcn-daily/queries/q02.xq | 12 +++++++----- 2 files changed, 15 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/vxquery/blob/f16c5479/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q00.xq ---------------------------------------------------------------------- diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q00.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q00.xq index 743f95a..5006a21 100644 --- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q00.xq +++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q00.xq @@ -14,14 +14,17 @@ KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. :) - -(: XQuery Filter Query :) -(: See historical data for Riverside, CA (ASN00008113) station by selecting :) -(: the weather readings for December 25 over the last 10 years. :) +(: +XQuery Filter Query +------------------- +See historical data for Key West International Airport, FL (USW00012836) +station by selecting the weather readings for December 25 over the last +10 years. +:) let $collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors" for $r in collection($collection)/dataCollection/data let $datetime := xs:dateTime(fn:data($r/date)) -where $r/station eq "GHCND:ASN00008113" +where $r/station eq "GHCND:USW00012836" and fn:year-from-dateTime($datetime) ge 2003 and fn:month-from-dateTime($datetime) eq 12 and fn:day-from-dateTime($datetime) eq 25 http://git-wip-us.apache.org/repos/asf/vxquery/blob/f16c5479/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q02.xq ---------------------------------------------------------------------- diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q02.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q02.xq index cbe72da..0635618 100644 --- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q02.xq +++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q02.xq @@ -14,14 +14,16 @@ KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. :) - -(: XQuery Aggregate Query :) -(: Find the annual precipitation (PRCP) for a Seattle using the airport :) -(: station (USW00024233) for 1999. :) +(: +XQuery Aggregate Query +---------------------- +Find the annual precipitation (PRCP) for a Syracuse, NY using the airport +weather station (USW00014771) report for 1999. +:) fn:sum( let $collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors" for $r in collection($collection)/dataCollection/data - where $r/station eq "GHCND:USW00024233" + where $r/station eq "GHCND:USW00014771" and $r/dataType eq "PRCP" and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 1999 return $r/value
