. , , 9 , , , -, - , .
, , SQl 9 , , , , . , , , , .
, , - , . , , , , , -, , . , , , rqeuirements. , , , , where, , . -, SQL.
create table
insert into
values (1, 'test') , (2, 'test2')
create table
insert into
values (1, 'othertest') , (1, 'othertest2'), (2, 'myothertest') , (1, 'othertest3')
select *
from
join
select t2.myid, t.mydescription
from
join
select distinct t2.myid, t.mydescription
from
join
select t.myid, t.mydescription, t2.myotherdescription
from
join
select distinct t.myid, t.mydescription, t2.myotherdescription
from
join
select t.myid, min(t2.myotherdescription)
from
join
group by t.myid
select t.myid, t2.myotherdescription
from
join
where t2.myid = 2