def main():
db = dataset.connect('sqlite:///../database/smells.sqlite')
sqlite_file = '/home/jen/projects/smelly_london/git/smelly_london/database'
column_names = ['category', 'location', 'number_of_smells', 'centroid_lat', 'centroid_lon', 'id', 'year', 'sentence']
sql = 'select {column_names} from (select Category category, Borough location, Id id, Year year, Sentence sentence, count(*) number_of_smells from smells group by Category, Borough having Year = "1904") join locations on location = name;'
conn, cur = connect_to_sqlite_db(sqlite_file)
data = sql_get_data_colnames(cur, sql, column_names)
close_sqlite_connection(conn)
return data
sqlite_utilities_v2.py 文件源码
python
阅读 16
收藏 0
点赞 0
评论 0
评论列表
文章目录