• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1--
2-- Copyright 2019 The Android Open Source Project
3--
4-- Licensed under the Apache License, Version 2.0 (the "License");
5-- you may not use this file except in compliance with the License.
6-- You may obtain a copy of the License at
7--
8--     https://www.apache.org/licenses/LICENSE-2.0
9--
10-- Unless required by applicable law or agreed to in writing, software
11-- distributed under the License is distributed on an "AS IS" BASIS,
12-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-- See the License for the specific language governing permissions and
14-- limitations under the License.
15--
16create view v1 as select tag, count(*) from android_logs group by tag order by 2 desc limit 5;
17
18create view v2 as select tag, count(*) from android_logs group by tag order by 2 asc limit 5;
19
20create view v3 as
21select tag, count(*)
22from android_logs
23where msg GLOB '*wakelock*' or msg GLOB '*Wakelock*' or msg GLOB '*WakeLock*' or msg GLOB '*wakeLock*'
24group by tag;
25
26create view v4 as select msg, 1 from android_logs limit 10;
27
28select * from v1 union all
29select '-----', 0 union all
30select * from v2 union all
31select '-----', 0 union all
32select * from v3 union all
33select '-----', 0 union all
34select * from v4;
35