{
  "db_name": "PostgreSQL",
  "query": "WITH active_users AS (SELECT distinct username as email FROM (SELECT username, timestamp, operation FROM audit_partitioned UNION ALL SELECT username, timestamp, operation FROM audit) AS a WHERE timestamp > NOW() - INTERVAL '1 month' AND (operation = 'users.login' OR operation = 'oauth.login' OR operation = 'users.token.refresh')),\n            authors as (SELECT distinct email FROM usr WHERE usr.operator IS false)\n            SELECT email, email NOT IN (SELECT email FROM authors) as operator_only, login_type::text, verified, super_admin, devops, name, company, username, first_time_user\n            FROM password\n            WHERE email IN (SELECT email FROM active_users)\n            ORDER BY super_admin DESC, devops DESC\n            LIMIT $1 OFFSET $2",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "email",
        "type_info": "Varchar"
      },
      {
        "ordinal": 1,
        "name": "operator_only",
        "type_info": "Bool"
      },
      {
        "ordinal": 2,
        "name": "login_type",
        "type_info": "Text"
      },
      {
        "ordinal": 3,
        "name": "verified",
        "type_info": "Bool"
      },
      {
        "ordinal": 4,
        "name": "super_admin",
        "type_info": "Bool"
      },
      {
        "ordinal": 5,
        "name": "devops",
        "type_info": "Bool"
      },
      {
        "ordinal": 6,
        "name": "name",
        "type_info": "Varchar"
      },
      {
        "ordinal": 7,
        "name": "company",
        "type_info": "Varchar"
      },
      {
        "ordinal": 8,
        "name": "username",
        "type_info": "Varchar"
      },
      {
        "ordinal": 9,
        "name": "first_time_user",
        "type_info": "Bool"
      }
    ],
    "parameters": {
      "Left": [
        "Int8",
        "Int8"
      ]
    },
    "nullable": [
      false,
      null,
      null,
      false,
      false,
      false,
      true,
      true,
      true,
      false
    ]
  },
  "hash": "9229d9a9ff389cf26e480b604b83900e2d362ee934ef27284ef39f4eed440e59"
}
