I have this table
CREATE OR REPLACE TABLE hits (ip bigint, page VARCHAR(256), agent VARCHAR(1000), date datetime)
and I want to calculate the frequency of googlebot visits for each page.
... WHERE agent like '%Googlebot%' group by page
Using:
SELECT page, COUNT(*) FROM hits WHERE agent LIKE '%Googlebot%' GROUP BY page
Try the following:
select page, count(1) as visits from hits where agent like '%Googlebot%' group by page;
Source: https://habr.com/ru/post/1765441/More articles:Как я могу печатать объекты javascript? - javascriptThread Secure Web Applications - Why Is It Important? - multithreadingHow can I create PDF files using the Play Framework and the Google App Engine? - google-app-engineImage created programmatically? - phpinserting data in the middle of a text file through java - javaHow do F # custom types map to CLR types? - c #Fiddler emulator and Windows Phone 7 - redirect to proxy server - proxyThe number of samples C # during a period of time - c #Difference between ID and control.ClientID OR why use control.ClientID if I can access the control via ID - javascriptЕсть ли веская причина, почему Spring Roo помещает database.properties в META-INF/spring? - javaAll Articles