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 select tag, count(*) from android_logs where msg like '%wakelock%' group by tag; 21 22create view v4 as select msg, 1 from android_logs limit 10; 23 24select * from v1 union all 25select '-----', 0 union all 26select * from v2 union all 27select '-----', 0 union all 28select * from v3 union all 29select '-----', 0 union all 30select * from v4;