我有以下查询在 SQLite 上的纯 SQL 中工作,但不知道如何将其转换为 pyDAL:
SELECT * FROM buy WHERE date('now','-2 days') < timestamp;
购买表模式是:
CREATE TABLE "buy"(
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
"order_id" CHAR(512),
"market" CHAR(512),
"purchase_price" DOUBLE,
"selling_price" DOUBLE,
"amount" DOUBLE
, "timestamp" TIMESTAMP, "config_file" CHAR(512));