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. 1926624 fiddles created (21823 in the last week).

create table it0418 ( pno char(1) not null , price int not null ); insert into it0418 values ('A', 220), ('B', 160), ('C', 155), ('D', 245), ('E', 120), ('F', 215), ('G', 100);
 hidden batch(es)


select a.* , b.* , a.price + b.price from it0418 a join it0418 b on a.pno < b.pno order by 1,3;
pno price pno price a.price + b.price
A 220 B 160 380
A 220 C 155 375
A 220 D 245 465
A 220 E 120 340
A 220 F 215 435
A 220 G 100 320
B 160 C 155 315
B 160 D 245 405
B 160 E 120 280
B 160 F 215 375
B 160 G 100 260
C 155 D 245 400
C 155 E 120 275
C 155 F 215 370
C 155 G 100 255
D 245 E 120 365
D 245 F 215 460
D 245 G 100 345
E 120 F 215 335
E 120 G 100 220
F 215 G 100 315
 hidden batch(es)