parameters: (self)
return_statement: return cursor.fetchall()
docstring: Return list of countries with available phones
          @param self: this object
          @return: set of data
          @rtype: dict
docstring_summary: Return list of countries with available phones
docstring_tokens: Return list of countries with available phones
function: def get_country_list_total(self):
          """
          Return list of countries with available phones
          @param self: this object
          @return: set of data
          @rtype: dict
          """
          cursor = connection.cursor()
          query = """
          SELECT count(id) AS total,
          sum(CASE WHEN last_connection >= NOW() - INTERVAL '15 minutes' THEN 1 ELSE 0 END) AS available,
          country
          FROM smsapp_phonedata
          GROUP BY country ORDER BY available DESC ;
          """
          cursor.execute(query)
          return cursor.fetchall()
function_tokens: def get_country_list_total ( self ) : cursor = connection . cursor ( ) query = """
          SELECT count(id) AS total,
          sum(CASE WHEN last_connection >= NOW() - INTERVAL '15 minutes' THEN 1 ELSE 0 END) AS available,
          country
          FROM smsapp_phonedata
          GROUP BY country ORDER BY available DESC ;
          """ cursor . execute ( query ) return cursor . fetchall ( )