1. Plan of attack
I’m looking for:
a guy living in the same neighbourhood (extract the zip code from the previous result)
look up when the zodiac sign Aries is online
look up when the year of the Dog is in the past 80 years (guy should be alive)
filter people by location and birthday
This time, everything should be doable in SQL right away via DBeaver:
select distinct name, phone from customers c where strftime('%Y', c.birthdate) in ('1958', '1970', '1982', '1994', '2006') and strftime('%md', c.birthdate) between '0321' and '0419' and citystatezip like '%NY 11420%' -- same neighbourhood as the contractor order by name;
Only 1 result is returned, and it’s the right one.
Time to solve: 20 minutes.