Hi,

I have a simple question for you:

I have already write find-questions query that works fine, but I need to add some statement that will evolve it to match only those questions whose ID is not equals to any already passed_question ID.

;;---- QUESTION TEMPLATE---;;
(deftemplate question
(slot conceptID (type INTEGER))
(slot ID (type INTEGER))
(slot group (type INTEGER))
(slot difficultyLevel (type INTEGER)))
;;---- PASSEDD QUESTION TEMPLATE---;;
(deftemplate passed_question
(slot ID (type INTEGER)))
 
;;--- DEFQUERY FIND-QUESTIONS ---;;
;;---FIND ALL QUESTIONS IN ONE GROUP---;;
;;--- THAT MATCH CURRENT CONCEPT, DIFFICULTY LEVEL ---;;
;;--- AND IS NOT ALREADY PASSEDD ---;;
 
(defquery find-questions
(declare (variables ?currConc ?group ?diffLev))
(question (conceptID ?a&: (eq ?a ?currConc)) (group ?b&: (eq ?b ?group)) (difficultyLevel ?c&: (eq ?c ?diffLev)) )
)
Could you help me to solve this problem?
Thanks.

Reply via email to