add query utility (important!)

add query form
add teacher rate_log

changed date query style: use created_at, not “extract(year from” any
longer