Full review (do not merge)

`EXTRACT(HOUR FROM x)` seems like what we want, however SQLite does not support it:( Is it possible/permitted to have different queries for different database types?

Either way, the goal is to write fixed number (ideally 1) queries that return small result set (i.e. not all abrt_report reported_at dates in last 24 hours), right?