\set avail random(0, 5)

select * from shoe_ready join shoe using (shoename) where total_avail = :avail;
