Examples for OGLE OCVS TAP examples

Query against ObsCore by collection

Find all timeseries of Anomalous Cepheids in the Small Magellanic Cloud in the ivoa.obscore table using obs_collection:

SELECT TOP 1000 *
  FROM ivoa.obscore WHERE dataproduct_type='timeseries'
  AND obs_collection='OGLE-SMC-ACEP'

Filter RR Lyrae stars by period

Download all RR Lyrae light curves with period in the [0.5–0.7 days] range in the I band. They are kept both in ogle.objects_all and ogle.rrlyr:

SELECT ssa_targname, accref, o.period FROM ogle.ts_ssa AS t
NATURAL JOIN ogle.rrlyr AS o
WHERE o.period BETWEEN 0.5 AND 0.7 AND t.ssa_bandpass = 'I'

Variable stars with epoch in the future

Find all variable stars (ogle.objects_all) with epoch (time of maximum brightness) in the future:

SELECT * from ogle.objects_all WHERE epoch > ivo_to_mjd('2027-01-01')

Periods longer than the duration of observations

Find all stars with periods longer than the duration of observations in I filter. Timeseries related metadata is available in ogle.ts_ssa:

SELECT o.* FROM ogle.objects_all o NATURAL JOIN ogle.ts_ssa t
WHERE t.ssa_bandpass='I' AND o.period > ssa_timeext

Contact binaries with the longest periods

Select ten eclipsing binary systems, classified as Contact with the longest periods. The specific information about eclipsing binaries is stored in ogle.eclipsing:

SELECT TOP 10 accref, preview, o.* FROM ogle.eclipsing o
NATURAL JOIN ogle.ts_ssa t
WHERE subtype='C' AND ssa_bandpass='I' AND ssa_length>100
ORDER BY o.period DESC