select *
from database_table
where year='#form.yea r#' and major='#form.ma jor#'...