Question on SQL subselection support

Bernet, Eytan eytan_bernet at mcgraw-hill.com
Thu Mar 8 20:30:46 CST 2007


I have a table that contains student assignments. It has one record for each
assignment per student, so I could have 3 students and they could each have
3 assignments. It also has the activity # they have been assigned, and what
attempt # of this activity it is - so for example, student A could have been
assigned activity B 3 times, and so they will have 3 records, each one with
attempt number 1, then 2, and then 3...


Can I issue a sub query with the SQL way for it to return to me the
following:

A list of all the highest attempt # assignments (max on attempt number) for
each student in a given list matching activities in an activity list? The
trick here is that for each student, and then activity for that student, the
highest attempt # (multiple students may have the same attempt number, and
the same activity #, but I want to return exactly 1 highest activity # for
each student and activity)

I know this may be out of the scope of this list, but I don't want to even
start going down this path if the Valentina SQL interface does not support
sub selections...


Thanks in advance
Eytan Bernet 


More information about the Valentina mailing list