def METHOD_NAME(self, query, session_id=None, session_check=None):
    logger.debug(f"{self.name()} is about to execute query: %s", query)
    query += "\nFORMAT JSON"
    response = self._send_query(query, session_id, session_check)
    columns = []
    columns_int64 = []  # db converts value to string if its type equals UInt64
    columns_totals = {}
    meta = response.get("meta", [])
    for r in meta:
        column_name = r["name"]
        column_type = self._define_column_type(r["type"])
        if r["type"] in ("Int64", "UInt64", "Nullable(Int64)", "Nullable(UInt64)"):
            columns_int64.append(column_name)
        else:
            columns_totals[column_name] = "Total" if column_type == TYPE_STRING else None
        columns.append({"name": column_name, "friendly_name": column_name, "type": column_type})
    rows = response.get("data", [])
    for row in rows:
        for column in columns_int64:
            try:
                row[column] = int(row[column])
            except TypeError:
                row[column] = None
    if "totals" in response:
        totals = response["totals"]
        for column, value in columns_totals.items():
            totals[column] = value
        rows.append(totals)
    return {"columns": columns, "rows": rows}