Skip to content

Example SQL Queries

Kathie Dionisio edited this page Dec 19, 2018 · 8 revisions

Give me all columns from products:

SELECT * FROM products;

Get a list of 10,000 chemicals that need DSSTOX curation with Brian:

SELECT dashboard_extractedchemical.id, raw_cas, raw_chem_name     
FROM dashboard_extractedchemical 
WHERE dashboard_extractedchemical.id NOT IN   
    (SELECT dashboard_dsstoxsubstance.extracted_chemical_id   
     FROM dashboard_dsstoxsubstance)  
LIMIT 10000
Clone this wiki locally