Home > Blockchain >  MySQL: How to get hourly value w.r.t date
MySQL: How to get hourly value w.r.t date

Time:10-18

I was able to do this but I want to narrow down to a certain date only:

select count(*) as total, HOUR(crawled_at)
from parsed_products
GROUP by HOUR(crawled_at)

How do I mention crawled_at's specific value?

CodePudding user response:

You need top use the where clause to specify a filter, like this

select count(*) as total, HOUR(crawled_at)
from parsed_products
where crawled_at ='2022-10-18'
GROUP by HOUR(crawled_at)
  • Related