This commit is contained in:
Pavel_Duron 2022-12-01 19:43:36 +10:00
parent 0d945cfb36
commit 6f7989a5d6

View File

@ -1,4 +1,4 @@
from sqlalchemy import create_engine, MetaData, Table, Integer, String, \
from sqlalchemy import create_engine, MetaData, Table, Integer, String, BIGINT, \
Column, DateTime, ForeignKey, Numeric
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
@ -22,8 +22,11 @@ class user(Base):
user_fullname = Column(String)
dick_size = (Column(Integer))
datetimes = (Column(DateTime))
chat_id = Column(BIGINT)
session.close()
top = session.query(user.user_fullname, user.dick_size).order_by(user.dick_size.desc()).filter(user.chat_id == user.chat_id).limit(10).all()
print(top)
#Base.metadata.create_all(engine)