XPATH Query Question
Hi,
I am trying to get all the orders under user. I am using below XPTAH query.
/jcr:root/home/users/a/admin/commerce/orders//element(*)[@orderId] this result below records :
/home/users/a/admin/commerce/orders/order-2014-Apr-12 /home/users/a/admin/commerce/orders/order-2015-Apr-15 /home/users/a/admin/commerce/orders/order-2015-Apr-13
Now i have requirements that order should be in the sorted order as per booked(that i am looking for) , Other is i will have dynamic parameter which will I pass through the method in which i have the XPTH query executed e.g. 6 or ALL . 6 will display the last 6 months order only (that i am looking for). For all orders i can use the above query with sort condition.
Below is QueryBuilder Query which also give me records but not for 6 months:
type=unstructured
path=/home/users/a/admin/commerce/orders
path.flat=true
orderby=@orderPlaced
orderby.sort=desc
Or some one has any idea about SQL2 Query for same use-case, Please tell.
Thanks