Question on SQL subselection support

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Mar 9 07:47:33 CST 2007


On 9/3/07 4:30 AM, "Bernet, Eytan" <eytan_bernet at mcgraw-hill.com> wrote:

Hi Eytan,

> 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...

Valentina have sub-selects. As well as UNION, EXCEPT , ..

Please check this 

http://www.valentina-db.com/dokuwiki/doku.php?id=paradigma:public:en:documen
tation:vsql:reference:reference


----------
To answer your question it needs start draw some simple example with some
set of example records .. Above explanation is too verbose :-)

Ivan ?

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list