clear markdown help best fiddles feedback dbanow.uk
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. 2591531 fiddles created (45741 in the last week).

create table product as select generate_series(1, 10, 1) as id, random() as quantity
10 rows affected
10 rows affected
 hidden batch(es)


SELECT id FROM product WHERE quantity >= ALL(SELECT quantity FROM product)
id
4
id
4
 hidden batch(es)


SELECT id FROM product WHERE quantity = (SELECT MAX(quantity) FROM product)
id
4
id
4
 hidden batch(es)


insert into product (id, quantity) values (11, null)
1 rows affected
1 rows affected
 hidden batch(es)


SELECT id FROM product WHERE quantity >= ALL(SELECT quantity FROM product)
id
id
 hidden batch(es)


SELECT id FROM product WHERE quantity = (SELECT MAX(quantity) FROM product)
id
4
id
4
 hidden batch(es)