I wrote a native query in spring boot. (shown below) . This is sowing me error "The column name seq_id was not found in this ResultSet.". But when Iam removing distinct and putting * then the result is coming. Here seq_id is a sequence here.
@Query(value = " SELECT DISTINCT DEPOT FROM {h-schema}mt_schedule_task where schedule_name=? AND department=? ", nativeQuery=true)