@Query(value="select t.taxSpecies, count(a) from Accession a inner join a.taxonomy t where a.institute = ?1 group by t.taxSpecies order by count(a) desc",countQuery="select count(distinct a.taxonomy.taxSpecies) from Accession a where a.institute = ?1")
// "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.countryOfOrigin = ?1")
longcountByOrigin(Countrycountry);
@Query("select count(a) from Accession a where a.origin = ?1")
longcountByOrigin(StringisoCode3);
@Query("select count(a) from Accession a inner join a.institute i inner join i.country c where c.code3 = ?1")
longcountByLocation(StringisoCode3);
@Query("select count(a) from Accession a where a.institute.country = ?1")
longcountByLocation(Countrycountry);
@Query("select a from Accession a where a.institute in ( ?1 )")