はここでエラーがでたりRailsの4つのPostgresのクエリエラー
first_of_month = Date.current.beginning_of_month
last_of_month = Date.current.end_of_month
today = Date.current
query = quotes.where('close_date BETWEEN ? AND ? AND status_id = 8 WHERE quote_exp < ? ', first_of_month, last_of_month, today)
query.sum(:total)
なぜ 'where()'関数内に 'WHERE'節がありますか? – Nicarus