@Query(value="select ct.crop, count(a) from Accession a inner join a.taxonomy t join t.cropTaxonomies ct where a.institute = ?1 group by ct.crop order by count(a) desc",countQuery="select count(distinct ct.crop) from Accession a inner join a.taxonomy t join t.cropTaxonomies ct where a.institute = ?1")
// @Query(value = "select ct.crop, count(a) from Accession a inner join a.taxonomy1 t join t.cropTaxonomies ct where a.institute = ?1 group by ct.crop order by count(a) desc", countQuery = "select count(distinct ct.crop) from Accession a inner join a.taxonomy t join t.cropTaxonomies ct where a.institute = ?1")
// Page<Object[]> statisticsCropInInstitute(FaoInstitute institute, Pageable pageable);
@Query("select count(a) from Accession a where a.origin = ?1")