File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -695,6 +695,23 @@ def fetch_country_count(self) -> dict:
695695 logger .debug ("%s" , exception )
696696 return {}
697697
698+ def fetch_exchange1_unique_count (self ) -> dict :
699+ """
700+ Fetch count of unique countries
701+ {exch1_count: count}
702+ """
703+ try :
704+ with sqlite3 .connect (self .database ) as conn :
705+ conn .row_factory = self .row_factory
706+ cursor = conn .cursor ()
707+ cursor .execute (
708+ f"select count(DISTINCT(Exchange1)) as exch1_count from dxlog where Exchange1 != '' and ContestNR = { self .current_contest } ;"
709+ )
710+ return cursor .fetchone ()
711+ except sqlite3 .OperationalError as exception :
712+ logger .debug ("%s" , exception )
713+ return {}
714+
698715 def fetch_arrldx_country_band_count (self ) -> dict :
699716 """
700717 returns dict with count of unique NR.
You can’t perform that action at this time.
0 commit comments