clear markdown compare help best fiddles feedback dbanow.uk a leap of faith?
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 930773 fiddles created (13221 in the last week).

create table my_result( city text, street text,street_num int, val_x int, val_y int);
 hidden batch(es)


insert into my_result values('CityA','Street abc',5,11.5,0.5);
1 rows affected
 hidden batch(es)


insert into my_result values('CityA' ,'Street abc' ,5,15.4,1.8);
1 rows affected
 hidden batch(es)


insert into my_result values('CityB' ,'Street xyz' ,18,15.4,1.8);
1 rows affected
 hidden batch(es)


insert into my_result values('CityB' ,'Street xyz' ,18,16.4,3.8);
1 rows affected
 hidden batch(es)


insert into my_result values('CityC' ,'Street klm' ,55,14.3,1.9);
1 rows affected
 hidden batch(es)


select city, street, street_num, val_x,val_y from (select city, street, street_num, val_x,val_y, row_number() over (partition by city order by city) rn from my_result) as tbl1 where rn=1;
city street street_num val_x val_y
CityA Street abc 5 12 1
CityB Street xyz 18 15 2
CityC Street klm 55 14 2
 hidden batch(es)