[Cubicweb] Complex RQL request

Stephane BUGAT stephane.bugat at edf.fr
Wed May 30 18:14:40 CEST 2012


Hi all

In our TERESA CW application, I'm trying to elaborate a RQL request to 
sort the number of resolved incidents during the last month per 
application and per incident type ('blocking', 'major' and so on).
My request is :

Any A,NA,NB WHERE A identity B
WITH A,NA BEING (Any C,SUM(F) GROUPBY C WHERE C is Application, C 
has_incident D, D gravite E, D nb_incidents_meme_nature F, D date_fin DF 
HAVING (E='majeur' AND MONTH(DF)=(MONTH(today)-1))),
     B,NB BEING (Any C,SUM(F) GROUPBY C WHERE C is Application, C 
has_incident D, D gravite E, D nb_incidents_meme_nature F, D date_fin DF 
HAVING (E='bloquant' AND MONTH(DF)=(MONTH(today)-1)))

The problem is that only applications having 'blocking' and 'major' 
incidents the same month are displayed. I have tried to add an "?" card to 
the has_incident relation but it doesn't work neither.
Any idea about that?

Thanks in advance

Stephane
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubicweb.org/pipermail/cubicweb/attachments/20120530/9f0b1052/attachment-0370.html>
-------------- next part --------------



Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme à sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.

Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez reçu ce Message par erreur, merci de le supprimer de votre système, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions également d'en avertir immédiatement l'expéditeur par retour du message.

Il est impossible de garantir que les communications par messagerie électronique arrivent en temps utile, sont sécurisées ou dénuées de toute erreur ou virus.
____________________________________________________

This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.

If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.

E-mail communication cannot be guaranteed to be timely secure, error or virus-free.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubicweb.org/pipermail/cubicweb/attachments/20120530/9f0b1052/attachment-0371.html>


More information about the Cubicweb mailing list