Compare commits
2 Commits
992e299829
...
f31c23ea51
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f31c23ea51 | ||
![]() |
c059890ba7 |
@ -444,6 +444,21 @@ class Database:
|
||||
properties.seed_id = {region_id}
|
||||
""")
|
||||
|
||||
def singleScrape_of_region(self, region_id: int, scrape_date_min: str, scrape_date_max: str):
|
||||
return self.connection.sql(f"""
|
||||
SELECT
|
||||
JSON_EXTRACT(body, '$.content.days') as calendarBody,
|
||||
FROM
|
||||
consultancy_d.extractions
|
||||
LEFT JOIN
|
||||
consultancy_d.properties ON properties.id = extractions.property_id
|
||||
WHERE
|
||||
type == 'calendar' AND
|
||||
properties.seed_id = {region_id} AND
|
||||
extractions.created_at >= '{scrape_date_min}' AND
|
||||
extractions.created_at < '{scrape_date_max}'
|
||||
""")
|
||||
|
||||
def capacity_global(self):
|
||||
return self.connection.sql(f"""
|
||||
SELECT
|
||||
|
Loading…
x
Reference in New Issue
Block a user