select count(*) HitsTotal from b; select sum(BytesSent) TrafficTotal from b; select distinct(Date) from b; select Date, count(*) Hits from b group by Date order by Date asc; select Date, sum(BytesSent) Traffic from b where Date between '2023-04-10' and '2023-04-25' group by Date order by Date asc; select Status, count(*) Requests from b group by Status order by Requests desc; select count(*) "Facebook leads" from b where Referer like '%facebook.com%'; select count(*) "Google leads" from b where Referer like '%google.com%'; select count(*) "Firefox hits" from b where UserAgent like '%Firefox%'; select UserAgent, count(*) Hits from b where UserAgent like '%aarch64%' group by UserAgent order by Hits desc; select Host, count(*) Hits from b group by Host order by Hits desc limit 20; select Host, sum(BytesSent) Traffic from b group by Host order by Traffic desc limit 20; select UserAgent, count(*) Hits from b where UserAgent like '%Linux %' and UserAgent not like '%Android%' group by UserAgent order by Hits desc limit 10; select concat(lpad(hour(Time),2,0),':00') Hour, count(*) Hits from b group by Hour order by Hour asc; select dayname(Date) "Day of week", count(*) Hits from b group by dayname(Date) order by Hits desc; select dayname(Date) "Day of week", sum(BytesSent) Traffic from b group by dayname(Date) order by Traffic desc; select substring_index(Referer,'/',3) "Referring site", count(*) "Lead count" from b where Referer != '-' group by substring_index(Referer,'/',3) order by "Lead count" desc limit 10; select substring_index(Request,' ',3) Request, count(*) "Times repeated" from b where length(Request) < 75 group by substring_index(Request,' ',3) order by "Times repeated" desc limit 10; select substring_index(Request,' ',1) Request, count(*) "Times repeated" from b group by substring_index(Request,' ',1) order by "Times repeated" desc limit 10;