Skip to content

Instantly share code, notes, and snippets.

@julie-mills
Created July 31, 2019 23:19
Show Gist options
  • Save julie-mills/9e8c504053fccde337a992a8698d3077 to your computer and use it in GitHub Desktop.
Save julie-mills/9e8c504053fccde337a992a8698d3077 to your computer and use it in GitHub Desktop.
Interacting with chatboot
with listings as (
select id, name, price, property_type
from airbnb_listings
where lower(airbnb_listings.city) like :city
and airbnb_listings.accommodates::int >= :number
order by airbnb_listings.number_of_reviews desc
)
select listings.id, listings.name, listings.property_type, listings.price
from listings, airbnb_calendar
where airbnb_calendar.date = :date and airbnb_calendar.available = :avail
and airbnb_calendar.listing_id = listings.id
limit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment