Comments on: Oracle SQL – Finding free adjacent seats in an airplane, using Subquery Factoring, Analytical Functions (LISTAGG and LEAD), Outer Join, PIVOT and good old INSTR https://technology.amis.nl/2013/03/04/oracle-sql-finding-free-adjacent-seats-in-an-airplane-using-subquery-factoring-analytical-functions-listagg-and-lead-outer-join-pivot-and-good-old-instr/ Friends of Oracle and Java Thu, 21 May 2015 20:49:51 +0000 hourly 1 http://wordpress.org/?v=4.2.2 By: Anton Scheffer https://technology.amis.nl/2013/03/04/oracle-sql-finding-free-adjacent-seats-in-an-airplane-using-subquery-factoring-analytical-functions-listagg-and-lead-outer-join-pivot-and-good-old-instr/#comment-7330 Wed, 06 Mar 2013 08:00:55 +0000 http://technology.amis.nl/?p=21930#comment-7330 Nice! One slight remark, For your random barding passes the good old sample clause is much more suitable
insert into boarding_passes( seat_id, more_details )
select id, ‘Seat was allocated’
from seats sample( 35 )

]]>