From 2f2db27f7cae7e11dd6e7c82ed2c8ee0192b6da4 Mon Sep 17 00:00:00 2001 From: dsyoon Date: Fri, 20 Jan 2023 20:20:35 +0900 Subject: [PATCH] init --- HTS_daily.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HTS_daily.py b/HTS_daily.py index 8df808f..462db1d 100644 --- a/HTS_daily.py +++ b/HTS_daily.py @@ -64,7 +64,7 @@ class HTS_DAILY (HTS): valid_company = set() conn = sqlite3.connect(os.path.join(self.RESOURCE_PATH, "stock.db")) cursor = conn.cursor() - cursor.execute('select CODE, NAME, max(ymd) as ymd from fnguide where type != "E" group by 1 order by total_assets desc limit 2400') + cursor.execute('select CODE, NAME, max(ymd) as ymd from (select * from fnguide where type != "E" and total_assets >= 0 order by total_assets DESC) group by 1 order by total_assets desc') items = cursor.fetchall() cursor.close() conn.close()