## 查询事件排序
SELECT eventname,eventtime,count(eventname) as num FROM your_athena_tablename
where eventtime between '2024-11-10' and '2024-11-11' group by eventname,eventtime order by num desc
## 查询具体事件名对应的详细信息
SELECT * FROM your_athena_tablename where eventname ='GetCallerIdentity' and eventtime between '2024-11-10' and '2024-11-11' limit 50## 确定 CloudTrail 事件数量导致的成本增长情况
SELECT eventName,count(eventName) AS NumberOfChanges,eventSource
FROM your_athena_tablename
WHERE eventtime >='2024-11-10T00:00:00Z'and eventtime <'2024-11-11T00:00:00Z'
GROUP BY eventName, eventSource
ORDER BY NumberOfChanges DESC
## 显示特定访问密钥的所有记录的 AWS API 活动
SELECT eventTime, eventName, userIdentity.principalId
FROM your_athena_tablename
WHERE userIdentity.accessKeyId like 'access_key_id'## 确定您的 EC2 实例的所有安全组更改
SELECT eventname, useridentity.username, sourceIPAddress, eventtime, requestparameters
FROM your_athena_tablename
WHERE (requestparameters like '%sg-5887f224%' or requestparameters like '%sg-e214609e%' or requestparameters like '%eni-6c5ca5a8%')
and eventtime >'2017-02-15T00:00:00Z'
order by eventtime asc;## 显示过去 24 小时内的所有控制台登录信息
SELECT useridentity.username, sourceipaddress, eventtime, additionaleventdata
FROM your_athena_tablename
WHERE eventname ='ConsoleLogin'
and eventtime >='2017-02-17T00:00:00Z'
and eventtime <'2017-02-18T00:00:00Z';## 显示过去 24 小时内所有失败的控制台登录尝试
SELECT useridentity.username, sourceipaddress, eventtime, additionaleventdata
FROM your_athena_tablename
WHERE eventname ='ConsoleLogin'
and useridentity.username ='HIDDEN_DUE_TO_SECURITY_REASONS'
and eventtime >='2017-02-17T00:00:00Z'
and eventtime <'2017-02-18T00:00:00Z';## 确定缺少的 IAM 权限
SELECT count (*) as TotalEvents, useridentity.arn, eventsource, eventname, errorCode, errorMessage
FROM your_athena_tablename
WHERE (errorcode like '%Denied%' or errorcode like '%Unauthorized%')
AND eventtime >='2019-10-28T00:00:00Z'
AND eventtime <'2019-10-29T00:00:00Z'
GROUP by eventsource, eventname, errorCode, errorMessage, useridentity.arn
ORDER by eventsource, eventname
## 如果结果未显示失败的 API 调用,则通过类似于下面这样的方法扩大查询范围:
SELECT count (*) as TotalEvents, useridentity.arn, eventsource, eventname, errorCode, errorMessage
FROM your_athena_tablename
WHERE errorcode <>''
AND eventtime >='2019-10-28T00:00:00Z'
AND eventtime <'2019-10-29T00:00:00Z'
GROUP by eventsource, eventname, errorCode, errorMessage, useridentity.arn
ORDER by eventsource, eventname
1.查询oracle数据库的字符集
SELECT * FROM NLS_DATABASE_PARAMETERS WHERE PARAMETER NLS_CHARACTERSET; 2.查询字段长度类型
SELECT * FROM user_tab_columns
WHERE table_name user AND COLUMN_NAME SNAME 请确保将user替换为您想要查询的表名。sname为字段名 这里的字…
大模型基础BERT——Transformers的双向编码器表示
整体概况 BERT:用于语言理解的深度双向Transform的预训练 论文题目:BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding Bidirectional Encoder Representations from…
一、前端
1、概述 1990 年,第一个web浏览器诞生,Tim 以超文本语言 HTML 为基础在 NeXT 电脑上发明了最原始的 Web 浏览器。 1991 年,WWW诞生,这标志着前端技术的开始。 前端(Front-end)和后端(…
本文主要演示sqlite数据库 增删改查创建数据库以及数据库表的基本操作,仅供学习参考。
一、sqlite数据库操作类封装:
sql\database.h
sql\database.cc
// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-sty…
man 手册的使用指南 man手册中文版上传至资源(用心整理,感谢理解!) man手册官方下载链接:https://mirrors.edge.kernel.org/pub/linux/docs/man-pages/ man 手册页:https://linux.die.net/man/
Linux man…