Here is some examples of the MassQL language and their english translation:

QUERY scaninfo(MS2DATA) WHERE MS2PROD=226.18:TOLERANCEPPM=5

Returning the scan information on MS2.
The following conditions are applied to find scans in the mass spec data.
Finding MS2 peak at m/z 226.18 with a 5.0 PPM tolerance.

QUERY MS1DATA WHERE MS2PROD=226.18

Returning scan peaks on MS1.
The following conditions are applied to find scans in the mass spec data.
Finding MS2 peak at m/z 226.18.

QUERY scaninfo(MS2DATA) WHERE MS2PREC=X AND MOBILITY=range(min=X*0.0006775+0.40557, NAME_1=X*0.00078231+0.48817) AND X=massdefect(min=0.9, NAME_1=0.99)

Returning the scan information on MS2.
The following conditions are applied to find scans in the mass spec data.
Finding MS2 spectra with a precursor m/z X.
Finding spectra with a range of ion mobility (X*0.0006775+0.40557, X*0.00078231+0.48817).
Enabling variable X with mass defect minimum of 0.9 and a maximum 0.99.

QUERY scaninfo(MS2DATA) WHERE MS2NL=176.0321 AND MS2PROD=85.02915

Returning the scan information on MS2.
The following conditions are applied to find scans in the mass spec data.
Finding MS2 neutral loss peak at m/z 176.0321.
Finding MS2 peak at m/z 85.02915.

QUERY scaninfo(MS2DATA) WHERE MS2PROD=176.0321 AND MS2PROD=85.02915

Returning the scan information on MS2.
The following conditions are applied to find scans in the mass spec data.
Finding MS2 peak at m/z 176.0321.
Finding MS2 peak at m/z 85.02915.

QUERY scaninfo(MS1DATA) WHERE MS1MZ=256.1696 AND MS1MZ=258.1656:TOLERANCEPPM=5

Returning the scan information on MS1.
The following conditions are applied to find scans in the mass spec data.
Finding MS1 peak at m/z 256.1696.
Finding MS1 peak at m/z 258.1656 with a 5.0 PPM tolerance.


QUERY scansum(MS1DATA) FILTER
MS1MZ=256.1696:TOLERANCEPPM=5

This is an extracted ion chromatogram

QUERY scaninfo(MS2DATA) WHERE
MS2NL=21:TOLERANCEPPM=5

Returning the scan information on MS2.
The following conditions are applied to find scans in the mass spec data.
Finding MS2 neutral loss peak at m/z 21.0 with a 5.0 PPM tolerance.


QUERY scaninfo(MS2DATA) WHERE 
MS1MZ=X AND 
MS1MZ=X+1 AND 
MS2PREC=X

Returning the scan information on MS2.
The following conditions are applied to find scans in the mass spec data.
Finding MS1 peak at m/z X.
Finding MS1 peak at m/z X+1.0.
Finding MS2 spectra with a precursor m/z X.


QUERY MS2DATA WHERE MS2PROD=(226.18 OR 270)

Returning the scan information on MS2.
The following conditions are applied to find scans in the mass spec data.
Finding MS2 peak at m/z 226. Write exactly 5 paragraphs each separated with two new lines answering this question. The first paragraph must start with "credit".
user