Commit cf377060 by Matija Obreza

Sort updates by count desc

parent c65b5043
Pipeline #1162 waiting for manual action with stages
in 2 minutes 30 seconds
......@@ -141,7 +141,7 @@ public interface AccessionRepository extends JpaRepository<Accession, Long> {
@Modifying
public void updateCrop(Accession accession, Crop crop);
@Query("select year(a.lastModifiedDate), month(a.lastModifiedDate), day(a.lastModifiedDate), a.institute.id, count(a) from Accession a group by year(a.lastModifiedDate), month(a.lastModifiedDate), day(a.lastModifiedDate), a.institute order by year(a.lastModifiedDate) desc, month(a.lastModifiedDate) desc, day(a.lastModifiedDate) desc, count(*), a.institute.id")
@Query("select year(a.lastModifiedDate), month(a.lastModifiedDate), day(a.lastModifiedDate), a.institute.id, count(a) from Accession a group by year(a.lastModifiedDate), month(a.lastModifiedDate), day(a.lastModifiedDate), a.institute order by year(a.lastModifiedDate) desc, month(a.lastModifiedDate) desc, day(a.lastModifiedDate) desc, count(*) desc, a.institute.id")
public List<Object[]> lastUpdatedStatistics();
@Query("select year(a.lastModifiedDate), month(a.lastModifiedDate), day(a.lastModifiedDate), count(a) from Accession a where a.institute = ?1 group by year(a.lastModifiedDate), month(a.lastModifiedDate), day(a.lastModifiedDate) order by year(a.lastModifiedDate) desc, month(a.lastModifiedDate) desc, day(a.lastModifiedDate) desc")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment