Still trying to get familiar with scalikejdbc. What is the simplest way to just use sql syntax to send a query using scalike jdbc into a table to get max date? Something really simple like the below works fine but gives me an error when I try to add max around the column.
val maxDate: Option[String] = DB readOnly { implicit session =>
sql"select <column> from <table>"
.map(rs => rs.string("<column")).first.apply()
}
this does not work:
val maxDate: Option[String] = DB readOnly { implicit session =>
sql"select max(<column>) from <table>"
.map(rs => rs.string("<column")).first.apply()
}
error: Failed to retrieve value because The column name not found.. If you're using SQLInterpolation,...