Cloudera CDH/CDP 및 Hadoop EcoSystem, Semantic IoT등의 개발/운영 기술을 정리합니다. gooper@gooper.com로 문의 주세요.
use hue;
select user.username as account, query.last_modified as last_modified, user.first_name as user_name, query.search as query, query.type as search_type, ip.ip_address as ip_address, DATE_FORMAT(query.last_modified, "%Y-%m") from desktop_document2 as query join auth_user as user on user.id=query.owner_id join ( select orition.ip_address, origin.username, origin.attempt_time, case when origin.logout_time is null then case when origin.username != lead_log.username then from_unixtimestamp()) else lead_log.logout_time_cust end else origin.logout_time end as logout_time from (( select ($rownum_origin := $rownum_origin+1) as rownum_origin, ip_adress, username, attempt_time, logout_time, case when logout_time is null then attempt_time else logout_time end as logout_time_cust from axes_accesslog, (select $rownum_origin:=1) tmp order by username, attempt_time) as origin, ( select ($rownum_lead_log:=@rownum_lead_log+1) as rownum_lead_log, username, case when logout_time is null then attempt_time else logout_time end as logout_time_cust from axes_accesslog, (select rownum_lead_log:=0) tmp order by username, attempt_time) as lead_log ) where origin.rownum_origin = lead_log.rownum_lead_log) as ip on ip.username = user.username and ip.attempt_time < query.last_modified and query.last_modified <= ip.logout_time where query.last_modified > '2020-02-03 17:10:43.0' order by query.ast_modified;
결과 예시
account last_modified user_name query search_type ip_address DATE_FORMAT(query.last_modified, "%Y-%m")
hadoop 2020-02-03 17:18:46 hadoop select * from db.tb_test; query-impala xx.xx.xx.xx 2020-02
댓글 0
번호 | 제목 | 날짜 | 조회 수 |
---|---|---|---|
161 | mongodb에서 큰데이타 sort시 오류발생에 대한 해결방법 | 2015.12.22 | 512 |
160 | console명령과 API비교 | 2015.12.21 | 484 |
159 | java quartz 시간 설정 참고사항 | 2015.12.16 | 300 |
158 | 천문학적, 기후학적, 기상학적, 생물학적, 농사계절 구분 | 2015.12.16 | 191 |
157 | 대표 오픈소스 라이선스, 한 눈에 보기! | 2015.12.10 | 226 |
156 | sparql 문법구조 설명 | 2015.12.09 | 490 |
155 | git설명 한글판 | 2015.12.09 | 440 |
154 | protege 4.3 다운로드 | 2015.12.09 | 227 |
153 | ontology, jena, sparql등 전반에 대한 설명및 예제를 제공하는 사이트 | 2015.12.08 | 490 |
152 | 마이바티스(MyBatis)쿼리로그 출력및 정렬하기 | 2015.12.01 | 1546 |
151 | sparql에서 concat에제 | 2015.11.27 | 238 |
150 | Runtime.getRuntime().exec(cmd) sample 소스 | 2015.11.19 | 359 |
149 | Resource temporarily unavailable(자원이 일시적으로 사용 불가능함) 오류조치 | 2015.11.19 | 7708 |
148 | mybais #과 $의 차이점 | 2015.11.10 | 460 |
147 | Mybatis foreach 문법정리(상황에 따른 사용법) | 2015.11.10 | 1465 |
146 | DB별 JDBC 드라이버 | 2015.10.02 | 467 |
145 | root계정으로 MariaDB설치후 mysql -u root -p로 db에 접근하여 바로 해줘야 하는일..(케릭터셑은 utf8) | 2015.10.02 | 552 |
144 | SQL문장과 Mongo에서 사용하는 명령어를 비교한 것입니다. | 2015.09.30 | 327 |
143 | mongodb 2.6.6 설치(64bit) | 2015.09.30 | 324 |
142 | pom.xml에서 build.gradle로 변환 | 2015.09.14 | 310 |