Added the mrql and saxon versions of the benchmark queries.

- Also updated the q00 and q02 to use stations that exist in GSN and HCN 
networks.


Project: http://git-wip-us.apache.org/repos/asf/vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/vxquery/commit/fee9582a
Tree: http://git-wip-us.apache.org/repos/asf/vxquery/tree/fee9582a
Diff: http://git-wip-us.apache.org/repos/asf/vxquery/diff/fee9582a

Branch: refs/heads/site
Commit: fee9582ab5e1a83a9bd59c91ed16b9c3cfff55d5
Parents: 13ed39e
Author: Preston Carman <[email protected]>
Authored: Tue Jun 24 18:21:04 2014 -0700
Committer: Preston Carman <[email protected]>
Committed: Tue Jun 24 18:21:04 2014 -0700

----------------------------------------------------------------------
 .../noaa-ghcn-daily/other_systems/mrql/q00.mrql     |  7 +++++++
 .../noaa-ghcn-daily/other_systems/mrql/q01.mrql     |  5 +++++
 .../noaa-ghcn-daily/other_systems/mrql/q02.mrql     |  8 ++++++++
 .../noaa-ghcn-daily/other_systems/mrql/q03.mrql     |  7 +++++++
 .../noaa-ghcn-daily/other_systems/mrql/q04.mrql     |  9 +++++++++
 .../other_systems/mrql/q04_sensor.mrql              |  5 +++++
 .../other_systems/mrql/q04_station.mrql             |  8 ++++++++
 .../noaa-ghcn-daily/other_systems/mrql/q05.mrql     | 11 +++++++++++
 .../other_systems/mrql/q05_sensor.mrql              |  7 +++++++
 .../other_systems/mrql/q05_station.mrql             |  7 +++++++
 .../noaa-ghcn-daily/other_systems/mrql/q06.mrql     | 12 ++++++++++++
 .../other_systems/mrql/q06_sensor.mrql              |  7 +++++++
 .../other_systems/mrql/q06_station.mrql             |  7 +++++++
 .../noaa-ghcn-daily/other_systems/mrql/q07.mrql     | 11 +++++++++++
 .../other_systems/mrql/q07_join_count.mrql          | 10 ++++++++++
 .../other_systems/mrql/q07_tmax.mrql                |  6 ++++++
 .../other_systems/mrql/q07_tmin.mrql                |  6 ++++++
 .../noaa-ghcn-daily/other_systems/saxon/q00.xq      | 15 +++++++++++++++
 .../noaa-ghcn-daily/other_systems/saxon/q01.xq      |  8 ++++++++
 .../noaa-ghcn-daily/other_systems/saxon/q02.xq      | 14 ++++++++++++++
 .../noaa-ghcn-daily/other_systems/saxon/q03.xq      |  8 ++++++++
 .../noaa-ghcn-daily/other_systems/saxon/q04.xq      | 13 +++++++++++++
 .../other_systems/saxon/q04_sensor.xq               | 10 ++++++++++
 .../other_systems/saxon/q04_station.xq              |  8 ++++++++
 .../noaa-ghcn-daily/other_systems/saxon/q05.xq      | 16 ++++++++++++++++
 .../other_systems/saxon/q05_sensor.xq               | 11 +++++++++++
 .../other_systems/saxon/q05_station.xq              |  8 ++++++++
 .../noaa-ghcn-daily/other_systems/saxon/q06.xq      | 13 +++++++++++++
 .../other_systems/saxon/q06_sensor.xq               |  8 ++++++++
 .../other_systems/saxon/q06_station.xq              |  5 +++++
 .../noaa-ghcn-daily/other_systems/saxon/q07.xq      | 15 +++++++++++++++
 .../noaa-ghcn-daily/other_systems/saxon/q07_tmax.xq |  9 +++++++++
 .../noaa-ghcn-daily/other_systems/saxon/q07_tmin.xq |  9 +++++++++
 .../other_systems/saxon/sensor_count.xq             |  7 +++++++
 .../other_systems/saxon/station_count.xq            |  7 +++++++
 .../main/resources/noaa-ghcn-daily/queries/q00.xq   | 13 ++++++++-----
 .../main/resources/noaa-ghcn-daily/queries/q02.xq   | 12 +++++++-----
 37 files changed, 332 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q00.mrql
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q00.mrql
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q00.mrql
new file mode 100644
index 0000000..538df72
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q00.mrql
@@ -0,0 +1,7 @@
+select (r)
+from r in source(xml, "sample_xml/gsn_sensors.xml", {"data"})
+where text(r.station) = "GHCND:USW00012836"
+    and toInt(substring(text(r.date), 0, 4)) >= 2003
+    and toInt(substring(text(r.date), 5, 7)) = 12
+    and toInt(substring(text(r.date), 8, 10)) = 25
+;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q01.mrql
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q01.mrql
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q01.mrql
new file mode 100644
index 0000000..5e8de9b
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q01.mrql
@@ -0,0 +1,5 @@
+select (r)
+from r in source(xml, "sample_xml/gsn_sensors.xml", {"data"})
+where text(r.dataType) = "AWND"
+    and toInt(text(r.value)) > 491.744
+;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q02.mrql
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q02.mrql
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q02.mrql
new file mode 100644
index 0000000..b8cd451
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q02.mrql
@@ -0,0 +1,8 @@
+sum(
+    select (toInt(text(r.value)))
+    from r in source(xml, "sample_xml/gsn_sensors.xml", {"data"})
+    where text(r.station) = "GHCND:USW00014771"
+        and toInt(substring(text(r.date), 0, 4)) = 1999
+        and text(r.dataType) = "PRCP"
+) / 10
+;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q03.mrql
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q03.mrql
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q03.mrql
new file mode 100644
index 0000000..2f85e84
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q03.mrql
@@ -0,0 +1,7 @@
+max(
+    select (toInt(text(r.value)))
+    from r in source(xml, "sample_xml/gsn_sensors.xml", {"data"})
+    where text(r.dataType) = "TMAX"
+        and toInt(substring(text(r.date), 0, 4)) = 1999
+) / 10
+;

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q04.mrql
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q04.mrql
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q04.mrql
new file mode 100644
index 0000000..68ee5ec
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q04.mrql
@@ -0,0 +1,9 @@
+select (r)
+from r in source(xml, "sample_xml/gsn_sensors.xml", {"data"}),
+    t in source(xml, "sample_xml/gsn_stations.xml", {"station"}),
+    l in t.locationLabels
+where text(t.id) = text(r.station) 
+    and text(r.date) = "1976-07-04T00:00:00.000"
+    and text(r.dataType) = "TMAX"
+    and text(l.displayName) = "WASHINGTON"
+;

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q04_sensor.mrql
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q04_sensor.mrql
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q04_sensor.mrql
new file mode 100644
index 0000000..bf30e52
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q04_sensor.mrql
@@ -0,0 +1,5 @@
+select (r)
+from r in source(xml, "sample_xml/gsn_sensors.xml", {"data"})
+where text(r.date) = "1976-07-04T00:00:00.000"
+  and text(r.dataType) = "TMAX"
+;

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q04_station.mrql
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q04_station.mrql
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q04_station.mrql
new file mode 100644
index 0000000..fdd6fba
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q04_station.mrql
@@ -0,0 +1,8 @@
+count(
+    select (r)
+    from r in source(xml, "sample_xml/gsn_sensors.xml", {"data"}),
+        t in source(xml, "sample_xml/gsn_stations.xml", {"station"}),
+        l in t.locationLabels
+    where text(l.displayName) = "WASHINGTON"
+)
+;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q05.mrql
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q05.mrql
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q05.mrql
new file mode 100644
index 0000000..5b940f3
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q05.mrql
@@ -0,0 +1,11 @@
+min(
+  select (toInt(text(r.value)))
+  from r in source(xml, "sample_xml/gsn_sensors.xml", {"data"}),
+    t in source(xml, "sample_xml/gsn_stations.xml", {"station"}),
+    l in t.locationLabels
+  where text(t.id) = text(r.station) 
+    and toInt(substring(text(r.date), 0, 4)) = 2001
+    and text(r.dataType) = "TMIN"
+    and text(l.id) = "FIPS:US"
+) / 10
+;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q05_sensor.mrql
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q05_sensor.mrql
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q05_sensor.mrql
new file mode 100644
index 0000000..232b07b
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q05_sensor.mrql
@@ -0,0 +1,7 @@
+count(
+    select (toInt(text(r.value)))
+    from r in source(xml, "sample_xml/gsn_sensors.xml", {"data"})
+    where toInt(substring(text(r.date), 0, 4)) = 2001
+      and text(r.dataType) = "TMIN"
+)
+;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q05_station.mrql
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q05_station.mrql
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q05_station.mrql
new file mode 100644
index 0000000..b47aeef
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q05_station.mrql
@@ -0,0 +1,7 @@
+count(
+    select (t)
+    from t in source(xml, "sample_xml/gsn_stations.xml", {"station"}),
+        l in t.locationLabels
+    where text(l.id) = "FIPS:US"
+)
+;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q06.mrql
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q06.mrql
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q06.mrql
new file mode 100644
index 0000000..f84f803
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q06.mrql
@@ -0,0 +1,12 @@
+select (n, d, v)
+from r in source(xml, "sample_xml/gsn_sensors.xml", {"data"}),
+    d in r.date,
+    v in r.value,
+    t in source(xml, "sample_xml/gsn_stations.xml", {"station"}),
+    n in t.displayName,
+    l in t.locationLabels
+where text(t.id) = text(r.station) 
+    and toInt(substring(text(d), 0, 4)) = 2000
+    and text(r.dataType) = "TMAX"
+    and text(l.displayName) = "WASHINGTON"
+;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q06_sensor.mrql
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q06_sensor.mrql
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q06_sensor.mrql
new file mode 100644
index 0000000..5050654
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q06_sensor.mrql
@@ -0,0 +1,7 @@
+count(
+    select (r.date, r.value)
+    from r in source(xml, "sample_xml/gsn_sensors.xml", {"data"})
+    where toInt(substring(text(r.date), 0, 4)) = 2000
+        and text(r.dataType) = "TMAX"
+)
+;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q06_station.mrql
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q06_station.mrql
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q06_station.mrql
new file mode 100644
index 0000000..78e3297
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q06_station.mrql
@@ -0,0 +1,7 @@
+count(
+    select (t.displayName)
+    from t in source(xml, "sample_xml/gsn_stations.xml", {"station"}),
+        l in t.locationLabels
+    where text(l.displayName) = "WASHINGTON"
+)
+;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q07.mrql
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q07.mrql
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q07.mrql
new file mode 100644
index 0000000..40662dd
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q07.mrql
@@ -0,0 +1,11 @@
+avg(
+    select (toInt(text(rtmax.value))-toInt(text(rtmin.value)))
+    from rtmax in source(xml, "sample_xml/gsn_sensors.xml", {"data"}),
+        rtmin in source(xml, "sample_xml/gsn_sensors.xml", {"data"})
+    where text(rtmax.date) = text(rtmin.date)
+        and text(rtmax.station) = text(rtmin.station)
+        and text(rtmax.dataType) = "TMAX"
+        and text(rtmin.dataType) = "TMIN"
+) / 10
+;
+    
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q07_join_count.mrql
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q07_join_count.mrql
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q07_join_count.mrql
new file mode 100644
index 0000000..2f41db1
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q07_join_count.mrql
@@ -0,0 +1,10 @@
+count(
+    select (toInt(text(rtmax.value))-toInt(text(rtmin.value)))
+    from rtmax in source(xml, "sample_xml/gsn_sensors.xml", {"data"}),
+        rtmin in source(xml, "sample_xml/gsn_sensors.xml", {"data"})
+    where text(rtmax.date) = text(rtmin.date)
+        and text(rtmax.station) = text(rtmin.station)
+        and text(r.dataType) = "TMAX"
+        and text(r.dataType) = "TMIN"
+)
+;

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q07_tmax.mrql
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q07_tmax.mrql
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q07_tmax.mrql
new file mode 100644
index 0000000..3db5107
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q07_tmax.mrql
@@ -0,0 +1,6 @@
+count(
+    select (rtmax)
+    from rtmax in source(xml, "sample_xml/gsn_sensors.xml", {"data"})
+    where text(r.dataType) = "TMAX"
+)
+;

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q07_tmin.mrql
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q07_tmin.mrql
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q07_tmin.mrql
new file mode 100644
index 0000000..9c93116
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q07_tmin.mrql
@@ -0,0 +1,6 @@
+count(
+    select (rtmin)
+    from rtmin in source(xml, "sample_xml/gsn_sensors.xml", {"data"})
+    where text(r.dataType) = "TMIN"
+)
+;

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q00.xq
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q00.xq
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q00.xq
new file mode 100644
index 0000000..09c5b79
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q00.xq
@@ -0,0 +1,15 @@
+(: 
+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 := 
"../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/sensors/?select=*.xml;recurse=yes"
+for $r in collection($collection)/root/dataCollection/data
+let $datetime := xs:dateTime(fn:data($r/date))
+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
+return $r
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q01.xq
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q01.xq
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q01.xq
new file mode 100644
index 0000000..39d7e20
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q01.xq
@@ -0,0 +1,8 @@
+(: XQuery Filter Query :)
+(: Find all reading for hurricane force wind warning or extreme wind warning. 
:)
+(: The warnings occur when the wind speed (AWND) exceeds 110 mph (49.1744     
:)
+(: meters per second). (Wind value is in tenth of a meter per second)         
:)
+let $collection := 
"../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/sensors/?select=*.xml;recurse=yes"
+for $r in fn:collection($collection)/root/dataCollection/data
+where $r/dataType eq "AWND" and xs:decimal($r/value) gt 491.744
+return $r

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q02.xq
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q02.xq
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q02.xq
new file mode 100644
index 0000000..3fb0975
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q02.xq
@@ -0,0 +1,14 @@
+(:
+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 := 
"../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/sensors/?select=*.xml;recurse=yes"
+    for $r in collection($collection)/root/dataCollection/data
+    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
+) div 10

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q03.xq
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q03.xq
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q03.xq
new file mode 100644
index 0000000..cda344a
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q03.xq
@@ -0,0 +1,8 @@
+(: XQuery Aggregate Query :)
+(: Find the highest recorded temperature (TMAX) in Celsius.                   
:)
+fn:max(
+    let $collection := 
"../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/sensors/?select=*.xml;recurse=yes"
+    for $r in collection($collection)/root/dataCollection/data
+    where $r/dataType eq "TMAX"
+    return $r/value
+) div 10

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q04.xq
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q04.xq
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q04.xq
new file mode 100644
index 0000000..09752d1
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q04.xq
@@ -0,0 +1,13 @@
+(: XQuery Join Query :)
+(: Find all the weather readings for King county for a specific day    :)
+(: 1976/7/4.                                                                  
:)
+let $collection2 := 
"../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/sensors/?select=*.xml;recurse=yes"
+for $r in collection($collection2)/root/dataCollection/data
+
+let $collection1 := 
"../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/stations/?select=*.xml;recurse=yes"
+for $s in collection($collection1)/root/stationCollection/station
+
+where $s/id eq $r/station 
+    and (some $x in $s/locationLabels satisfies ($x/type eq "ST" and 
fn:upper-case(fn:data($x/displayName)) eq "WASHINGTON"))
+    and xs:dateTime(fn:data($r/date)) eq xs:dateTime("1976-07-04T00:00:00.000")
+return $r

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q04_sensor.xq
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q04_sensor.xq
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q04_sensor.xq
new file mode 100644
index 0000000..6c927a4
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q04_sensor.xq
@@ -0,0 +1,10 @@
+(: XQuery Join Query :)
+(: Count all the weather sensor readings on 1976-07-04.                       
:)
+count(
+    let $sensor_collection := 
"../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/sensors/?select=*.xml;recurse=yes"
+    for $r in collection($sensor_collection)/root/dataCollection/data
+        
+    let $date := xs:date(fn:substring(xs:string(fn:data($r/date)), 0, 11))
+    where $date eq xs:date("1976-07-04")
+    return $r
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q04_station.xq
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q04_station.xq
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q04_station.xq
new file mode 100644
index 0000000..957aec0
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q04_station.xq
@@ -0,0 +1,8 @@
+(: XQuery Join Query :)
+(: Count all the weather stations for King county.                            
:)
+count(
+    let $station_collection := 
"../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/stations/?select=*.xml;recurse=yes"
+    for $s in collection($station_collection)/root/stationCollection/station
+    where (some $x in $s/locationLabels satisfies ($x/type eq "CNTY" and 
fn:contains(fn:upper-case(fn:data($x/displayName)), "KING")))
+    return $s
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q05.xq
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q05.xq
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q05.xq
new file mode 100644
index 0000000..eca1c68
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q05.xq
@@ -0,0 +1,16 @@
+(: XQuery Join Aggregate Query :)
+(: Find the lowest recorded temperature (TMIN) in the state of Oregon for     
:)
+(: 2001.                                                                      
:)
+fn:min(
+    let $collection2 := 
"../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/sensors/?select=*.xml;recurse=yes"
+    for $r in collection($collection2)/root/dataCollection/data
+        
+    let $collection1 := 
"../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/stations/?select=*.xml;recurse=yes"
+    for $s in collection($collection1)/root/stationCollection/station
+    
+    where $s/id eq $r/station
+        and (some $x in $s/locationLabels satisfies ($x/type eq "CNTRY" and 
$x/id eq "FIPS:US"))
+        and $r/dataType eq "TMIN" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2001
+    return $r/value
+) div 10

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q05_sensor.xq
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q05_sensor.xq
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q05_sensor.xq
new file mode 100644
index 0000000..4ac353b
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q05_sensor.xq
@@ -0,0 +1,11 @@
+(: XQuery Join Aggregate Query :)
+(: Count all sensor readings for TMIN in 2001.                                
:)
+count(
+    let $sensor_collection := 
"../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/sensors/?select=*.xml;recurse=yes"
+    for $r in collection($sensor_collection)/root/dataCollection/data
+    
+    let $date := xs:date(fn:substring(xs:string(fn:data($r/date)), 0, 11))
+    where $r/dataType eq "TMIN" 
+        and fn:year-from-date($date) eq 2001
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q05_station.xq
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q05_station.xq
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q05_station.xq
new file mode 100644
index 0000000..4349805
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q05_station.xq
@@ -0,0 +1,8 @@
+(: XQuery Join Aggregate Query :)
+(: Count all stations in the state of Oregon.                                 
:)
+count(
+    let $station_collection := 
"../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/stations/?select=*.xml;recurse=yes"
+    for $s in collection($station_collection)/root/stationCollection/station
+    where (some $x in $s/locationLabels satisfies ($x/type eq "ST" and 
fn:upper-case(fn:data($x/displayName)) eq "OREGON"))
+    return $s
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q06.xq
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q06.xq
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q06.xq
new file mode 100644
index 0000000..7be7c69
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q06.xq
@@ -0,0 +1,13 @@
+(: XQuery Join Query :)
+(: Find the highest recorded temperature (TMAX) for each station for each     
:)
+(: day over the year 2000.                                                    
:)
+let $station_collection := 
"../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/stations/?select=*.xml;recurse=yes"
+for $s in collection($station_collection)/root/stationCollection/station
+
+let $sensor_collection := 
"../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/sensors/?select=*.xml;recurse=yes"
+for $r in collection($sensor_collection)/root/dataCollection/data
+
+where $s/id eq $r/station
+    and $r/dataType eq "TMAX" 
+    and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2000
+return ($s/displayName, $r/date, $r/value)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q06_sensor.xq
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q06_sensor.xq
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q06_sensor.xq
new file mode 100644
index 0000000..5ca3329
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q06_sensor.xq
@@ -0,0 +1,8 @@
+count(
+    let $sensor_collection := 
"../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/sensors/?select=*.xml;recurse=yes"
+    for $r in collection($sensor_collection)/root/dataCollection/data
+    
+    where $r/dataType eq "TMAX" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2000
+    return $r
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q06_station.xq
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q06_station.xq
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q06_station.xq
new file mode 100644
index 0000000..ef1e732
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q06_station.xq
@@ -0,0 +1,5 @@
+count(
+    let $station_collection := 
"../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/stations/?select=*.xml;recurse=yes"
+    for $s in collection($station_collection)/root/stationCollection/station
+    return $s
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q07.xq
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q07.xq
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q07.xq
new file mode 100644
index 0000000..35e5ea2
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q07.xq
@@ -0,0 +1,15 @@
+(: XQuery Join Aggregate Query :)
+(: Self join with all sensor readings after the year 2000.                    
:)
+fn:avg(
+let $sensor_collection_min := 
"../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/sensors/?select=*.xml;recurse=yes"
+for $r_min in collection($sensor_collection_min)/root/dataCollection/data
+
+let $sensor_collection_max := 
"../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/sensors/?select=*.xml;recurse=yes"
+for $r_max in collection($sensor_collection_max)/root/dataCollection/data
+
+where $r_min/station eq $r_max/station
+    and $r_min/date eq $r_max/date
+    and $r_min/dataType eq "TMIN"
+    and $r_max/dataType eq "TMAX"
+return ($r_max/value - $r_min/value)
+) div 10
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q07_tmax.xq
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q07_tmax.xq
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q07_tmax.xq
new file mode 100644
index 0000000..3245746
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q07_tmax.xq
@@ -0,0 +1,9 @@
+(: XQuery Join Query :)
+(: Find the all the records for TMAX.                                         
:)
+count(
+    let $sensor_collection_max := 
"../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/sensors/?select=*.xml;recurse=yes"
+    for $r_max in collection($sensor_collection_max)/root/dataCollection/data
+    
+    where $r_max/dataType eq "TMAX"
+    return $r_max
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q07_tmin.xq
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q07_tmin.xq
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q07_tmin.xq
new file mode 100644
index 0000000..6fcd276
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q07_tmin.xq
@@ -0,0 +1,9 @@
+(: XQuery Join Query :)
+(: Find the all the records for TMIN.                                         
:)
+count(
+    let $sensor_collection_min := 
"../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/sensors/?select=*.xml;recurse=yes"
+    for $r_min in collection($sensor_collection_min)/root/dataCollection/data
+    
+    where $r_min/dataType eq "TMIN"
+    return $r_min
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/sensor_count.xq
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/sensor_count.xq
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/sensor_count.xq
new file mode 100644
index 0000000..1e8e312
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/sensor_count.xq
@@ -0,0 +1,7 @@
+(: XQuery Join Query :)
+(: Count all the weather sensor readings available.                           
:)
+count(
+    let $sensor_collection := 
"../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/sensors/?select=*.xml;recurse=yes"
+    for $r in collection($sensor_collection)/root/dataCollection/data
+    return $r
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/station_count.xq
----------------------------------------------------------------------
diff --git 
a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/station_count.xq
 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/station_count.xq
new file mode 100644
index 0000000..fe6ec8f
--- /dev/null
+++ 
b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/station_count.xq
@@ -0,0 +1,7 @@
+(: XQuery Join Query :)
+(: Count all the weather stations available.                                  
:)
+count(
+    let $station_collection := 
"../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/stations/?select=*.xml;recurse=yes"
+    for $s in collection($station_collection)/root/stationCollection/station
+    return $s
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/fee9582a/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/fee9582a/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

Reply via email to