Commit 1ee065bb authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2004-01-23 15:41:48 by cmiachon] added CQLp

Original author: cmiachon
Date: 2004-01-23 15:41:48+00:00
parent 66ce486d
......@@ -62,7 +62,7 @@ let fun get-year-from-date(Date -> Year)
|[y::(_ _ _ _) _*] -> y
;;
(* In CQLx based on the XQUERY's query)
let end_dates = [items]/Item_tuple/End_date
in <result>
......@@ -78,6 +78,21 @@ in <result>
)in [x]
;;
(* In CQLp *)
let months = select months
from <items>[i::Item_tuple*] in [items],
<item_tuple>[ _* e::End_date ;_ ] in i,
<end_date>['1999-' months::(_ _) '-'_*] in e
in <result>
select <monthly_result>[
<month>m
<item_count>(count(select m2
from m2 in months
where m=m2))]
from m in order(distinct_values(months))
;;
(* in XQUERY
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment