File size: 1,592 Bytes
1bb354f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
[
  {
    "question": "Which species in our database contain amatoxins, and at what\n> concentrations?",
    "query": "SELECT s.scientific_name, c.preferred_name, o.concentration_mg_per_g\nFROM bio_species_compound_occurrences o\nJOIN tax_species s ON s.id = o.species_id\nJOIN bio_compounds c ON c.id = o.compound_id\nJOIN bio_toxin_amatoxins t ON t.compound_id = c.id\nORDER BY s.scientific_name, c.preferred_name;",
    "db_id": "mycobase",
    "evidence": ""
  },
  {
    "question": "Show me ITS sequences with their species and the herbarium voucher\n> they came from.",
    "query": "SELECT s.scientific_name,\n       h.ih_code || ' ' || sp.catalog_number AS voucher,\n       seq.length_bp, seq.gc_content_pct\nFROM gen_sequences seq\nJOIN spc_specimens sp ON sp.id = seq.specimen_id\nJOIN people_herbaria h ON h.id = sp.herbarium_id\nJOIN tax_species s ON s.id = sp.identified_species_id\nWHERE seq.locus = 'its';",
    "db_id": "mycobase",
    "evidence": ""
  },
  {
    "question": "Which Agaricales species are classified as deadly, and what is the\n> mean amatoxin concentration reported for each?",
    "query": "SELECT s.scientific_name, e.edibility_class,\n       AVG(o.concentration_mg_per_g) AS mean_amatoxin\nFROM ord_agaricales_edibility e\nJOIN tax_species s ON s.id = e.species_id\nLEFT JOIN bio_species_compound_occurrences o ON o.species_id = s.id\nLEFT JOIN bio_toxin_amatoxins t ON t.compound_id = o.compound_id\nWHERE e.edibility_class = 'deadly'\nGROUP BY s.scientific_name, e.edibility_class;",
    "db_id": "mycobase",
    "evidence": ""
  }
]