Created
April 24, 2012 05:52
-
-
Save tagomoris/2476903 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (query | |
| (fields (field yyyymmdd) (value (hash (parse_agent (field agent)) (string "category"))) (count *)) | |
| (from (table access_log)) | |
| (where | |
| (and | |
| (= (field service) (string "blog")) | |
| (or | |
| (= (field yyyymmdd) (string "20120331")) | |
| (= (field yyyymmdd) (string "20120401")) | |
| (= (value (hash (parse_agent (field agent)) (string "category"))) (string "smartphone"))))) | |
| (aggregate | |
| (group (field yyyymmdd) (value (hash (parse_agent (field agent)) (string "category")))) | |
| (order (asc (field yyyymmdd)) (desc (count *))) | |
| (limit 30))) | |
| ;; (count *) | |
| ;; (count (field hoge)) | |
| ;; (count (is_smartphone(parse_agent(agent)))) | |
| ;; (count (if (= (field status) 500) 1 NULL)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment