I am aware that they are slightly different, but I am too lazy to make the one in ActiveRecord do the same thing as Sequel. In general it seems Sequel would take the advantage of subqueries, but ActiveRecord might not.
In this case, it seems Sequel's SQL is faster than the one generated by ActiveRecord.
Sequel model:
class User < Sequel::Model(Sequel.connect(DATABASE_CONFIG))
one_to_many :issues, :class => class_name(:Question),
:dataset => lambda{