You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: benchmarks/queries/clickbench/queries.sql
+1-6
Original file line number
Diff line number
Diff line change
@@ -35,9 +35,4 @@ SELECT "URL", COUNT(*) AS c FROM hits GROUP BY "URL" ORDER BY c DESC LIMIT 10;
35
35
SELECT1, "URL", COUNT(*) AS c FROM hits GROUP BY1, "URL"ORDER BY c DESCLIMIT10;
36
36
SELECT"ClientIP", "ClientIP"-1, "ClientIP"-2, "ClientIP"-3, COUNT(*) AS c FROM hits GROUP BY"ClientIP", "ClientIP"-1, "ClientIP"-2, "ClientIP"-3ORDER BY c DESCLIMIT10;
37
37
SELECT"URL", COUNT(*) AS PageViews FROM hits WHERE"CounterID"=62AND"EventDate"::INT::DATE>='2013-07-01'AND"EventDate"::INT::DATE<='2013-07-31'AND"DontCountHits"=0AND"IsRefresh"=0AND"URL"<>''GROUP BY"URL"ORDER BY PageViews DESCLIMIT10;
38
-
SELECT"Title", COUNT(*) AS PageViews FROM hits WHERE"CounterID"=62AND"EventDate"::INT::DATE>='2013-07-01'AND"EventDate"::INT::DATE<='2013-07-31'AND"DontCountHits"=0AND"IsRefresh"=0AND"Title"<>''GROUP BY"Title"ORDER BY PageViews DESCLIMIT10;
39
-
SELECT"URL", COUNT(*) AS PageViews FROM hits WHERE"CounterID"=62AND"EventDate"::INT::DATE>='2013-07-01'AND"EventDate"::INT::DATE<='2013-07-31'AND"IsRefresh"=0AND"IsLink"<>0AND"IsDownload"=0GROUP BY"URL"ORDER BY PageViews DESCLIMIT10 OFFSET 1000;
40
-
SELECT"TraficSourceID", "SearchEngineID", "AdvEngineID", CASE WHEN ("SearchEngineID"=0AND"AdvEngineID"=0) THEN "Referer" ELSE '' END AS Src, "URL"AS Dst, COUNT(*) AS PageViews FROM hits WHERE"CounterID"=62AND"EventDate"::INT::DATE>='2013-07-01'AND"EventDate"::INT::DATE<='2013-07-31'AND"IsRefresh"=0GROUP BY"TraficSourceID", "SearchEngineID", "AdvEngineID", Src, Dst ORDER BY PageViews DESCLIMIT10 OFFSET 1000;
41
-
SELECT"URLHash", "EventDate"::INT::DATE, COUNT(*) AS PageViews FROM hits WHERE"CounterID"=62AND"EventDate"::INT::DATE>='2013-07-01'AND"EventDate"::INT::DATE<='2013-07-31'AND"IsRefresh"=0AND"TraficSourceID"IN (-1, 6) AND"RefererHash"=3594120000172545465GROUP BY"URLHash", "EventDate"::INT::DATEORDER BY PageViews DESCLIMIT10 OFFSET 100;
42
-
SELECT"WindowClientWidth", "WindowClientHeight", COUNT(*) AS PageViews FROM hits WHERE"CounterID"=62AND"EventDate"::INT::DATE>='2013-07-01'AND"EventDate"::INT::DATE<='2013-07-31'AND"IsRefresh"=0AND"DontCountHits"=0AND"URLHash"=2868770270353813622GROUP BY"WindowClientWidth", "WindowClientHeight"ORDER BY PageViews DESCLIMIT10 OFFSET 10000;
43
-
SELECT DATE_TRUNC('minute', to_timestamp_seconds("EventTime")) AS M, COUNT(*) AS PageViews FROM hits WHERE"CounterID"=62AND"EventDate"::INT::DATE>='2013-07-14'AND"EventDate"::INT::DATE<='2013-07-15'AND"IsRefresh"=0AND"DontCountHits"=0GROUP BY DATE_TRUNC('minute', to_timestamp_seconds("EventTime")) ORDER BY DATE_TRUNC('minute', M) LIMIT10 OFFSET 1000;
38
+
SELECT"Title", COUNT(*) AS PageViews FROM hits WHERE"CounterID"=62AND"EventDate"::INT::DATE>='2013-07-01'AND"EventDate"::INT::DATE<='2013-07-31'AND"DontCountHits"=0AND"IsRefresh"=0AND"Title"<>''GROUP BY"Title"ORDER BY PageViews DESCLIMIT10;
0 commit comments