﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	db_engine	os_version
1224	Web Report Needed - Count accessions-genus-taxonomy BY site	Martin Reisinger	dbmujc	"It counts accessions-genus-taxonomy BY site

SELECT s.site_short_name    , count(distinct accession_id) Accession_count    , count(distinct tg.taxonomy_genus_id) AS Genus_count    , count(distinct a.taxonomy_species_id) AS nomenclare_count  FROM taxonomy_genus tg  JOIN taxonomy_species ts ON tg.taxonomy_genus_id = ts.taxonomy_genus_id  JOIN accession a ON ts.taxonomy_species_id = a.taxonomy_species_id  JOIN cooperator c ON a.owned_by = c.cooperator_id  JOIN site s ON c.site_id = s.site_idWHERE a.status_code = 'ACTIVE'GROUP BY s.site_short_name  -- If you know how to count distinct genus-species (counting the binomials) then include that also 
requested by W6"	AdCom	new	tbd	Post-NPGS Prod'n	Reports	1.9.6 Server				marty.reisinger@…	N/A	N/A
