ESA JWST ADQL example queries

New observations

Use case: I want to retrieve all the observations that were modified or ingested from a certain date, the newest observations listed first.

Target table: jwst.observation

Query:
SELECT observationid, maxlastmodified 
FROM jwst.observation 
WHERE maxlastmodified > '2020-10-01' 
ORDER BY maxlastmodified DESC

Observations in a time range

Use case: I want to retrieve all the observations that were modified or ingested between two dates, the newest observations listed first.

Target table: jwst.observation

Query:
SELECT observationid, maxlastmodified 
FROM jwst.observation 
WHERE maxlastmodified > '2020-10-01' 
AND maxlastmodified < '2020-11-01' 
ORDER BY maxlastmodified DESC