Link to home
Start Free TrialLog in
Avatar of rwaterz
rwaterzFlag for United States of America

asked on

Finding pairs of seats

I need to perform a check to find out how many pairs of seats exist on a given performance. I can't do just a seat count because individual seats on opposite sides of the theatre are not desired. Here is a link to an image of the seat configuration and attached is a spreadsheet with the columns we have to work with:

https://securesite.lajollaplayhouse.org/_QA_/single/SYOS.aspx?p=9054

Note: The spreadsheet is the data related to the image provided.

I am having trouble figuring out a way to determine seats that are next to each other. Thanks for the help!
Capture.PNG
TX-PERF-SEAT.xlsx
ASKER CERTIFIED SOLUTION
Avatar of ste5an
ste5an
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rwaterz

ASKER

Thanks for that, i'll do some testing and see how it works out.

Wouldn't islands be what I am looking for? Gaps would be the break between seats and islands would be the pair (or greater) of seats...right?
This is just a definion question. Islands are normally existing numbers, gaps are missing numbers. I would name already reserved seats as islands.
Avatar of rwaterz

ASKER

That is absolutely the solution!

I found this article: https://www.simple-talk.com/sql/t-sql-programming/the-sql-of-gaps-and-islands-in-sequences/ to be quite useful as well. I thought I'd share for others who may have a similar question. I would have never found that article without your help in identifying the type of solution I needed.

Thank you!