You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vxquery.apache.org by vi...@apache.org on 2014/04/10 00:21:03 UTC

[08/51] [abbrv] Updated the testing resources.

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-1/q04_sensors.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-1/q04_sensors.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-1/q04_sensors.xq
new file mode 100644
index 0000000..18f5929
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-1/q04_sensors.xq
@@ -0,0 +1,8 @@
+(: XQuery Join Query :)
+(: Find all the weather readings for Washington state for a specific day    :)
+(: 2002-2-2.                                                                  :)
+let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+for $r in collection($sensor_collection)/dataCollection/data
+    
+where xs:dateTime(fn:data($r/date)) eq xs:dateTime("2002-02-02T00:00:00.000")
+return $r
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-1/q04_stations.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-1/q04_stations.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-1/q04_stations.xq
new file mode 100644
index 0000000..d7630f0
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-1/q04_stations.xq
@@ -0,0 +1,8 @@
+(: XQuery Join Query :)
+(: Find all the weather readings for Washington state for a specific day    :)
+(: 2002-2-2.                                                                  :)
+let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+for $s in collection($station_collection)/stationCollection/station
+
+where (some $x in $s/locationLabels satisfies ($x/type eq "ST" and fn:upper-case(fn:data($x/displayName)) eq "STATE 1"))
+return $s
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-1/q05.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-1/q05.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-1/q05.xq
new file mode 100644
index 0000000..df822a1
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-1/q05.xq
@@ -0,0 +1,16 @@
+(: XQuery Join Aggregate Query :)
+(: Find the lowest recorded temperature (TMIN) in the United States for     :)
+(: 2001.                                                                      :)
+fn:min(
+    let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $s in collection($station_collection)/stationCollection/station
+    
+    let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r in collection($sensor_collection)/dataCollection/data
+    
+    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
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-1/q06.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-1/q06.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-1/q06.xq
new file mode 100644
index 0000000..ed9bdb0
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-1/q06.xq
@@ -0,0 +1,13 @@
+(: XQuery Join Query :)
+(: Find the highest recorded temperature (TMAX) for each station for each     :)
+(: day over the year 2002.                                                    :)
+let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+for $s in collection($station_collection)/stationCollection/station
+
+let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+for $r in collection($sensor_collection)/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 2002
+return ($s/displayName, $r/date, $r/value)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-1/q07.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-1/q07.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-1/q07.xq
new file mode 100644
index 0000000..d0e8c48
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-1/q07.xq
@@ -0,0 +1,16 @@
+(: 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 := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r_min in collection($sensor_collection_min)/dataCollection/data
+    
+    let $sensor_collection_max := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r_max in collection($sensor_collection_max)/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/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-2/q00.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-2/q00.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-2/q00.xq
new file mode 100644
index 0000000..64636bc
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-2/q00.xq
@@ -0,0 +1,11 @@
+(: XQuery Filter Query :)
+(: See historical data for Riverside, CA (AS000000003) station by selecting   :)
+(: the weather readings for December 25 over the last 10 years.               :)
+let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+for $r in collection($collection)/dataCollection/data
+let $datetime := xs:dateTime(fn:data($r/date))
+where $r/station eq "GHCND:AS000000003" 
+    and fn:year-from-dateTime($datetime) ge 2000
+    and fn:month-from-dateTime($datetime) eq 3 
+    and fn:day-from-dateTime($datetime) eq 3
+return $r
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-2/q01.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-2/q01.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-2/q01.xq
new file mode 100644
index 0000000..4e1edc5
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-2/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 := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+for $r in collection($collection)/dataCollection/data
+where $r/dataType eq "AWND" and xs:decimal(fn:data($r/value)) gt 491.744
+return $r
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-2/q02.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-2/q02.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-2/q02.xq
new file mode 100644
index 0000000..fac6bf0
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-2/q02.xq
@@ -0,0 +1,11 @@
+(: XQuery Aggregate Query :)
+(: Find the annual precipitation (PRCP) for a Seattle using the airport       :)
+(: station (US000000002) for 2002.                                            :)
+fn:sum(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/station eq "GHCND:US000000002" 
+        and $r/dataType eq "PRCP" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2002
+    return $r/value
+) div 10
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-2/q03.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-2/q03.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-2/q03.xq
new file mode 100644
index 0000000..ce3d0d3
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-2/q03.xq
@@ -0,0 +1,8 @@
+(: XQuery Aggregate Query :)
+(: Find the highest recorded temperature (TMAX) in Celsius.                   :)
+fn:max(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "TMAX"
+    return $r/value
+) div 10
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-2/q04.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-2/q04.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-2/q04.xq
new file mode 100644
index 0000000..5d6d1d1
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-2/q04.xq
@@ -0,0 +1,13 @@
+(: XQuery Join Query :)
+(: Find all the weather readings for Washington state for a specific day    :)
+(: 2002-2-2.                                                                  :)
+let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+for $s in collection($station_collection)/stationCollection/station
+
+let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+for $r in collection($sensor_collection)/dataCollection/data
+    
+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 "STATE 1"))
+    and xs:dateTime(fn:data($r/date)) eq xs:dateTime("2002-02-02T00:00:00.000")
+return $r
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-2/q05.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-2/q05.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-2/q05.xq
new file mode 100644
index 0000000..15b98c1
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-2/q05.xq
@@ -0,0 +1,16 @@
+(: XQuery Join Aggregate Query :)
+(: Find the lowest recorded temperature (TMIN) in the United States for     :)
+(: 2001.                                                                      :)
+fn:min(
+    let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $s in collection($station_collection)/stationCollection/station
+    
+    let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r in collection($sensor_collection)/dataCollection/data
+    
+    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
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-2/q06.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-2/q06.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-2/q06.xq
new file mode 100644
index 0000000..df17713
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-2/q06.xq
@@ -0,0 +1,13 @@
+(: XQuery Join Query :)
+(: Find the highest recorded temperature (TMAX) for each station for each     :)
+(: day over the year 2002.                                                    :)
+let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+for $s in collection($station_collection)/stationCollection/station
+
+let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+for $r in collection($sensor_collection)/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 2002
+return ($s/displayName, $r/date, $r/value)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-2/q07.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-2/q07.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-2/q07.xq
new file mode 100644
index 0000000..2debae0
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-2/q07.xq
@@ -0,0 +1,16 @@
+(: 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 := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r_min in collection($sensor_collection_min)/dataCollection/data
+    
+    let $sensor_collection_max := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r_max in collection($sensor_collection_max)/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/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-4/q00.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-4/q00.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-4/q00.xq
new file mode 100644
index 0000000..e130e2a
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-4/q00.xq
@@ -0,0 +1,11 @@
+(: XQuery Filter Query :)
+(: See historical data for Riverside, CA (AS000000003) station by selecting   :)
+(: the weather readings for December 25 over the last 10 years.               :)
+let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+for $r in collection($collection)/dataCollection/data
+let $datetime := xs:dateTime(fn:data($r/date))
+where $r/station eq "GHCND:AS000000003" 
+    and fn:year-from-dateTime($datetime) ge 2000
+    and fn:month-from-dateTime($datetime) eq 3 
+    and fn:day-from-dateTime($datetime) eq 3
+return $r
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-4/q01.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-4/q01.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-4/q01.xq
new file mode 100644
index 0000000..bad94e4
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-4/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 := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+for $r in collection($collection)/dataCollection/data
+where $r/dataType eq "AWND" and xs:decimal(fn:data($r/value)) gt 491.744
+return $r
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-4/q02.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-4/q02.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-4/q02.xq
new file mode 100644
index 0000000..f4c2722
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-4/q02.xq
@@ -0,0 +1,11 @@
+(: XQuery Aggregate Query :)
+(: Find the annual precipitation (PRCP) for a Seattle using the airport       :)
+(: station (US000000002) for 2002.                                            :)
+fn:sum(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/station eq "GHCND:US000000002" 
+        and $r/dataType eq "PRCP" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2002
+    return $r/value
+) div 10
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-4/q03.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-4/q03.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-4/q03.xq
new file mode 100644
index 0000000..7199c97
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-4/q03.xq
@@ -0,0 +1,8 @@
+(: XQuery Aggregate Query :)
+(: Find the highest recorded temperature (TMAX) in Celsius.                   :)
+fn:max(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "TMAX"
+    return $r/value
+) div 10
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-4/q04.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-4/q04.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-4/q04.xq
new file mode 100644
index 0000000..cdf85dd
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-4/q04.xq
@@ -0,0 +1,13 @@
+(: XQuery Join Query :)
+(: Find all the weather readings for Washington state for a specific day    :)
+(: 2002-2-2.                                                                  :)
+let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+for $s in collection($station_collection)/stationCollection/station
+
+let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+for $r in collection($sensor_collection)/dataCollection/data
+    
+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 "STATE 1"))
+    and xs:dateTime(fn:data($r/date)) eq xs:dateTime("2002-02-02T00:00:00.000")
+return $r
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-4/q05.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-4/q05.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-4/q05.xq
new file mode 100644
index 0000000..5036305
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-4/q05.xq
@@ -0,0 +1,16 @@
+(: XQuery Join Aggregate Query :)
+(: Find the lowest recorded temperature (TMIN) in the United States for     :)
+(: 2001.                                                                      :)
+fn:min(
+    let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $s in collection($station_collection)/stationCollection/station
+    
+    let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r in collection($sensor_collection)/dataCollection/data
+    
+    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
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-4/q06.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-4/q06.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-4/q06.xq
new file mode 100644
index 0000000..51c474d
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-4/q06.xq
@@ -0,0 +1,13 @@
+(: XQuery Join Query :)
+(: Find the highest recorded temperature (TMAX) for each station for each     :)
+(: day over the year 2002.                                                    :)
+let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+for $s in collection($station_collection)/stationCollection/station
+
+let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+for $r in collection($sensor_collection)/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 2002
+return ($s/displayName, $r/date, $r/value)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-4/q07.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-4/q07.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-4/q07.xq
new file mode 100644
index 0000000..a508e52
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/Ghcnd/Partition-4/q07.xq
@@ -0,0 +1,16 @@
+(: 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 := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r_min in collection($sensor_collection_min)/dataCollection/data
+    
+    let $sensor_collection_max := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r_max in collection($sensor_collection_max)/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/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-1/q02_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-1/q02_count.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-1/q02_count.xq
new file mode 100644
index 0000000..73e8aea
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-1/q02_count.xq
@@ -0,0 +1,11 @@
+(: XQuery Aggregate Query :)
+(: Find the annual precipitation (PRCP) for a Seattle using the airport       :)
+(: station (US000000002) for 2002.                                            :)
+fn:count(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/station eq "GHCND:US000000002" 
+        and $r/dataType eq "PRCP" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2002
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-1/q03_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-1/q03_count.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-1/q03_count.xq
new file mode 100644
index 0000000..0d327d1
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-1/q03_count.xq
@@ -0,0 +1,8 @@
+(: XQuery Aggregate Query :)
+(: Find the highest recorded temperature (TMAX) in Celsius.                   :)
+fn:count(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "TMAX"
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-1/q05_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-1/q05_count.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-1/q05_count.xq
new file mode 100644
index 0000000..9f2ac93
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-1/q05_count.xq
@@ -0,0 +1,16 @@
+(: XQuery Join Aggregate Query :)
+(: Find the lowest recorded temperature (TMIN) in the United States for     :)
+(: 2001.                                                                      :)
+fn:count(
+    let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $s in collection($station_collection)/stationCollection/station
+    
+    let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r in collection($sensor_collection)/dataCollection/data
+    
+    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
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-1/q07_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-1/q07_count.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-1/q07_count.xq
new file mode 100644
index 0000000..917b7c6
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-1/q07_count.xq
@@ -0,0 +1,16 @@
+(: 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 := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r_min in collection($sensor_collection_min)/dataCollection/data
+    
+    let $sensor_collection_max := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r_max in collection($sensor_collection_max)/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
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-2/q02_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-2/q02_count.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-2/q02_count.xq
new file mode 100644
index 0000000..52e7790
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-2/q02_count.xq
@@ -0,0 +1,11 @@
+(: XQuery Aggregate Query :)
+(: Find the annual precipitation (PRCP) for a Seattle using the airport       :)
+(: station (US000000002) for 2002.                                            :)
+fn:count(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/station eq "GHCND:US000000002" 
+        and $r/dataType eq "PRCP" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2002
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-2/q03_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-2/q03_count.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-2/q03_count.xq
new file mode 100644
index 0000000..619c6d1
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-2/q03_count.xq
@@ -0,0 +1,8 @@
+(: XQuery Aggregate Query :)
+(: Find the highest recorded temperature (TMAX) in Celsius.                   :)
+fn:count(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "TMAX"
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-2/q05_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-2/q05_count.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-2/q05_count.xq
new file mode 100644
index 0000000..c32bcd1
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-2/q05_count.xq
@@ -0,0 +1,16 @@
+(: XQuery Join Aggregate Query :)
+(: Find the lowest recorded temperature (TMIN) in the United States for     :)
+(: 2001.                                                                      :)
+fn:count(
+    let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $s in collection($station_collection)/stationCollection/station
+    
+    let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r in collection($sensor_collection)/dataCollection/data
+    
+    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
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-2/q07_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-2/q07_count.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-2/q07_count.xq
new file mode 100644
index 0000000..fd3431f
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-2/q07_count.xq
@@ -0,0 +1,16 @@
+(: 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 := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r_min in collection($sensor_collection_min)/dataCollection/data
+    
+    let $sensor_collection_max := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r_max in collection($sensor_collection_max)/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
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-4/q02_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-4/q02_count.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-4/q02_count.xq
new file mode 100644
index 0000000..2940380
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-4/q02_count.xq
@@ -0,0 +1,11 @@
+(: XQuery Aggregate Query :)
+(: Find the annual precipitation (PRCP) for a Seattle using the airport       :)
+(: station (US000000002) for 2002.                                            :)
+fn:count(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/station eq "GHCND:US000000002" 
+        and $r/dataType eq "PRCP" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2002
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-4/q03_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-4/q03_count.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-4/q03_count.xq
new file mode 100644
index 0000000..eb6ff10
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-4/q03_count.xq
@@ -0,0 +1,8 @@
+(: XQuery Aggregate Query :)
+(: Find the highest recorded temperature (TMAX) in Celsius.                   :)
+fn:count(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "TMAX"
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-4/q05_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-4/q05_count.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-4/q05_count.xq
new file mode 100644
index 0000000..768e35d
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-4/q05_count.xq
@@ -0,0 +1,16 @@
+(: XQuery Join Aggregate Query :)
+(: Find the lowest recorded temperature (TMIN) in the United States for     :)
+(: 2001.                                                                      :)
+fn:count(
+    let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $s in collection($station_collection)/stationCollection/station
+    
+    let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r in collection($sensor_collection)/dataCollection/data
+    
+    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
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-4/q07_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-4/q07_count.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-4/q07_count.xq
new file mode 100644
index 0000000..8ea026b
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndCount/Partition-4/q07_count.xq
@@ -0,0 +1,16 @@
+(: 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 := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r_min in collection($sensor_collection_min)/dataCollection/data
+    
+    let $sensor_collection_max := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r_max in collection($sensor_collection_max)/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
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-1/q02_records.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-1/q02_records.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-1/q02_records.xq
new file mode 100644
index 0000000..68b87b5
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-1/q02_records.xq
@@ -0,0 +1,9 @@
+(: XQuery Aggregate Query :)
+(: Find the annual precipitation (PRCP) for a Seattle using the airport       :)
+(: station (US000000002) for 2002.                                            :)
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/station eq "GHCND:US000000002" 
+        and $r/dataType eq "PRCP" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2002
+    return $r/value

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-1/q03_records.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-1/q03_records.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-1/q03_records.xq
new file mode 100644
index 0000000..8a22c5e
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-1/q03_records.xq
@@ -0,0 +1,6 @@
+(: XQuery Aggregate Query :)
+(: Find the highest recorded temperature (TMAX) in Celsius.                   :)
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "TMAX"
+    return $r/value

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-1/q05_records.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-1/q05_records.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-1/q05_records.xq
new file mode 100644
index 0000000..0cd735d
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-1/q05_records.xq
@@ -0,0 +1,14 @@
+(: XQuery Join Aggregate Query :)
+(: Find the lowest recorded temperature (TMIN) in the United States for     :)
+(: 2001.                                                                      :)
+    let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $s in collection($station_collection)/stationCollection/station
+    
+    let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r in collection($sensor_collection)/dataCollection/data
+    
+    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

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-1/q07_records.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-1/q07_records.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-1/q07_records.xq
new file mode 100644
index 0000000..793fbba
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-1/q07_records.xq
@@ -0,0 +1,14 @@
+(: XQuery Self Join Query :)
+(: Self join with all stations finding the difference in min and max       :)
+(: temperature and get the average.                                        :)
+    let $sensor_collection_min := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r_min in collection($sensor_collection_min)/dataCollection/data
+    
+    let $sensor_collection_max := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r_max in collection($sensor_collection_max)/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

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-2/q02_records.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-2/q02_records.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-2/q02_records.xq
new file mode 100644
index 0000000..4b14f55
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-2/q02_records.xq
@@ -0,0 +1,9 @@
+(: XQuery Aggregate Query :)
+(: Find the annual precipitation (PRCP) for a Seattle using the airport       :)
+(: station (US000000002) for 2002.                                            :)
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/station eq "GHCND:US000000002" 
+        and $r/dataType eq "PRCP" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2002
+    return $r/value

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-2/q03_records.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-2/q03_records.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-2/q03_records.xq
new file mode 100644
index 0000000..581644a
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-2/q03_records.xq
@@ -0,0 +1,6 @@
+(: XQuery Aggregate Query :)
+(: Find the highest recorded temperature (TMAX) in Celsius.                   :)
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "TMAX"
+    return $r/value

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-2/q05_records.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-2/q05_records.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-2/q05_records.xq
new file mode 100644
index 0000000..83b4683
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-2/q05_records.xq
@@ -0,0 +1,14 @@
+(: XQuery Join Aggregate Query :)
+(: Find the lowest recorded temperature (TMIN) in the United States for     :)
+(: 2001.                                                                      :)
+    let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $s in collection($station_collection)/stationCollection/station
+    
+    let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r in collection($sensor_collection)/dataCollection/data
+    
+    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

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-2/q07_records.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-2/q07_records.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-2/q07_records.xq
new file mode 100644
index 0000000..1948ba0
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-2/q07_records.xq
@@ -0,0 +1,14 @@
+(: XQuery Self Join Query :)
+(: Self join with all stations finding the difference in min and max       :)
+(: temperature and get the average.                                        :)
+    let $sensor_collection_min := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r_min in collection($sensor_collection_min)/dataCollection/data
+    
+    let $sensor_collection_max := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r_max in collection($sensor_collection_max)/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

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-4/q02_records.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-4/q02_records.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-4/q02_records.xq
new file mode 100644
index 0000000..8fb560b
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-4/q02_records.xq
@@ -0,0 +1,9 @@
+(: XQuery Aggregate Query :)
+(: Find the annual precipitation (PRCP) for a Seattle using the airport       :)
+(: station (US000000002) for 2002.                                            :)
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/station eq "GHCND:US000000002" 
+        and $r/dataType eq "PRCP" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2002
+    return $r/value

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-4/q03_records.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-4/q03_records.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-4/q03_records.xq
new file mode 100644
index 0000000..835e3b2
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-4/q03_records.xq
@@ -0,0 +1,6 @@
+(: XQuery Aggregate Query :)
+(: Find the highest recorded temperature (TMAX) in Celsius.                   :)
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "TMAX"
+    return $r/value

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-4/q05_records.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-4/q05_records.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-4/q05_records.xq
new file mode 100644
index 0000000..664e91b
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-4/q05_records.xq
@@ -0,0 +1,14 @@
+(: XQuery Join Aggregate Query :)
+(: Find the lowest recorded temperature (TMIN) in the United States for     :)
+(: 2001.                                                                      :)
+    let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $s in collection($station_collection)/stationCollection/station
+    
+    let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r in collection($sensor_collection)/dataCollection/data
+    
+    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

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-4/q07_records.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-4/q07_records.xq b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-4/q07_records.xq
new file mode 100644
index 0000000..6f8c165
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/Queries/XQuery/GhcndRecords/Partition-4/q07_records.xq
@@ -0,0 +1,14 @@
+(: XQuery Self Join Query :)
+(: Self join with all stations finding the difference in min and max       :)
+(: temperature and get the average.                                        :)
+    let $sensor_collection_min := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r_min in collection($sensor_collection_min)/dataCollection/data
+    
+    let $sensor_collection_max := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r_max in collection($sensor_collection_max)/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

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/TestSources/ghcnd/half_1/quarter_1/sesnors/US000000001_200101_0.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/TestSources/ghcnd/half_1/quarter_1/sesnors/US000000001_200101_0.xml b/vxquery-xtest/src/tests/resources/TestSources/ghcnd/half_1/quarter_1/sesnors/US000000001_200101_0.xml
new file mode 100644
index 0000000..cc2fd33
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/TestSources/ghcnd/half_1/quarter_1/sesnors/US000000001_200101_0.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?><dataCollection pageCount="1" totalCount="3"><data><date>2001-01-01T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:US000000001</station><value>11.25</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data><data><date>2001-01-01T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:US000000001</station><value>31</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data><data><date>2001-01-01T00:00:00.000</date><dataType>AWND</dataType><station>GHCND:US000000001</station><value>1000</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data></dataCollection>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/TestSources/ghcnd/half_1/quarter_1/stations/US000000001.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/TestSources/ghcnd/half_1/quarter_1/stations/US000000001.xml b/vxquery-xtest/src/tests/resources/TestSources/ghcnd/half_1/quarter_1/stations/US000000001.xml
new file mode 100644
index 0000000..213f748
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/TestSources/ghcnd/half_1/quarter_1/stations/US000000001.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?><stationCollection pageSize="100" pageCount="1" totalCount="1"><station><id>GHCND:US000000001</id><displayName>Station 1</displayName><latitude>10.000</latitude><longitude>-10.000</longitude><elevation>1000.0</elevation><locationLabels><type>ST</type><id>FIPS:1</id><displayName>State 1</displayName></locationLabels><locationLabels><type>CNTY</type><id>FIPS:-9999</id><displayName>County 1</displayName></locationLabels><locationLabels><type>CNTRY</type><id>FIPS:US</id><displayName>UNITED STATES</displayName></locationLabels></station></stationCollection>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/TestSources/ghcnd/half_1/quarter_2/sesnors/US000000002_200202_0.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/TestSources/ghcnd/half_1/quarter_2/sesnors/US000000002_200202_0.xml b/vxquery-xtest/src/tests/resources/TestSources/ghcnd/half_1/quarter_2/sesnors/US000000002_200202_0.xml
new file mode 100644
index 0000000..c095726
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/TestSources/ghcnd/half_1/quarter_2/sesnors/US000000002_200202_0.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?><dataCollection pageCount="1" totalCount="3"><data><date>2002-02-02T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:US000000002</station><value>12.5</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data><data><date>2002-02-02T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:US000000002</station><value>32</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data><data><date>2002-02-02T00:00:00.000</date><dataType>PRCP</dataType><station>GHCND:US000000002</station><value>20</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data></dataCollection>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/TestSources/ghcnd/half_1/quarter_2/stations/US000000004.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/TestSources/ghcnd/half_1/quarter_2/stations/US000000004.xml b/vxquery-xtest/src/tests/resources/TestSources/ghcnd/half_1/quarter_2/stations/US000000004.xml
new file mode 100644
index 0000000..3bcec27
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/TestSources/ghcnd/half_1/quarter_2/stations/US000000004.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?><stationCollection pageSize="100" pageCount="1" totalCount="1"><station><id>GHCND:US000000004</id><displayName>Station 4</displayName><latitude>40.000</latitude><longitude>-40.000</longitude><elevation>4000.0</elevation><locationLabels><type>ST</type><id>FIPS:1</id><displayName>State 4</displayName></locationLabels><locationLabels><type>CNTY</type><id>FIPS:-9999</id><displayName>County 4</displayName></locationLabels><locationLabels><type>CNTRY</type><id>FIPS:US</id><displayName>UNITED STATES</displayName></locationLabels></station></stationCollection>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/TestSources/ghcnd/half_2/quarter_3/sesnors/AS000000003_200303_0.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/TestSources/ghcnd/half_2/quarter_3/sesnors/AS000000003_200303_0.xml b/vxquery-xtest/src/tests/resources/TestSources/ghcnd/half_2/quarter_3/sesnors/AS000000003_200303_0.xml
new file mode 100644
index 0000000..3a540d3
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/TestSources/ghcnd/half_2/quarter_3/sesnors/AS000000003_200303_0.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?><dataCollection pageCount="1" totalCount="2"><data><date>2003-03-03T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:AS000000003</station><value>13.75</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data><data><date>2003-03-03T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:AS000000003</station><value>33</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data></dataCollection>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/TestSources/ghcnd/half_2/quarter_3/stations/US000000002.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/TestSources/ghcnd/half_2/quarter_3/stations/US000000002.xml b/vxquery-xtest/src/tests/resources/TestSources/ghcnd/half_2/quarter_3/stations/US000000002.xml
new file mode 100644
index 0000000..e9dc6e9
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/TestSources/ghcnd/half_2/quarter_3/stations/US000000002.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?><stationCollection pageSize="100" pageCount="1" totalCount="1"><station><id>GHCND:US000000002</id><displayName>Station 2</displayName><latitude>20.000</latitude><longitude>-20.000</longitude><elevation>2000.0</elevation><locationLabels><type>ST</type><id>FIPS:1</id><displayName>State 1</displayName></locationLabels><locationLabels><type>CNTY</type><id>FIPS:-9999</id><displayName>County 2</displayName></locationLabels><locationLabels><type>CNTRY</type><id>FIPS:US</id><displayName>UNITED STATES</displayName></locationLabels></station></stationCollection>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/TestSources/ghcnd/half_2/quarter_4/sesnors/US000000004_200404_0.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/TestSources/ghcnd/half_2/quarter_4/sesnors/US000000004_200404_0.xml b/vxquery-xtest/src/tests/resources/TestSources/ghcnd/half_2/quarter_4/sesnors/US000000004_200404_0.xml
new file mode 100644
index 0000000..2dbe586
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/TestSources/ghcnd/half_2/quarter_4/sesnors/US000000004_200404_0.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?><dataCollection pageCount="1" totalCount="2"><data><date>2004-04-04T00:00:00.000</date><dataType>PRCP</dataType><station>GHCND:US000000004</station><value>40</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data><data><date>2004-04-04T00:00:00.000</date><dataType>AWND</dataType><station>GHCND:US000000004</station><value>4</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data></dataCollection>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/TestSources/ghcnd/half_2/quarter_4/stations/AS000000003.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/TestSources/ghcnd/half_2/quarter_4/stations/AS000000003.xml b/vxquery-xtest/src/tests/resources/TestSources/ghcnd/half_2/quarter_4/stations/AS000000003.xml
new file mode 100644
index 0000000..4919c20
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/TestSources/ghcnd/half_2/quarter_4/stations/AS000000003.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?><stationCollection pageSize="100" pageCount="1" totalCount="1"><station><id>GHCND:AS000000003</id><displayName>Station 3</displayName><latitude>-30.000</latitude><longitude>30.000</longitude><locationLabels><type>CNTRY</type><id>FIPS:AS</id><displayName>AUSTRALIA</displayName></locationLabels></station></stationCollection>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/VXQueryCatalog.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/VXQueryCatalog.xml b/vxquery-xtest/src/tests/resources/VXQueryCatalog.xml
new file mode 100644
index 0000000..f396f98
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/VXQueryCatalog.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE test-suite [
+
+<!ENTITY AggregatePartition1Queries SYSTEM "cat/AggregatePartition1Queries.xml">
+<!ENTITY AggregatePartition2Queries SYSTEM "cat/AggregatePartition2Queries.xml">
+<!ENTITY AggregatePartition4Queries SYSTEM "cat/AggregatePartition4Queries.xml">
+
+<!ENTITY GhcndPartition1Queries SYSTEM "cat/GhcndPartition1Queries.xml">
+<!ENTITY GhcndPartition2Queries SYSTEM "cat/GhcndPartition2Queries.xml">
+<!ENTITY GhcndPartition4Queries SYSTEM "cat/GhcndPartition4Queries.xml">
+
+<!ENTITY GhcndRecordsPartition1Queries SYSTEM "cat/GhcndRecordsPartition1Queries.xml">
+<!ENTITY GhcndRecordsPartition2Queries SYSTEM "cat/GhcndRecordsPartition2Queries.xml">
+<!ENTITY GhcndRecordsPartition4Queries SYSTEM "cat/GhcndRecordsPartition4Queries.xml">
+
+<!ENTITY GhcndCountPartition1Queries SYSTEM "cat/GhcndCountPartition1Queries.xml">
+<!ENTITY GhcndCountPartition2Queries SYSTEM "cat/GhcndCountPartition2Queries.xml">
+<!ENTITY GhcndCountPartition4Queries SYSTEM "cat/GhcndCountPartition4Queries.xml">
+
+]>
+<test-suite xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            CatalogDesignDate="2014-04-01"
+            version="0.0.1"
+            SourceOffsetPath="./"
+            ResultOffsetPath="ExpectedTestResults/"
+            XQueryQueryOffsetPath="Queries/XQuery/"
+            XQueryXQueryOffsetPath="Queries/XQueryX/"
+            XQueryFileExtension=".xq"
+            XQueryXFileExtension=".xqx"
+            xsi:schemaLocation="http://www.w3.org/2005/02/query-test-XQTSCatalog XQTSCatalog.xsd">
+   <test-suite-info>
+      <title>VXQuery Test Suite</title>
+      <description> 
+         Test Suite for VXQuery. 
+      </description>
+   </test-suite-info>
+   <test-group name="AggregatePartitionQueries" featureOwner="Preston Carman">
+      <GroupInfo>
+         <title>Aggregate Partition Queries</title>
+         <description/>
+      </GroupInfo>
+      <test-group name="AggregateParallelExecutionTests" featureOwner="Preston Carman">
+         <GroupInfo>
+            <title>Aggregate Parallel Execution Tests</title>
+            <description/>
+         </GroupInfo>
+         &AggregatePartition1Queries;
+         &AggregatePartition2Queries;
+         &AggregatePartition4Queries;
+      </test-group>
+   </test-group>
+   <test-group name="GhcndPartitionQueries" featureOwner="Preston Carman">
+      <GroupInfo>
+         <title>GHCND Partition Queries</title>
+         <description/>
+      </GroupInfo>
+      <test-group name="ParallelExecutionTests" featureOwner="Preston Carman">
+         <GroupInfo>
+            <title>Parallel Execution Tests</title>
+            <description/>
+         </GroupInfo>
+         &GhcndPartition1Queries;
+         &GhcndPartition2Queries;
+         &GhcndPartition4Queries;
+      </test-group>
+   </test-group>
+   <test-group name="GhcndCountPartitionQueries" featureOwner="Preston Carman">
+      <GroupInfo>
+         <title>GHCND Count Partition Queries</title>
+         <description/>
+      </GroupInfo>
+      <test-group name="CountParallelExecutionTests" featureOwner="Preston Carman">
+         <GroupInfo>
+            <title>Parallel Execution Tests</title>
+            <description/>
+         </GroupInfo>
+         &GhcndCountPartition1Queries;
+         &GhcndCountPartition2Queries;
+         &GhcndCountPartition4Queries;
+      </test-group>
+   </test-group>
+   <test-group name="GhcndRecordsPartitionQueries" featureOwner="Preston Carman">
+      <GroupInfo>
+         <title>GHCND Records Partition Queries</title>
+         <description/>
+      </GroupInfo>
+      <test-group name="RecordsParallelExecutionTests" featureOwner="Preston Carman">
+         <GroupInfo>
+            <title>Records Parallel Execution Tests</title>
+            <description/>
+         </GroupInfo>
+         &GhcndRecordsPartition1Queries;
+         &GhcndRecordsPartition2Queries;
+         &GhcndRecordsPartition4Queries;
+      </test-group>
+   </test-group>
+</test-suite>

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/cat/AggregatePartition1Queries.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/cat/AggregatePartition1Queries.xml b/vxquery-xtest/src/tests/resources/cat/AggregatePartition1Queries.xml
new file mode 100644
index 0000000..c901468
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/cat/AggregatePartition1Queries.xml
@@ -0,0 +1,31 @@
+<test-group xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog" name="AggregatePartition1Queries" featureOwner="VXQuery">
+   <GroupInfo>
+      <title>Aggregate Partition 1</title>
+      <description/>
+   </GroupInfo>
+   <test-case name="aggregate-partition-1-avg" FilePath="Aggregate/Partition-1/" Creator="Preston Carman">
+      <description>Count records returned for q02 from the weather benchmark with 1 partition.</description>
+      <query name="avg" date="2014-04-01"/>
+      <output-file compare="Text">avg.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="aggregate-partition-1-count" FilePath="Aggregate/Partition-1/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q02 from the weather benchmark with 1 partition.</description>
+      <query name="count" date="2014-04-01"/>
+      <output-file compare="Text">count.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="aggregate-partition-1-min" FilePath="Aggregate/Partition-1/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q05 from the weather benchmark with 1 partition.</description>
+      <query name="min" date="2014-04-01"/>
+      <output-file compare="Text">min.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="aggregate-partition-1-max" FilePath="Aggregate/Partition-1/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q07 from the weather benchmark with 1 partition.</description>
+      <query name="max" date="2014-04-01"/>
+      <output-file compare="Text">max.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="aggregate-partition-1-sum" FilePath="Aggregate/Partition-1/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q03 from the weather benchmark with 1 partition.</description>
+      <query name="sum" date="2014-04-01"/>
+      <output-file compare="Text">sum.txt</output-file>
+   </test-case>
+</test-group>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/16f26a65/vxquery-xtest/src/tests/resources/cat/AggregatePartition2Queries.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/tests/resources/cat/AggregatePartition2Queries.xml b/vxquery-xtest/src/tests/resources/cat/AggregatePartition2Queries.xml
new file mode 100644
index 0000000..a4ac807
--- /dev/null
+++ b/vxquery-xtest/src/tests/resources/cat/AggregatePartition2Queries.xml
@@ -0,0 +1,36 @@
+<test-group xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog" name="AggregatePartition2Queries" featureOwner="VXQuery">
+   <GroupInfo>
+      <title>Aggregate Partition 2</title>
+      <description/>
+   </GroupInfo>
+   <test-case is-XPath2="true" name="aggregate-partition-2-avg" FilePath="Aggregate/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q02 from the weather benchmark with 2 partition.</description>
+      <query name="avg" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">avg.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="aggregate-partition-2-count" FilePath="Aggregate/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q02 from the weather benchmark with 2 partition.</description>
+      <query name="count" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">count.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="aggregate-partition-2-min" FilePath="Aggregate/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q05 from the weather benchmark with 2 partition.</description>
+      <query name="min" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">min.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="aggregate-partition-2-max" FilePath="Aggregate/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q07 from the weather benchmark with 2 partition.</description>
+      <query name="max" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">max.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="aggregate-partition-2-sum" FilePath="Aggregate/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q03 from the weather benchmark with 2 partition.</description>
+      <query name="sum" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">sum.txt</output-file>
+   </test-case>
+</test-group>
\ No newline at end of file