You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vxquery.apache.org by pr...@apache.org on 2016/08/18 18:29:49 UTC

vxquery git commit: Updating VXQuery Benchmark

Repository: vxquery
Updated Branches:
  refs/heads/master 3641b1435 -> 6d2732fa0


Updating VXQuery Benchmark


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

Branch: refs/heads/master
Commit: 6d2732fa03b10f78709fd94bd5b60f4ce691bf9c
Parents: 3641b14
Author: Christina Pavlopoulou <cp...@ucr.edu>
Authored: Thu Aug 4 16:09:31 2016 -0700
Committer: Christina Pavlopoulou <cp...@ucr.edu>
Committed: Wed Aug 17 10:00:08 2016 -0700

----------------------------------------------------------------------
 .../queries_json/count_sensors.xq               | 27 ++++++++++++++
 .../queries_json/count_station.xq               | 27 ++++++++++++++
 .../noaa-ghcn-daily/queries_json/no_result.xq   | 25 +++++++++++++
 .../noaa-ghcn-daily/queries_json/q00.xq         | 32 ++++++++++++++++
 .../noaa-ghcn-daily/queries_json/q01.xq         | 26 +++++++++++++
 .../noaa-ghcn-daily/queries_json/q02.xq         | 31 ++++++++++++++++
 .../noaa-ghcn-daily/queries_json/q03.xq         | 26 +++++++++++++
 .../noaa-ghcn-daily/queries_json/q04.xq         | 32 ++++++++++++++++
 .../queries_json/q04_count_join.xq              | 34 +++++++++++++++++
 .../queries_json/q04_count_sensor.xq            | 30 +++++++++++++++
 .../queries_json/q04_count_station.xq           | 29 +++++++++++++++
 .../noaa-ghcn-daily/queries_json/q05.xq         | 33 +++++++++++++++++
 .../queries_json/q05_count_join.xq              | 35 ++++++++++++++++++
 .../queries_json/q05_count_sensor.xq            | 31 ++++++++++++++++
 .../queries_json/q05_count_station.xq           | 29 +++++++++++++++
 .../noaa-ghcn-daily/queries_json/q06.xq         | 30 +++++++++++++++
 .../queries_json/q06_count_join.xq              | 34 +++++++++++++++++
 .../queries_json/q06_count_sensors.xq           | 30 +++++++++++++++
 .../queries_json/q06_count_station.xq           | 27 ++++++++++++++
 .../noaa-ghcn-daily/queries_json/q07.xq         | 34 +++++++++++++++++
 .../queries_json/q07_count_1940.xq              | 35 ++++++++++++++++++
 .../queries_json/q07_count_1960.xq              | 35 ++++++++++++++++++
 .../queries_json/q07_count_1980.xq              | 35 ++++++++++++++++++
 .../queries_json/q07_count_2000.xq              | 35 ++++++++++++++++++
 .../queries_json/q07_count_join.xq              | 35 ++++++++++++++++++
 .../queries_json/q07_count_left.xq              | 27 ++++++++++++++
 .../queries_json/q07_count_tmax.xq              | 29 +++++++++++++++
 .../queries_json/q07_count_tmin.xq              | 29 +++++++++++++++
 .../queries_json/q07_data_tmax.xq               | 27 ++++++++++++++
 .../queries_json/q07_data_tmin.xq               | 27 ++++++++++++++
 .../queries_json/q07_filter_1940.xq             | 35 ++++++++++++++++++
 .../queries_json/q07_filter_1960.xq             | 35 ++++++++++++++++++
 .../queries_json/q07_filter_1980.xq             | 35 ++++++++++++++++++
 .../queries_json/q07_filter_2000.xq             | 35 ++++++++++++++++++
 .../queries_json/q08_count_xml_to_json.xq       | 27 ++++++++++++++
 .../queries_json/q08_xml_to_json.xq             | 35 ++++++++++++++++++
 .../resources/noaa-ghcn-daily/scripts/README.md | 39 ++++++++++++++++++--
 .../src/main/resources/scripts/startcc.sh       | 10 +++--
 .../src/main/resources/scripts/startnc.sh       | 10 +++--
 39 files changed, 1166 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/count_sensors.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/count_sensors.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/count_sensors.xq
new file mode 100644
index 0000000..26f4abf
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/count_sensors.xq
@@ -0,0 +1,27 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(:
+JSON Join Query
+-------------------
+Count all the weather sensor readings available.
+:)
+count(
+    let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r in collection($sensor_collection)
+        return $r("dataCollection")("data")
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/count_station.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/count_station.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/count_station.xq
new file mode 100644
index 0000000..6b004d9
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/count_station.xq
@@ -0,0 +1,27 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(: 
+XQuery Join Query
+-------------------
+Count all the weather stations available.
+:)
+count(
+    let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations"
+    for $s in collection($station_collection)
+    return $s("stationCollection")("station")
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/no_result.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/no_result.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/no_result.xq
new file mode 100644
index 0000000..6e05042
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/no_result.xq
@@ -0,0 +1,25 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(: 
+VXQuery used to only parse all files with out producing results.
+:)
+let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+for $r in collection($sensor_collection)
+for $data in $r("dataCollection")("data")
+where fn:false()
+return $data

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q00.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q00.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q00.xq
new file mode 100644
index 0000000..942d254
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q00.xq
@@ -0,0 +1,32 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   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 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)
+for $data in $r("dataCollection")("data")
+let $datetime := xs:dateTime(fn:data($data("date")))
+where $data("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 $data
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q01.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q01.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q01.xq
new file mode 100644
index 0000000..90bec94
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q01.xq
@@ -0,0 +1,26 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(: 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 := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+for $r in collection($collection)
+for $data in $r("dataCollection")("data")
+where $data("dataType") eq "AWND" and xs:decimal(fn:data($data("value"))) gt 491.744
+return $data
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q02.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q02.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q02.xq
new file mode 100644
index 0000000..49971bc
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q02.xq
@@ -0,0 +1,31 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   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 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)
+    for $data in $r("dataCollection")("data")
+    where $data("station") eq "GHCND:USW00014771" 
+        and $data("dataType") eq "PRCP" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($data("date")))) eq 1999
+    return $data("value")
+) div 10
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q03.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q03.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q03.xq
new file mode 100644
index 0000000..62a8103
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q03.xq
@@ -0,0 +1,26 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(: XQuery Aggregate Query :)
+(: Find the highest recorded temperature (TMAX) in Celsius.                   :)
+fn:max(
+    let $collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r in collection($collection)
+    for $data in $r("dataCollection")("data")
+    where $data("dataType") eq "TMAX"
+    return $data("value")
+) div 10
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q04.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q04.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q04.xq
new file mode 100644
index 0000000..762479b
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q04.xq
@@ -0,0 +1,32 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(:
+XQuery Join Query
+-------------------
+Find all the weather readings for Washington state for a specific day 1976/7/4. 
+:)
+let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations"
+for $s in collection($station_collection)
+for $station in $s("stationCollection")("station")
+let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+for $r in collection($sensor_collection)
+for $data in $r("dataCollection")("data")   
+where $station("id") eq $data("station") 
+    and (some $x in $station("locationLabels") satisfies ($x("type") eq "ST" and fn:upper-case(fn:data($x("displayName"))) eq "WASHINGTON"))
+    and xs:dateTime(fn:data($data("date"))) eq xs:dateTime("1976-07-04T00:00:00.000")
+return $data
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q04_count_join.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q04_count_join.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q04_count_join.xq
new file mode 100644
index 0000000..34a2628
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q04_count_join.xq
@@ -0,0 +1,34 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(:
+XQuery Join Query
+-------------------
+Find all the weather readings for Washington state for a specific day 1976/7/4. 
+:)
+fn:count(
+    let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations"
+    for $s in collection($station_collection)
+    for $station in $s("stationCollection")("station")
+    let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r in collection($sensor_collection)
+    for $data in $r("dataCollection")("data")
+    where $station("id") eq $data("station") 
+        and (some $x in $station("locationLabels") satisfies ($x("type") eq "ST" and fn:upper-case(fn:data($data("displayName"))) eq "WASHINGTON"))
+        and xs:dateTime(fn:data($data("date"))) eq xs:dateTime("1976-07-04T00:00:00.000")
+    return $data
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q04_count_sensor.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q04_count_sensor.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q04_count_sensor.xq
new file mode 100644
index 0000000..7153089
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q04_count_sensor.xq
@@ -0,0 +1,30 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(:
+XQuery Join Query
+-------------------
+Count all the weather sensor readings on 1976-07-04.
+:)
+count(
+    let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r in collection($sensor_collection)
+    for $data in $r("dataCollection")("data")
+    let $date := xs:date(fn:substring(xs:string(fn:data($data("date"))), 0, 11))
+    where $date eq xs:date("1976-07-04")
+    return $data
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q04_count_station.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q04_count_station.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q04_count_station.xq
new file mode 100644
index 0000000..50cfb5c
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q04_count_station.xq
@@ -0,0 +1,29 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(:
+XQuery Join Query
+-------------------
+Count all the weather stations for Washington state.
+:)
+count(
+    let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations"
+    for $s in collection($station_collection)
+    for $station in $s("stationCollection")("station")
+    where (some $x in $station("locationLabels") satisfies ($x("type") eq "ST" and fn:upper-case(fn:data($x("displayName"))) eq "WASHINGTON"))
+    return $station
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q05.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q05.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q05.xq
new file mode 100644
index 0000000..ae519b5
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q05.xq
@@ -0,0 +1,33 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(: XQuery Join Aggregate Query :)
+(: Find the lowest recorded temperature (TMIN) in the United States for     :)
+(: 2001.                                                                      :)
+fn:min(
+    let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations"
+    for $s in collection($station_collection)
+    for $station in $s("stationCollection")("station")
+    let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r in collection($sensor_collection)
+    for $data in $r("dataCollection")("data")
+    where $station("id") eq $data("station")
+        and (some $x in $station("locationLabels") satisfies ($x("type") eq "CNTRY" and $x("id") eq "FIPS:US"))
+        and $data("dataType") eq "TMIN" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($data("date")))) eq 2001
+    return $data("value")
+) div 10
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q05_count_join.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q05_count_join.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q05_count_join.xq
new file mode 100644
index 0000000..3c61d18
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q05_count_join.xq
@@ -0,0 +1,35 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(:
+XQuery Join Aggregate Query
+-------------------
+Find the lowest recorded temperature (TMIN) in the United States for 2001.
+:)
+fn:count(
+    let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations"
+    for $s in collection($station_collection)
+    for $station in $s("stationCollection")("station")
+    let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r in collection($sensor_collection)
+    for $data in $r("dataCollection")("data")   
+    where $station("id") eq $data("station")
+        and (some $x in $station("locationLabels") satisfies ($x("type") eq "CNTRY" and $x("id") eq "FIPS:US"))
+        and $data("dataType") eq "TMIN" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($data("date")))) eq 2001
+    return $data
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q05_count_sensor.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q05_count_sensor.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q05_count_sensor.xq
new file mode 100644
index 0000000..800406f
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q05_count_sensor.xq
@@ -0,0 +1,31 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(: 
+XQuery Join Aggregate Query
+-------------------
+Count all sensor readings for TMIN in 2001.
+:)
+count(
+    let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r in collection($sensor_collection)
+    for $data in $r("dataCollection")("data") 
+    let $date := xs:date(fn:substring(xs:string(fn:data($data("date"))), 0, 11))
+    where $data("dataType") eq "TMIN" 
+        and fn:year-from-date($date) eq 2001
+    return $data("value")
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q05_count_station.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q05_count_station.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q05_count_station.xq
new file mode 100644
index 0000000..94bb3cd
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q05_count_station.xq
@@ -0,0 +1,29 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(: 
+XQuery Join Aggregate Query
+-------------------
+Count all stations in the United States.
+:)
+count(
+    let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations"
+    for $s in collection($station_collection)
+    for $station in $s("stationCollection")("station") 
+    where (some $x in $station("locationLabels") satisfies ($x("type") eq "CNTRY" and $x("id") eq "FIPS:US"))
+    return $station
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q06.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q06.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q06.xq
new file mode 100644
index 0000000..3db0131
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q06.xq
@@ -0,0 +1,30 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(: XQuery Join Query :)
+(: Find the highest recorded temperature (TMAX) for each station for each     :)
+(: day over the year 2000.                                                    :)
+let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations"
+for $s in collection($station_collection)
+for $station in $s("stationCollection")("station")
+let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+for $r in collection($sensor_collection)
+for $data in $r("dataCollection")("data")
+where $station("id") eq $data("station")
+    and $data("dataType") eq "TMAX" 
+    and fn:year-from-dateTime(xs:dateTime(fn:data($data("date")))) eq 2000
+return ($station("displayName"), $data("date"), $data("value"))
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q06_count_join.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q06_count_join.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q06_count_join.xq
new file mode 100644
index 0000000..efe8934
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q06_count_join.xq
@@ -0,0 +1,34 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(:
+XQuery Join Query
+-------------------
+Find the highest recorded temperature (TMAX) for each station for each day over the year 2000.
+:)
+fn:count(
+    let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations"
+    for $s in collection($station_collection)
+    for $station in $s("stationCollection")("station")
+    let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r in collection($sensor_collection)
+    for $data in $r("dataCollection")("data")
+    where $station("id") eq $data("station")
+        and $data("dataType") eq "TMAX" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($data("date")))) eq 2000
+    return $data
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q06_count_sensors.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q06_count_sensors.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q06_count_sensors.xq
new file mode 100644
index 0000000..4c9b14b
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q06_count_sensors.xq
@@ -0,0 +1,30 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(:
+XQuery Join Query
+-------------------
+Count max temperature (TMAX) readings for 2000-01-01.
+:)
+count(
+    let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r in collection($sensor_collection)
+    for $data in $r("dataCollection")("data")
+    where $data("dataType") eq "TMAX" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($data("date")))) eq 2000
+    return $data
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q06_count_station.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q06_count_station.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q06_count_station.xq
new file mode 100644
index 0000000..2384242
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q06_count_station.xq
@@ -0,0 +1,27 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(:
+XQuery Join Query
+-------------------
+Count all the stations.
+:)
+count(
+    let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations"
+    for $s in collection($station_collection)
+    return $s("stationCollection")("station")
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07.xq
new file mode 100644
index 0000000..0d67217
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07.xq
@@ -0,0 +1,34 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(: XQuery Self Join Query :)
+(: Self join with all stations finding the difference in min and max       :)
+(: temperature and get the average.                                        :)
+fn:avg(
+    let $sensor_collection_min := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r_min in collection($sensor_collection_min)
+    for $data_min in $r_min("dataCollection")("data")
+    let $sensor_collection_max := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r_max in collection($sensor_collection_max)
+    for $data_max in $r_max("dataCollection")("data")
+    
+    where $data_min("station") eq $data_max("station")
+        and $data_min("date") eq $data_max("date")
+        and $data_min("dataType") eq "TMIN"
+        and $data_max("dataType") eq "TMAX"
+    return $data_max("value") - $data_min("value")
+) div 10
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_count_1940.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_count_1940.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_count_1940.xq
new file mode 100644
index 0000000..0a58a52
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_count_1940.xq
@@ -0,0 +1,35 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(: XQuery Self Join Query :)
+(: Self join with all stations finding the difference in min and max       :)
+(: temperature and get the average.                                        :)
+fn:count(
+    let $sensor_collection_min := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r_min in collection($sensor_collection_min)
+    for $data_min in $r_min("dataCollection")("data")
+    let $sensor_collection_max := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r_max in collection($sensor_collection_max)
+    for $data_max in $r_max("dataCollection")("data")
+    where $data_min("station") eq $data_max("station")
+        and $data_min("date") eq $data_max("date")
+        and $data_min("dataType") eq "TMIN"
+        and fn:year-from-dateTime(xs:dateTime(fn:data($data_min("date")))) gt 1940
+        and $data_max("dataType") eq "TMAX"
+        and fn:year-from-dateTime(xs:dateTime(fn:data($data_max("date")))) gt 1940
+    return $data_max("value") - $data_min("value")
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_count_1960.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_count_1960.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_count_1960.xq
new file mode 100644
index 0000000..8af63ee
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_count_1960.xq
@@ -0,0 +1,35 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(: XQuery Self Join Query :)
+(: Self join with all stations finding the difference in min and max       :)
+(: temperature and get the average.                                        :)
+fn:count(
+    let $sensor_collection_min := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r_min in collection($sensor_collection_min)
+    for $data_min in $r_min("dataCollection")("data")
+    let $sensor_collection_max := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r_max in collection($sensor_collection_max)
+    for $data_max in $r_max("dataCollection")("data")
+    where $data_min("station") eq $data_max("station")
+        and $data_min("date") eq $data_max("date")
+        and $data_min("dataType") eq "TMIN"
+        and fn:year-from-dateTime(xs:dateTime(fn:data($data_min("date")))) gt 1960
+        and $data_max("dataType") eq "TMAX"
+        and fn:year-from-dateTime(xs:dateTime(fn:data($data_max("date")))) gt 1960
+    return $data_max("value") - $data_min("value")
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_count_1980.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_count_1980.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_count_1980.xq
new file mode 100644
index 0000000..3fadcfe
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_count_1980.xq
@@ -0,0 +1,35 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(: XQuery Self Join Query :)
+(: Self join with all stations finding the difference in min and max       :)
+(: temperature and get the average.                                        :)
+fn:count(
+    let $sensor_collection_min := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r_min in collection($sensor_collection_min)
+    for $data_min in $r_min("dataCollection")("data")
+    let $sensor_collection_max := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r_max in collection($sensor_collection_max)
+    for $data_max in $r_max("dataCollection")("data")
+    where $data_min("station") eq $data_max("station")
+        and $data_min("date") eq $data_max("date")
+        and $data_min("dataType") eq "TMIN"
+        and fn:year-from-dateTime(xs:dateTime(fn:data($data_min("date")))) gt 1980
+        and $data_max("dataType") eq "TMAX"
+        and fn:year-from-dateTime(xs:dateTime(fn:data($data_max("date")))) gt 1980
+    return $data_max("value") - $data_min("value")
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_count_2000.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_count_2000.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_count_2000.xq
new file mode 100644
index 0000000..f13bc7c
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_count_2000.xq
@@ -0,0 +1,35 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(: XQuery Self Join Query :)
+(: Self join with all stations finding the difference in min and max       :)
+(: temperature and get the average.                                        :)
+fn:count(
+    let $sensor_collection_min := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r_min in collection($sensor_collection_min)
+    for $data_min in $r_min("dataCollection")("data")
+    let $sensor_collection_max := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r_max in collection($sensor_collection_max)
+    for $data_max in $r_max("dataCollection")("data")
+    where $data_min("station") eq $data_max("station")
+        and $data_min("date") eq $data_max("date")
+        and $data_min("dataType") eq "TMIN"
+        and fn:year-from-dateTime(xs:dateTime(fn:data($data_min("date")))) gt 2000
+        and $data_max("dataType") eq "TMAX"
+        and fn:year-from-dateTime(xs:dateTime(fn:data($data_max("date")))) gt 2000
+    return $data_max("value") - $data_min("value")
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_count_join.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_count_join.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_count_join.xq
new file mode 100644
index 0000000..2509bbf
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_count_join.xq
@@ -0,0 +1,35 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(:
+XQuery Join Query
+-------------------
+Find the all the records for TMIN.
+:)
+fn:count(
+    let $sensor_collection_min := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r_min in collection($sensor_collection_min)
+    for $data_min in $r_min("dataCollection")("data")
+    let $sensor_collection_max := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r_max in collection($sensor_collection_max)
+    for $data_max in $r_max("dataCollection")("data")
+    where $data_min("station") eq $data_max("station")
+        and $data_min("date") eq $data_max("date")
+        and $data_min("dataType") eq "TMIN"
+        and $data_max("dataType") eq "TMAX"
+    return $data_max
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_count_left.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_count_left.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_count_left.xq
new file mode 100644
index 0000000..475a4f1
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_count_left.xq
@@ -0,0 +1,27 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(:
+XQuery Join Query
+-------------------
+Find the all the records for TMIN.
+:)
+fn:count(
+    let $sensor_collection_max := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r_max in collection($sensor_collection_max)
+    return $r_max("dataCollection")("data")
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_count_tmax.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_count_tmax.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_count_tmax.xq
new file mode 100644
index 0000000..e8dce4d
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_count_tmax.xq
@@ -0,0 +1,29 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(:
+XQuery Join Query
+-------------------
+Find the all the records for TMAX.
+:)
+count(
+    let $sensor_collection_max := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r_max in collection($sensor_collection_max)
+    for $data_max in $r_max("dataCollection")("data")
+    where $data_max("dataType") eq "TMAX"
+    return $data_max
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_count_tmin.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_count_tmin.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_count_tmin.xq
new file mode 100644
index 0000000..c0b8c95
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_count_tmin.xq
@@ -0,0 +1,29 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(:
+XQuery Join Query
+-------------------
+Find the all the records for TMIN.
+:)
+count(
+    let $sensor_collection_min := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r_min in collection($sensor_collection_min)
+    for $data_min in $r_min("dataCollection")("data")
+    where $data_min("dataType") eq "TMIN"
+    return $data_min
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_data_tmax.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_data_tmax.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_data_tmax.xq
new file mode 100644
index 0000000..5baff50
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_data_tmax.xq
@@ -0,0 +1,27 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(:
+XQuery Join Query
+-------------------
+Find the all the records for TMAX.
+:)
+    let $sensor_collection_max := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r_max in collection($sensor_collection_max)
+    for $data_max in $r_max("dataCollection")("data")
+    where $data_max("dataType") eq "TMAX"
+    return $data_max

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_data_tmin.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_data_tmin.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_data_tmin.xq
new file mode 100644
index 0000000..5052554
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_data_tmin.xq
@@ -0,0 +1,27 @@
+or $data_min in $r_min("dataCollection")("data")(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(:
+XQuery Join Query
+-------------------
+Find the all the records for TMIN.
+:)
+    let $sensor_collection_min := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r_min in collection($sensor_collection_min)
+    for $data_min in $r_min("dataCollection")("data")
+    where $data_min("dataType") eq "TMIN"
+    return $data_min

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_filter_1940.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_filter_1940.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_filter_1940.xq
new file mode 100644
index 0000000..c00e6e7
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_filter_1940.xq
@@ -0,0 +1,35 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(: XQuery Self Join Query :)
+(: Self join with all stations finding the difference in min and max       :)
+(: temperature and get the average.                                        :)
+fn:avg(
+    let $sensor_collection_min := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r_min in collection($sensor_collection_min)
+    for $data_min in $r_min("dataCollection")("data")
+    let $sensor_collection_max := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r_max in collection($sensor_collection_max)
+    for $data_max in $r_max("dataCollection")("data")
+    where $data_min("station") eq $data_max("station")
+        and $data_min("date") eq $data_max("date")
+        and $data_min("dataType") eq "TMIN"
+        and fn:year-from-dateTime(xs:dateTime(fn:data($data_min("date")))) gt 1940
+        and $data_max("dataType") eq "TMAX"
+        and fn:year-from-dateTime(xs:dateTime(fn:data($data_max("date")))) gt 1940
+    return $data_max("value") - $data_min("value")
+) div 10
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_filter_1960.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_filter_1960.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_filter_1960.xq
new file mode 100644
index 0000000..fef5dd4
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_filter_1960.xq
@@ -0,0 +1,35 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(: XQuery Self Join Query :)
+(: Self join with all stations finding the difference in min and max       :)
+(: temperature and get the average.                                        :)
+fn:avg(
+    let $sensor_collection_min := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r_min in collection($sensor_collection_min)
+    for $data_min in $r_min("dataCollection")("data")
+    let $sensor_collection_max := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r_max in collection($sensor_collection_max)
+    for $data_max in $r_max("dataCollection")("data")
+    where $data_min("station") eq $data_max("station")
+        and $data_min("date") eq $data_max("date")
+        and $data_min("dataType") eq "TMIN"
+        and fn:year-from-dateTime(xs:dateTime(fn:data($data_min("date")))) gt 1960
+        and $data_max("dataType") eq "TMAX"
+        and fn:year-from-dateTime(xs:dateTime(fn:data($data_max("date")))) gt 1960
+    return $data_max("value") - $data_min("value")
+) div 10
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_filter_1980.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_filter_1980.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_filter_1980.xq
new file mode 100644
index 0000000..4fdd193
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_filter_1980.xq
@@ -0,0 +1,35 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(: XQuery Self Join Query :)
+(: Self join with all stations finding the difference in min and max       :)
+(: temperature and get the average.                                        :)
+fn:avg(
+    let $sensor_collection_min := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r_min in collection($sensor_collection_min)
+    for $data_min in $r_min("dataCollection")("data")
+    let $sensor_collection_max := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r_max in collection($sensor_collection_max)
+    for $data_max in $r_max("dataCollection")("data")
+    where $data_min("station") eq $data_max("station")
+        and $data_min("date") eq $data_max("date")
+        and $data_min("dataType") eq "TMIN"
+        and fn:year-from-dateTime(xs:dateTime(fn:data($data_min("date")))) gt 1980
+        and $data_max("dataType") eq "TMAX"
+        and fn:year-from-dateTime(xs:dateTime(fn:data($data_max("date")))) gt 1980
+    return $data_max("value") - $data_min("value")
+) div 10
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_filter_2000.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_filter_2000.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_filter_2000.xq
new file mode 100644
index 0000000..ecee35e
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q07_filter_2000.xq
@@ -0,0 +1,35 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(: XQuery Self Join Query :)
+(: Self join with all stations finding the difference in min and max       :)
+(: temperature and get the average.                                        :)
+fn:avg(
+    let $sensor_collection_min := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r_min in collection($sensor_collection_min)
+    for $data_min in $r_min("dataCollection")("data")
+    let $sensor_collection_max := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r_max in collection($sensor_collection_max)
+    for $data_max in $r_max("dataCollection")("data")
+    where $data_min("station") eq $data_max("station")
+        and $data_min("date") eq $data_max("date")
+        and $data_min("dataType") eq "TMIN"
+        and fn:year-from-dateTime(xs:dateTime(fn:data($data_min("date")))) gt 2000
+        and $data_max("dataType") eq "TMAX"
+        and fn:year-from-dateTime(xs:dateTime(fn:data($data_max("date")))) gt 2000
+    return $data_max("value") - $data_min("value")
+) div 10
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q08_count_xml_to_json.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q08_count_xml_to_json.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q08_count_xml_to_json.xq
new file mode 100644
index 0000000..9099d1d
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q08_count_xml_to_json.xq
@@ -0,0 +1,27 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(:
+Print the result of the number of dataTypes whose value is "AWND" in json structure
+:)
+let $x:=fn:count(
+    let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $d in collection($sensor_collection)/dataCollection/data
+where $d/dataType eq "AWND"
+return $d
+)
+return {"numberOfDataTypes":$x}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q08_xml_to_json.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q08_xml_to_json.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q08_xml_to_json.xq
new file mode 100644
index 0000000..bcd288e
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries_json/q08_xml_to_json.xq
@@ -0,0 +1,35 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   
+     http://www.apache.org/licenses/LICENSE-2.0
+   
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. :)
+
+(:
+Convert xml structure to json structure
+:)
+let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+for $d in collection($sensor_collection)/dataCollection/data
+let $date := xs:date(fn:substring(xs:string(fn:data($d/date)), 0, 11))
+where $date eq xs:date("2001-01-01") and $d/dataType eq "TMIN"
+return 
+{
+    "dataCollection":{
+        "data":{
+            "date":data($d/date),
+            "dataType":data($d/dataType),
+            "station":data($d/station),
+            "value":data($d/value),
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/README.md
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/README.md b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/README.md
index 58bea51..8109016 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/README.md
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/README.md
@@ -17,6 +17,11 @@
 
 Weather Data Conversion To XML
 =====================
+Before procceeding to the actual process, be sure that you are familiar with
+deploying a server and then getting it started. You can find information about
+these steps in the official VXQuery website. It would, also, be good to verify
+that you can ssh in different nodes without verifying the password since the
+scripts require to ssh from the current node to different ones.
 
 # Introduction
 
@@ -39,13 +44,41 @@ folders:
  - downloads (All files taken from the NOAA HTTP site)
  - dataset-[name] (all files related to a single dataset)
      
+To convert the weather data to XML, 4 stages have to be completed. The stages
+are described below:
+
+ - download (Dowload the weather data from the website)
+ - progress_file (Verify that all the data have been downloaded)
+ - sensor_build (Convert the sensor readings to XML files)
+ - station_build (Convert the station data to XML files)
+
+After the convertion is completed, the system has to be setup to execute some
+queries to evaluate its performance. The steps for this procedure are described
+below:
+
+ - partition (The partition schemes are configured in an XML file. An example of
+this file is the weather_example_cluster.xml. This stage configures in how many
+partitions the raw data will be partitioned in each node)
+ - test_links (establish the correspondence between the partitioned data and the raw data)
+ - queries (creates a folder with all the XML queries)
+
      
 # Examples commands
+Downloading 
+python weather_cli.py -l download -x weather_example.xml
 
 Building
-
+python weather_cli.py -l sensor_build -x weather_example.xml (-l station_build for the station data)
 
 Partitioning
-python weather_cli.py -x weather_example.xml
+python weather_cli.py -l partition -x weather_example.xml
+
+Linking
+python weather_cli.py -l test_links -x weather_example.xml
+
+Building queries
+python weather_cli.py -l queries -x weather_example.xml
+
+Executing queries
+run_group_test.sh cluster_ip path/to/weather_folder
 
-Linking
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-server/src/main/resources/scripts/startcc.sh
----------------------------------------------------------------------
diff --git a/vxquery-server/src/main/resources/scripts/startcc.sh b/vxquery-server/src/main/resources/scripts/startcc.sh
index 281c0d6..0e07659 100755
--- a/vxquery-server/src/main/resources/scripts/startcc.sh
+++ b/vxquery-server/src/main/resources/scripts/startcc.sh
@@ -51,13 +51,15 @@ mkdir -p ${CCLOGS_DIR}
 
 # Set up the options for the cc.
 CC_OPTIONS=" -client-net-ip-address ${CCHOST} -cluster-net-ip-address ${CCHOST} "
-[ "${CCPORT}" ] {
+[ "${CCPORT}" ] &&
+
     CC_OPTIONS=" ${CC_OPTIONS} -client-net-port ${CCPORT} "
-}
 
-[ "$CCOPTS" ] && {
+
+[ "${CCOPTS}" ] &&
+
     CC_OPTIONS=" ${CC_OPTIONS} ${CCOPTS}"
-}
+
 
 echo "${JAVA_OPTS}" &> ${CCLOGS_DIR}/cc.log
 

http://git-wip-us.apache.org/repos/asf/vxquery/blob/6d2732fa/vxquery-server/src/main/resources/scripts/startnc.sh
----------------------------------------------------------------------
diff --git a/vxquery-server/src/main/resources/scripts/startnc.sh b/vxquery-server/src/main/resources/scripts/startnc.sh
index acf62c0..a199ec8 100755
--- a/vxquery-server/src/main/resources/scripts/startnc.sh
+++ b/vxquery-server/src/main/resources/scripts/startnc.sh
@@ -53,13 +53,15 @@ mkdir -p $NCLOGS_DIR
 
 # Set up the options for the cc.
 NC_OPTIONS=" -cc-host ${CCHOST} -cluster-net-ip-address ${IPADDR}  -data-ip-address ${IPADDR} -result-ip-address ${IPADDR}  -node-id ${NODEID} "
-[ "${CCPORT}" ] {
+[ "${CCPORT}" ] &&
+
 	NC_OPTIONS=" ${NC_OPTIONS} -cc-port ${CCPORT} "
-}
 
-[ "${NCOPTS}" ] {
+
+[ "${NCOPTS}" ] &&
+
     NC_OPTIONS=" ${NC_OPTIONS} ${NCOPTS} "
-}
+
 
 echo "${JAVA_OPTS}" &> ${NCLOGS_DIR}/nc.log