Showing posts with label 402i. Show all posts
Showing posts with label 402i. Show all posts

Wednesday, March 7, 2012

Query to be resolved

Hi,
if anybody can reslove this sql query :
Fld1 Fld2
=== =====
1 100
1 200
2 400
2 401
2 402
=================
I tried but cud not suceed to bring this output :
fld1 fld2
===============
1 100
2 400
I think i could put forward my question clearly...pls try if anybody can
resolve it.
Thanks in advance.......
GDTry,
select fld1, min(fld2) as min_fld2
from t1
group by gld1
go
AMB
"Dubey Gopal" wrote:

> Hi,
> if anybody can reslove this sql query :
> Fld1 Fld2
> === =====
> 1 100
> 1 200
> 2 400
> 2 401
> 2 402
> =================
> I tried but cud not suceed to bring this output :
> fld1 fld2
> ===============
> 1 100
> 2 400
> I think i could put forward my question clearly...pls try if anybody can
> resolve it.
> Thanks in advance.......
> GD
>|||Thanks AMB...It is working fine !!
GD
"Alejandro Mesa" wrote:
> Try,
> select fld1, min(fld2) as min_fld2
> from t1
> group by gld1
> go
>
> AMB
> "Dubey Gopal" wrote:
>