Created
April 7, 2013 06:30
-
-
Save Altech/5329303 to your computer and use it in GitHub Desktop.
valid HiveQLs on TreasureData.
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
-- Schema: ( | |
-- path:string | |
-- method:string | |
-- ip:string | |
-- agent:string | |
-- referer:string | |
-- ) | |
-- count access per day | |
SELECT to_date(from_unixtime(time)) AS day, COUNT(*) AS cnt FROM access GROUP BY to_date(from_unixtime(time)) ORDER BY day ASC | |
-- referer | |
SELECT referer, COUNT(*) AS cnt FROM access GROUP BY referer ORDER BY referer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment