Here is my database, I need to determine which subjects a certain group studied, how to extract values with double nesting? Help me make a number.
domains
list_ocenok = symbol*
groupcast = groups*
vedomost = vedom*
name_fac, phamily, name, otchestvo,kafedra,predmet1,predmet2,number_fac, number_group = symbol
price, ocenka1, ocenka2 =real
groups = cast (phamily, name, otchestvo,kafedra ,vedomost)
groupstudents = groupstudents (name_fac, number_fac, number_group,groupcast)
vedom = ved(predmet1, ocenka1)
facts
dq1(number_group, number_fac)
min(number_group, groups)
predicates
group (groupstudents)
%q1 (number_group)
q3(number_group)
%q2(number_group)
q31(groupcast)
q32(vedomost)
clauses
group(groupstudents("Informatic","k-090301D","n-6201",[cast("Novikov","Sergey","Dmits","no",[ved("Inform",5)]),cast("Smal","Bob","Dmits","yes",[ved("Program",3)]),cast("Lara","Sara","Vas","no",[ved("Python",2)])])).
group(groupstudents("Scientist","k-050401D","n-6301",[cast("Ivanov","Mihail","Mihs","yes",[ved("Obchestvo",4)]),cast("Smith","Bob","Mihs","yes",[ved("Obchestvo",5)]),cast("Andry","Bob","Dmits","yes",[ved("History",5,)])])).
group(groupstudents("Literatura","k-123456D","n-6212",[cast("Smith","Sergey","Dmits","no",[ved("Liter",5)]),cast("Smith","Bob","Mihs","yes",[ved("Chtenie",4)]),cast("Andry","Bob","Dmits","yes",[ved("Liter",2)])])).
group(groupstudents("Lingvistic","k-066501D","n-5361",[cast("Malcev","Sergey","Dmits","no",[ved("England",4)]),cast("Sart","Bob","Vas","yes",[ved("England",4)]),cast("Andry","Bob","Dmits","yes",[ved("Germany")])])).