Prompt:
Sensor network script:
  Node: frost | code: stn | fields: unit, lat, lon, level
  Sensor: wind_speed | fields: type, depth, reading, level
Task: Fetch depth from frost where unit exists in wind_speed sensor data for the same qc.
Script:

Question:
readings = fetch(
    node=Node("frost", code="stn"),
    filter=set_member(
        field="unit",
        source=Probe("wind_speed", code="gst"),
        match="qc",
    ),
    output="depth",
)


Prompt:
Sensor network script:
  Node: air_quality | code: stn | fields: depth, type, reading, ts
  Sensor: lightning | fields: lon, type, depth, qc
Task: Fetch depth from air_quality that have at least one corresponding lightning measurement for the same type.
Script:

Question:
readings = fetch(
    node=Node("air_quality", code="stn"),
    filter=has_match(
        source=Probe("lightning", code="tnd"),
        match="type",
    ),
    output="depth",
)


Prompt:
Sensor network script:
  Node: snow_depth | code: mst | fields: reading, ts, value, depth
  Sensor: lightning | fields: lat, reading, qc, ts
Task: Fetch depth from snow_depth that have at least one corresponding lightning measurement for the same ts.
Script:

Question:
readings = fetch(
    node=Node("snow_depth", code="mst"),
    filter=has_match(
        source=Probe("lightning", code="tnd"),
        match="ts",
    ),
    output="depth",
)


Prompt:
Sensor network script:
  Node: uv_index | code: thr | fields: value, lat, reading, ts
  Sensor: air_quality | fields: lat, reading, qc, lon
Task: Fetch reading from uv_index that have at least one corresponding air_quality measurement for the same unit.
Script:

Question:
readings = fetch(
    node=Node("uv_index", code="thr"),
    filter=has_match(
        source=Probe("air_quality", code="prt"),
        match="unit",
    ),
    output="reading",
)


Prompt:
Sensor network script:
  Node: dew_point | code: hub | fields: type, lat, qc, lon
  Sensor: frost | fields: unit, level, lat, type
Task: Retrieve reading from dew_point with reading above the MIN(reading) of frost readings sharing the same unit.
Script:

Question:
readings = fetch(
    node=Node("dew_point", code="hub"),
    filter=exceeds(
        field="reading",
        threshold=aggregate("MIN", "reading",
                            source=Probe("frost", code="frs"),
                            match="unit"),
    ),
    output="reading",
)


Prompt:
Sensor network script:
  Node: temperature | code: clr | fields: reading, value, ts, lon
  Sensor: drought_index | fields: qc, ts, level, unit
Task: Retrieve lon from temperature with value above the MAX(depth) of drought_index readings sharing the same unit.
Script:

Question:
readings = fetch(
    node=Node("temperature", code="clr"),
    filter=exceeds(
        field="value",
        threshold=aggregate("MAX", "depth",
                            source=Probe("drought_index", code="drt"),
                            match="unit"),
    ),
    output="lon",
)


Prompt:
Sensor network script:
  Node: turbidity | code: prt | fields: value, reading, depth, lon
  Sensor: snow_depth | fields: ts, lon, unit, qc
Task: Get level from turbidity where a corresponding entry exists in snow_depth with the same type.
Script:

Question:
readings = fetch(
    node=Node("turbidity", code="prt"),
    filter=has_match(
        source=Probe("snow_depth", code="snw"),
        match="type",
    ),
    output="level",
)


Prompt:
Sensor network script:
  Node: rainfall | code: prt | fields: lat, depth, qc, type
  Sensor: lightning | fields: type, ts, level, reading
Task: Get lat from rainfall where reading exceeds the average reading from lightning for the same depth.
Script:

Question:
readings = fetch(
    node=Node("rainfall", code="prt"),
    filter=exceeds(
        field="reading",
        threshold=aggregate("AVG", "reading",
                            source=Probe("lightning", code="tnd"),
                            match="depth"),
    ),
    output="lat",
)


Prompt:
Sensor network script:
  Node: rainfall | code: ref | fields: level, type, qc, depth
  Sensor: pressure | fields: lat, type, reading, level
Task: Retrieve lat from rainfall that have at least one matching reading in pressure sharing the same depth.
Script:

Question:
readings = fetch(
    node=Node("rainfall", code="ref"),
    filter=has_match(
        source=Probe("pressure", code="mbl"),
        match="depth",
    ),
    output="lat",
)


Prompt:
Sensor network script:
  Node: air_quality | code: hub | fields: ts, depth, level, lon
  Sensor: temperature | fields: reading, ts, unit, lon
Task: Retrieve depth from air_quality with reading above the AVG(reading) of temperature readings sharing the same type.
Script:

Question:
readings = fetch(
    node=Node("air_quality", code="hub"),
    filter=exceeds(
        field="reading",
        threshold=aggregate("AVG", "reading",
                            source=Probe("temperature", code="thr"),
                            match="type"),
    ),
    output="depth",
)


Prompt:
Sensor network script:
  Node: evaporation | code: stn | fields: level, unit, ts, reading
  Sensor: air_quality | fields: lon, ts, depth, unit
Task: Retrieve lat from evaporation with reading above the AVG(value) of air_quality readings sharing the same qc.
Script:

Question:
readings = fetch(
    node=Node("evaporation", code="stn"),
    filter=exceeds(
        field="reading",
        threshold=aggregate("AVG", "value",
                            source=Probe("air_quality", code="prt"),
                            match="qc"),
    ),
    output="lat",
)


Prompt:
Sensor network script:
  Node: soil_moisture | code: gst | fields: lat, reading, ts, unit
  Sensor: rainfall | fields: lat, unit, reading, type
Task: Retrieve level from soil_moisture with depth above the MAX(reading) of rainfall readings sharing the same depth.
Script:

Question:
readings = fetch(
    node=Node("soil_moisture", code="gst"),
    filter=exceeds(
        field="depth",
        threshold=aggregate("MAX", "reading",
                            source=Probe("rainfall", code="rnfl"),
                            match="depth"),
    ),
    output="level",
)


Prompt:
Sensor network script:
  Node: dew_point | code: hub | fields: type, qc, value, depth
  Sensor: frost | fields: type, ts, level, reading
Task: Get lon from dew_point where depth exceeds the total value from frost for the same ts.
Script:

Question:
readings = fetch(
    node=Node("dew_point", code="hub"),
    filter=exceeds(
        field="depth",
        threshold=aggregate("SUM", "value",
                            source=Probe("frost", code="frs"),
                            match="ts"),
    ),
    output="lon",
)


Prompt:
Sensor network script:
  Node: sunlight | code: stn | fields: qc, ts, lat, unit
  Sensor: wind_speed | fields: lon, type, depth, qc
Task: Retrieve value from sunlight whose type is found in wind_speed records where depth matches the outer node.
Script:

Question:
readings = fetch(
    node=Node("sunlight", code="stn"),
    filter=set_member(
        field="type",
        source=Probe("wind_speed", code="gst"),
        match="depth",
    ),
    output="value",
)


Prompt:
Sensor network script:
  Node: air_quality | code: stn | fields: level, value, lat, lon
  Sensor: wind_speed | fields: depth, lon, qc, type
Task: Get lat from air_quality where a corresponding entry exists in wind_speed with the same ts.
Script:

Question:
readings = fetch(
    node=Node("air_quality", code="stn"),
    filter=has_match(
        source=Probe("wind_speed", code="gst"),
        match="ts",
    ),
    output="lat",
)


Prompt:
Sensor network script:
  Node: cloud_cover | code: gst | fields: unit, ts, qc, level
  Sensor: sunlight | fields: lat, type, ts, qc
Task: Fetch reading from cloud_cover where type exists in sunlight sensor data for the same qc.
Script:

Question:
readings = fetch(
    node=Node("cloud_cover", code="gst"),
    filter=set_member(
        field="type",
        source=Probe("sunlight", code="brt"),
        match="qc",
    ),
    output="reading",
)


Prompt:
Sensor network script:
  Node: uv_index | code: hub | fields: type, lon, ts, qc
  Sensor: dew_point | fields: reading, ts, type, level
Task: Get value from uv_index where a corresponding entry exists in dew_point with the same qc.
Script:

Question:
readings = fetch(
    node=Node("uv_index", code="hub"),
    filter=has_match(
        source=Probe("dew_point", code="cnd"),
        match="qc",
    ),
    output="value",
)


Prompt:
Sensor network script:
  Node: air_quality | code: stn | fields: lat, reading, lon, type
  Sensor: cloud_cover | fields: ts, level, type, value
Task: Fetch lat from air_quality where reading is greater than the count of of depth in cloud_cover for matching qc.
Script:

Question:
readings = fetch(
    node=Node("air_quality", code="stn"),
    filter=exceeds(
        field="reading",
        threshold=aggregate("COUNT", "depth",
                            source=Probe("cloud_cover", code="nbl"),
                            match="qc"),
    ),
    output="lat",
)


Prompt:
Sensor network script:
  Node: turbidity | code: prt | fields: lat, value, unit, depth
  Sensor: rainfall | fields: qc, lat, ts, value
Task: Get depth from turbidity where qc appears in rainfall readings with matching ts.
Script:

Question:
readings = fetch(
    node=Node("turbidity", code="prt"),
    filter=set_member(
        field="qc",
        source=Probe("rainfall", code="rnfl"),
        match="ts",
    ),
    output="depth",
)


Prompt:
Sensor network script:
  Node: soil_moisture | code: gst | fields: reading, type, depth, lat
  Sensor: frost | fields: unit, lon, reading, level
Task: Get lon from soil_moisture where type appears in frost readings with matching unit.
Script:

Question:
readings = fetch(
    node=Node("soil_moisture", code="gst"),
    filter=set_member(
        field="type",
        source=Probe("frost", code="frs"),
        match="unit",
    ),
    output="lon",
)


Prompt:
Sensor network script:
  Node: humidity | code: stn | fields: unit, level, ts, lat
  Sensor: dew_point | fields: qc, level, depth, reading
Task: Fetch reading from humidity where value is greater than the total of value in dew_point for matching unit.
Script:

Question:
readings = fetch(
    node=Node("humidity", code="stn"),
    filter=exceeds(
        field="value",
        threshold=aggregate("SUM", "value",
                            source=Probe("dew_point", code="cnd"),
                            match="unit"),
    ),
    output="reading",
)


Prompt:
Sensor network script:
  Node: evaporation | code: ref | fields: lon, lat, reading, depth
  Sensor: turbidity | fields: ts, lat, lon, depth
Task: Get lon from evaporation where a corresponding entry exists in turbidity with the same unit.
Script:

Question:
readings = fetch(
    node=Node("evaporation", code="ref"),
    filter=has_match(
        source=Probe("turbidity", code="ftu"),
        match="unit",
    ),
    output="lon",
)


Prompt:
Sensor network script:
  Node: visibility | code: ref | fields: lat, unit, type, level
  Sensor: wind_speed | fields: lat, qc, reading, lon
Task: Get value from visibility where type appears in wind_speed readings with matching depth.
Script:

Question:
readings = fetch(
    node=Node("visibility", code="ref"),
    filter=set_member(
        field="type",
        source=Probe("wind_speed", code="gst"),
        match="depth",
    ),
    output="value",
)


Prompt:
Sensor network script:
  Node: sunlight | code: hub | fields: qc, type, value, depth
  Sensor: air_quality | fields: level, lat, depth, qc
Task: Fetch lon from sunlight that have at least one corresponding air_quality measurement for the same type.
Script:

Question:
readings = fetch(
    node=Node("sunlight", code="hub"),
    filter=has_match(
        source=Probe("air_quality", code="prt"),
        match="type",
    ),
    output="lon",
)


Prompt:
Sensor network script:
  Node: frost | code: thr | fields: value, unit, level, ts
  Sensor: cloud_cover | fields: type, ts, lat, value
Task: Get lon from frost where a corresponding entry exists in cloud_cover with the same qc.
Script:

Question:
readings = fetch(
    node=Node("frost", code="thr"),
    filter=has_match(
        source=Probe("cloud_cover", code="nbl"),
        match="qc",
    ),
    output="lon",
)


Prompt:
Sensor network script:
  Node: snow_depth | code: hub | fields: type, ts, value, level
  Sensor: temperature | fields: qc, value, level, lat
Task: Fetch depth from snow_depth where depth is greater than the count of of depth in temperature for matching type.
Script:

Question:
readings = fetch(
    node=Node("snow_depth", code="hub"),
    filter=exceeds(
        field="depth",
        threshold=aggregate("COUNT", "depth",
                            source=Probe("temperature", code="thr"),
                            match="type"),
    ),
    output="depth",
)


Prompt:
Sensor network script:
  Node: lightning | code: prt | fields: unit, depth, lon, ts
  Sensor: soil_moisture | fields: unit, type, lat, ts
Task: Get value from lightning where depth exceeds the total depth from soil_moisture for the same qc.
Script:

Question:
readings = fetch(
    node=Node("lightning", code="prt"),
    filter=exceeds(
        field="depth",
        threshold=aggregate("SUM", "depth",
                            source=Probe("soil_moisture", code="grvl"),
                            match="qc"),
    ),
    output="value",
)


Prompt:
Sensor network script:
  Node: temperature | code: stn | fields: value, depth, qc, lon
  Sensor: dew_point | fields: lon, lat, value, reading
Task: Get depth from temperature where a corresponding entry exists in dew_point with the same ts.
Script:

Question:
readings = fetch(
    node=Node("temperature", code="stn"),
    filter=has_match(
        source=Probe("dew_point", code="cnd"),
        match="ts",
    ),
    output="depth",
)


Prompt:
Sensor network script:
  Node: wind_speed | code: thr | fields: value, lon, level, reading
  Sensor: turbidity | fields: value, lat, level, unit
Task: Fetch reading from wind_speed where ts exists in turbidity sensor data for the same qc.
Script:

Question:
readings = fetch(
    node=Node("wind_speed", code="thr"),
    filter=set_member(
        field="ts",
        source=Probe("turbidity", code="ftu"),
        match="qc",
    ),
    output="reading",
)


Prompt:
Sensor network script:
  Node: drought_index | code: ref | fields: reading, qc, unit, lon
  Sensor: frost | fields: level, reading, lat, lon
Task: Get value from drought_index where qc appears in frost readings with matching ts.
Script:

Question:
readings = fetch(
    node=Node("drought_index", code="ref"),
    filter=set_member(
        field="qc",
        source=Probe("frost", code="frs"),
        match="ts",
    ),
    output="value",
)


Prompt:
Sensor network script:
  Node: evaporation | code: thr | fields: ts, lat, value, reading
  Sensor: air_quality | fields: depth, qc, lon, type
Task: Get depth from evaporation where qc appears in air_quality readings with matching unit.
Script:

Question:
readings = fetch(
    node=Node("evaporation", code="thr"),
    filter=set_member(
        field="qc",
        source=Probe("air_quality", code="prt"),
        match="unit",
    ),
    output="depth",
)


Prompt:
Sensor network script:
  Node: pressure | code: stn | fields: depth, type, reading, ts
  Sensor: visibility | fields: reading, level, value, qc
Task: Get value from pressure where depth appears in visibility readings with matching type.
Script:

Question:
readings = fetch(
    node=Node("pressure", code="stn"),
    filter=set_member(
        field="depth",
        source=Probe("visibility", code="clr"),
        match="type",
    ),
    output="value",
)


Prompt:
Sensor network script:
  Node: soil_moisture | code: thr | fields: lat, type, unit, depth
  Sensor: lightning | fields: ts, value, qc, type
Task: Fetch lat from soil_moisture that have at least one corresponding lightning measurement for the same qc.
Script:

Question:
readings = fetch(
    node=Node("soil_moisture", code="thr"),
    filter=has_match(
        source=Probe("lightning", code="tnd"),
        match="qc",
    ),
    output="lat",
)


Prompt:
Sensor network script:
  Node: wind_speed | code: stn | fields: reading, level, ts, unit
  Sensor: cloud_cover | fields: value, level, unit, type
Task: Get reading from wind_speed where unit appears in cloud_cover readings with matching type.
Script:

Question:
readings = fetch(
    node=Node("wind_speed", code="stn"),
    filter=set_member(
        field="unit",
        source=Probe("cloud_cover", code="nbl"),
        match="type",
    ),
    output="reading",
)


Prompt:
Sensor network script:
  Node: visibility | code: stn | fields: type, lat, level, ts
  Sensor: snow_depth | fields: value, reading, level, depth
Task: Get value from visibility where a corresponding entry exists in snow_depth with the same qc.
Script:

Question:
readings = fetch(
    node=Node("visibility", code="stn"),
    filter=has_match(
        source=Probe("snow_depth", code="snw"),
        match="qc",
    ),
    output="value",
)


Prompt:
Sensor network script:
  Node: humidity | code: ref | fields: lat, qc, reading, type
  Sensor: uv_index | fields: value, ts, level, reading
Task: Fetch level from humidity that have at least one corresponding uv_index measurement for the same depth.
Script:

Question:
readings = fetch(
    node=Node("humidity", code="ref"),
    filter=has_match(
        source=Probe("uv_index", code="flx"),
        match="depth",
    ),
    output="level",
)


Prompt:
Sensor network script:
  Node: wind_speed | code: hub | fields: lon, lat, qc, level
  Sensor: air_quality | fields: unit, lat, reading, depth
Task: Retrieve level from wind_speed that have at least one matching reading in air_quality sharing the same unit.
Script:

Question:
readings = fetch(
    node=Node("wind_speed", code="hub"),
    filter=has_match(
        source=Probe("air_quality", code="prt"),
        match="unit",
    ),
    output="level",
)


Prompt:
Sensor network script:
  Node: temperature | code: gst | fields: lat, unit, ts, value
  Sensor: turbidity | fields: depth, lat, lon, reading
Task: Fetch reading from temperature where reading is greater than the maximum of reading in turbidity for matching ts.
Script:

Question:
readings = fetch(
    node=Node("temperature", code="gst"),
    filter=exceeds(
        field="reading",
        threshold=aggregate("MAX", "reading",
                            source=Probe("turbidity", code="ftu"),
                            match="ts"),
    ),
    output="reading",
)


Prompt:
Sensor network script:
  Node: wind_speed | code: gst | fields: level, value, ts, unit
  Sensor: evaporation | fields: ts, value, level, unit
Task: Get level from wind_speed where unit appears in evaporation readings with matching ts.
Script:

Question:
readings = fetch(
    node=Node("wind_speed", code="gst"),
    filter=set_member(
        field="unit",
        source=Probe("evaporation", code="evp"),
        match="ts",
    ),
    output="level",
)


Prompt:
Sensor network script:
  Node: pressure | code: prt | fields: lon, unit, reading, ts
  Sensor: uv_index | fields: ts, level, unit, qc
Task: Retrieve lat from pressure that have at least one matching reading in uv_index sharing the same depth.
Script:

Question:
readings = fetch(
    node=Node("pressure", code="prt"),
    filter=has_match(
        source=Probe("uv_index", code="flx"),
        match="depth",
    ),
    output="lat",
)


Prompt:
Sensor network script:
  Node: evaporation | code: mst | fields: lat, value, ts, depth
  Sensor: pressure | fields: value, type, reading, ts
Task: Get level from evaporation where depth appears in pressure readings with matching qc.
Script:

Question:
readings = fetch(
    node=Node("evaporation", code="mst"),
    filter=set_member(
        field="depth",
        source=Probe("pressure", code="mbl"),
        match="qc",
    ),
    output="level",
)


Prompt:
Sensor network script:
  Node: uv_index | code: clr | fields: lon, unit, lat, value
  Sensor: snow_depth | fields: unit, value, type, lat
Task: Get lat from uv_index where a corresponding entry exists in snow_depth with the same depth.
Script:

Question:
readings = fetch(
    node=Node("uv_index", code="clr"),
    filter=has_match(
        source=Probe("snow_depth", code="snw"),
        match="depth",
    ),
    output="lat",
)


Prompt:
Sensor network script:
  Node: drought_index | code: prt | fields: level, value, depth, lat
  Sensor: dew_point | fields: type, ts, unit, qc
Task: Retrieve level from drought_index whose depth is found in dew_point records where depth matches the outer node.
Script:

Question:
readings = fetch(
    node=Node("drought_index", code="prt"),
    filter=set_member(
        field="depth",
        source=Probe("dew_point", code="cnd"),
        match="depth",
    ),
    output="level",
)


Prompt:
Sensor network script:
  Node: rainfall | code: gst | fields: level, ts, unit, lat
  Sensor: lightning | fields: value, unit, ts, reading
Task: Fetch lon from rainfall where ts exists in lightning sensor data for the same qc.
Script:

Question:
readings = fetch(
    node=Node("rainfall", code="gst"),
    filter=set_member(
        field="ts",
        source=Probe("lightning", code="tnd"),
        match="qc",
    ),
    output="lon",
)


Prompt:
Sensor network script:
  Node: temperature | code: gst | fields: value, ts, type, lon
  Sensor: uv_index | fields: qc, reading, level, unit
Task: Retrieve depth from temperature with reading above the MAX(depth) of uv_index readings sharing the same ts.
Script:

Question:
readings = fetch(
    node=Node("temperature", code="gst"),
    filter=exceeds(
        field="reading",
        threshold=aggregate("MAX", "depth",
                            source=Probe("uv_index", code="flx"),
                            match="ts"),
    ),
    output="depth",
)


Prompt:
Sensor network script:
  Node: frost | code: prt | fields: qc, level, ts, type
  Sensor: wind_speed | fields: qc, reading, lon, depth
Task: Get lat from frost where a corresponding entry exists in wind_speed with the same depth.
Script:

Question:
readings = fetch(
    node=Node("frost", code="prt"),
    filter=has_match(
        source=Probe("wind_speed", code="gst"),
        match="depth",
    ),
    output="lat",
)


Prompt:
Sensor network script:
  Node: pressure | code: mst | fields: unit, type, depth, qc
  Sensor: turbidity | fields: unit, value, ts, depth
Task: Get level from pressure where ts appears in turbidity readings with matching depth.
Script:

Question:
readings = fetch(
    node=Node("pressure", code="mst"),
    filter=set_member(
        field="ts",
        source=Probe("turbidity", code="ftu"),
        match="depth",
    ),
    output="level",
)


Prompt:
Sensor network script:
  Node: uv_index | code: gst | fields: value, qc, lat, reading
  Sensor: air_quality | fields: lat, value, type, unit
Task: Get lon from uv_index where a corresponding entry exists in air_quality with the same ts.
Script:

Question:
readings = fetch(
    node=Node("uv_index", code="gst"),
    filter=has_match(
        source=Probe("air_quality", code="prt"),
        match="ts",
    ),
    output="lon",
)


Prompt:
Sensor network script:
  Node: wind_speed | code: prt | fields: depth, qc, level, ts
  Sensor: turbidity | fields: lon, value, qc, type
Task: Fetch lat from wind_speed where reading is greater than the average of value in turbidity for matching ts.
Script:

Question:
readings = fetch(
    node=Node("wind_speed", code="prt"),
    filter=exceeds(
        field="reading",
        threshold=aggregate("AVG", "value",
                            source=Probe("turbidity", code="ftu"),
                            match="ts"),
    ),
    output="lat",
)


Prompt:
Sensor network script:
  Node: visibility | code: hub | fields: type, value, reading, ts
  Sensor: uv_index | fields: unit, type, level, reading
Task: Retrieve depth from visibility with reading above the MIN(value) of uv_index readings sharing the same qc.
Script:

Question:
readings = fetch(
    node=Node("visibility", code="hub"),
    filter=exceeds(
        field="reading",
        threshold=aggregate("MIN", "value",
                            source=Probe("uv_index", code="flx"),
                            match="qc"),
    ),
    output="depth",
)


Prompt:
Sensor network script:
  Node: visibility | code: clr | fields: reading, ts, lat, unit
  Sensor: lightning | fields: lon, lat, unit, reading
Task: Retrieve value from visibility whose depth is found in lightning records where unit matches the outer node.
Script:

Question:
readings = fetch(
    node=Node("visibility", code="clr"),
    filter=set_member(
        field="depth",
        source=Probe("lightning", code="tnd"),
        match="unit",
    ),
    output="value",
)


Prompt:
Sensor network script:
  Node: evaporation | code: clr | fields: unit, level, type, ts
  Sensor: air_quality | fields: unit, reading, qc, value
Task: Retrieve lat from evaporation whose ts is found in air_quality records where type matches the outer node.
Script:

Question:
readings = fetch(
    node=Node("evaporation", code="clr"),
    filter=set_member(
        field="ts",
        source=Probe("air_quality", code="prt"),
        match="type",
    ),
    output="lat",
)


Prompt:
Sensor network script:
  Node: turbidity | code: mst | fields: type, level, depth, unit
  Sensor: sunlight | fields: lat, ts, reading, unit
Task: Retrieve depth from turbidity that have at least one matching reading in sunlight sharing the same depth.
Script:

Question:
readings = fetch(
    node=Node("turbidity", code="mst"),
    filter=has_match(
        source=Probe("sunlight", code="brt"),
        match="depth",
    ),
    output="depth",
)


Prompt:
Sensor network script:
  Node: humidity | code: gst | fields: depth, lat, ts, reading
  Sensor: air_quality | fields: depth, reading, qc, level
Task: Fetch depth from humidity where depth is greater than the minimum of value in air_quality for matching type.
Script:

Question:
readings = fetch(
    node=Node("humidity", code="gst"),
    filter=exceeds(
        field="depth",
        threshold=aggregate("MIN", "value",
                            source=Probe("air_quality", code="prt"),
                            match="type"),
    ),
    output="depth",
)


Prompt:
Sensor network script:
  Node: drought_index | code: thr | fields: reading, type, level, qc
  Sensor: evaporation | fields: qc, depth, level, type
Task: Get reading from drought_index where qc appears in evaporation readings with matching type.
Script:

Question:
readings = fetch(
    node=Node("drought_index", code="thr"),
    filter=set_member(
        field="qc",
        source=Probe("evaporation", code="evp"),
        match="type",
    ),
    output="reading",
)


Prompt:
Sensor network script:
  Node: drought_index | code: mst | fields: depth, level, qc, reading
  Sensor: temperature | fields: value, depth, qc, unit
Task: Fetch lat from drought_index where unit exists in temperature sensor data for the same ts.
Script:

Question:
readings = fetch(
    node=Node("drought_index", code="mst"),
    filter=set_member(
        field="unit",
        source=Probe("temperature", code="thr"),
        match="ts",
    ),
    output="lat",
)


Prompt:
Sensor network script:
  Node: lightning | code: mst | fields: depth, level, reading, ts
  Sensor: rainfall | fields: qc, level, reading, type
Task: Fetch lat from lightning that have at least one corresponding rainfall measurement for the same depth.
Script:

Question:
readings = fetch(
    node=Node("lightning", code="mst"),
    filter=has_match(
        source=Probe("rainfall", code="rnfl"),
        match="depth",
    ),
    output="lat",
)


Prompt:
Sensor network script:
  Node: sunlight | code: thr | fields: level, unit, lon, qc
  Sensor: visibility | fields: qc, unit, lat, lon
Task: Retrieve lon from sunlight that have at least one matching reading in visibility sharing the same qc.
Script:

Question:
readings = fetch(
    node=Node("sunlight", code="thr"),
    filter=has_match(
        source=Probe("visibility", code="clr"),
        match="qc",
    ),
    output="lon",
)


Prompt:
Sensor network script:
  Node: cloud_cover | code: prt | fields: unit, depth, lon, qc
  Sensor: lightning | fields: reading, qc, type, depth
Task: Retrieve lon from cloud_cover whose depth is found in lightning records where qc matches the outer node.
Script:

Question:
readings = fetch(
    node=Node("cloud_cover", code="prt"),
    filter=set_member(
        field="depth",
        source=Probe("lightning", code="tnd"),
        match="qc",
    ),
    output="lon",
)


Prompt:
Sensor network script:
  Node: lightning | code: mst | fields: ts, type, level, unit
  Sensor: humidity | fields: lon, qc, level, reading
Task: Get lon from lightning where depth exceeds the average depth from humidity for the same depth.
Script:

Question:
readings = fetch(
    node=Node("lightning", code="mst"),
    filter=exceeds(
        field="depth",
        threshold=aggregate("AVG", "depth",
                            source=Probe("humidity", code="hgr"),
                            match="depth"),
    ),
    output="lon",
)


Prompt:
Sensor network script:
  Node: soil_moisture | code: mst | fields: type, reading, value, unit
  Sensor: rainfall | fields: type, level, qc, value
Task: Fetch lat from soil_moisture that have at least one corresponding rainfall measurement for the same type.
Script:

Question:
readings = fetch(
    node=Node("soil_moisture", code="mst"),
    filter=has_match(
        source=Probe("rainfall", code="rnfl"),
        match="type",
    ),
    output="lat",
)


Prompt:
Sensor network script:
  Node: turbidity | code: gst | fields: depth, lat, type, level
  Sensor: visibility | fields: qc, unit, lon, depth
Task: Fetch lat from turbidity where unit exists in visibility sensor data for the same type.
Script:

Question:
readings = fetch(
    node=Node("turbidity", code="gst"),
    filter=set_member(
        field="unit",
        source=Probe("visibility", code="clr"),
        match="type",
    ),
    output="lat",
)


Prompt:
Sensor network script:
  Node: rainfall | code: gst | fields: unit, value, type, qc
  Sensor: dew_point | fields: lon, lat, depth, qc
Task: Get depth from rainfall where value exceeds the count of reading from dew_point for the same qc.
Script:

Question:
readings = fetch(
    node=Node("rainfall", code="gst"),
    filter=exceeds(
        field="value",
        threshold=aggregate("COUNT", "reading",
                            source=Probe("dew_point", code="cnd"),
                            match="qc"),
    ),
    output="depth",
)


Prompt:
Sensor network script:
  Node: wind_speed | code: clr | fields: value, type, lat, depth
  Sensor: drought_index | fields: reading, lat, lon, depth
Task: Get value from wind_speed where a corresponding entry exists in drought_index with the same qc.
Script:

Question:
readings = fetch(
    node=Node("wind_speed", code="clr"),
    filter=has_match(
        source=Probe("drought_index", code="drt"),
        match="qc",
    ),
    output="value",
)


Prompt:
Sensor network script:
  Node: visibility | code: clr | fields: lon, ts, level, unit
  Sensor: uv_index | fields: lat, value, type, lon
Task: Retrieve lon from visibility with depth above the COUNT(reading) of uv_index readings sharing the same unit.
Script:

Question:
readings = fetch(
    node=Node("visibility", code="clr"),
    filter=exceeds(
        field="depth",
        threshold=aggregate("COUNT", "reading",
                            source=Probe("uv_index", code="flx"),
                            match="unit"),
    ),
    output="lon",
)


Prompt:
Sensor network script:
  Node: wind_speed | code: gst | fields: value, unit, lat, depth
  Sensor: temperature | fields: ts, type, lon, reading
Task: Fetch lon from wind_speed that have at least one corresponding temperature measurement for the same qc.
Script:

Question:
readings = fetch(
    node=Node("wind_speed", code="gst"),
    filter=has_match(
        source=Probe("temperature", code="thr"),
        match="qc",
    ),
    output="lon",
)


Prompt:
Sensor network script:
  Node: humidity | code: thr | fields: unit, depth, level, lat
  Sensor: snow_depth | fields: qc, lat, type, depth
Task: Fetch depth from humidity that have at least one corresponding snow_depth measurement for the same unit.
Script:

Question:
readings = fetch(
    node=Node("humidity", code="thr"),
    filter=has_match(
        source=Probe("snow_depth", code="snw"),
        match="unit",
    ),
    output="depth",
)


Prompt:
Sensor network script:
  Node: rainfall | code: stn | fields: value, lat, reading, unit
  Sensor: humidity | fields: lon, level, reading, lat
Task: Get level from rainfall where depth appears in humidity readings with matching type.
Script:

Question:
readings = fetch(
    node=Node("rainfall", code="stn"),
    filter=set_member(
        field="depth",
        source=Probe("humidity", code="hgr"),
        match="type",
    ),
    output="level",
)


Prompt:
Sensor network script:
  Node: temperature | code: gst | fields: lon, ts, level, unit
  Sensor: soil_moisture | fields: reading, depth, level, qc
Task: Get depth from temperature where ts appears in soil_moisture readings with matching ts.
Script:

Question:
readings = fetch(
    node=Node("temperature", code="gst"),
    filter=set_member(
        field="ts",
        source=Probe("soil_moisture", code="grvl"),
        match="ts",
    ),
    output="depth",
)


Prompt:
Sensor network script:
  Node: pressure | code: clr | fields: qc, ts, value, lon
  Sensor: sunlight | fields: unit, reading, qc, value
Task: Retrieve reading from pressure that have at least one matching reading in sunlight sharing the same unit.
Script:

Question:
readings = fetch(
    node=Node("pressure", code="clr"),
    filter=has_match(
        source=Probe("sunlight", code="brt"),
        match="unit",
    ),
    output="reading",
)


Prompt:
Sensor network script:
  Node: drought_index | code: ref | fields: ts, lat, qc, value
  Sensor: lightning | fields: unit, reading, depth, lat
Task: Retrieve reading from drought_index that have at least one matching reading in lightning sharing the same unit.
Script:

Question:
readings = fetch(
    node=Node("drought_index", code="ref"),
    filter=has_match(
        source=Probe("lightning", code="tnd"),
        match="unit",
    ),
    output="reading",
)


Prompt:
Sensor network script:
  Node: lightning | code: ref | fields: ts, qc, reading, lat
  Sensor: rainfall | fields: ts, qc, lon, lat
Task: Retrieve lon from lightning whose qc is found in rainfall records where depth matches the outer node.
Script:

Question:
readings = fetch(
    node=Node("lightning", code="ref"),
    filter=set_member(
        field="qc",
        source=Probe("rainfall", code="rnfl"),
        match="depth",
    ),
    output="lon",
)


Prompt:
Sensor network script:
  Node: soil_moisture | code: stn | fields: lon, ts, unit, level
  Sensor: dew_point | fields: value, ts, depth, type
Task: Retrieve lat from soil_moisture that have at least one matching reading in dew_point sharing the same ts.
Script:

Question:
readings = fetch(
    node=Node("soil_moisture", code="stn"),
    filter=has_match(
        source=Probe("dew_point", code="cnd"),
        match="ts",
    ),
    output="lat",
)


Prompt:
Sensor network script:
  Node: evaporation | code: prt | fields: lat, ts, type, unit
  Sensor: rainfall | fields: qc, value, ts, depth
Task: Fetch value from evaporation where type exists in rainfall sensor data for the same unit.
Script:

Question:
readings = fetch(
    node=Node("evaporation", code="prt"),
    filter=set_member(
        field="type",
        source=Probe("rainfall", code="rnfl"),
        match="unit",
    ),
    output="value",
)


Prompt:
Sensor network script:
  Node: snow_depth | code: stn | fields: qc, depth, unit, type
  Sensor: dew_point | fields: ts, lat, type, lon
Task: Retrieve value from snow_depth with reading above the MIN(depth) of dew_point readings sharing the same depth.
Script:

Question:
readings = fetch(
    node=Node("snow_depth", code="stn"),
    filter=exceeds(
        field="reading",
        threshold=aggregate("MIN", "depth",
                            source=Probe("dew_point", code="cnd"),
                            match="depth"),
    ),
    output="value",
)


Prompt:
Sensor network script:
  Node: sunlight | code: hub | fields: value, unit, type, qc
  Sensor: dew_point | fields: level, reading, type, unit
Task: Retrieve reading from sunlight with value above the MAX(reading) of dew_point readings sharing the same depth.
Script:

Question:
readings = fetch(
    node=Node("sunlight", code="hub"),
    filter=exceeds(
        field="value",
        threshold=aggregate("MAX", "reading",
                            source=Probe("dew_point", code="cnd"),
                            match="depth"),
    ),
    output="reading",
)


Prompt:
Sensor network script:
  Node: sunlight | code: prt | fields: value, depth, lon, ts
  Sensor: cloud_cover | fields: type, value, ts, depth
Task: Retrieve level from sunlight with depth above the SUM(depth) of cloud_cover readings sharing the same qc.
Script:

Question:
readings = fetch(
    node=Node("sunlight", code="prt"),
    filter=exceeds(
        field="depth",
        threshold=aggregate("SUM", "depth",
                            source=Probe("cloud_cover", code="nbl"),
                            match="qc"),
    ),
    output="level",
)


Prompt:
Sensor network script:
  Node: uv_index | code: hub | fields: lat, qc, ts, type
  Sensor: wind_speed | fields: ts, depth, lat, qc
Task: Fetch depth from uv_index where value is greater than the minimum of value in wind_speed for matching qc.
Script:

Question:
readings = fetch(
    node=Node("uv_index", code="hub"),
    filter=exceeds(
        field="value",
        threshold=aggregate("MIN", "value",
                            source=Probe("wind_speed", code="gst"),
                            match="qc"),
    ),
    output="depth",
)


Prompt:
Sensor network script:
  Node: air_quality | code: thr | fields: value, reading, type, depth
  Sensor: turbidity | fields: unit, lat, ts, lon
Task: Get value from air_quality where a corresponding entry exists in turbidity with the same depth.
Script:

Question:
readings = fetch(
    node=Node("air_quality", code="thr"),
    filter=has_match(
        source=Probe("turbidity", code="ftu"),
        match="depth",
    ),
    output="value",
)


Prompt:
Sensor network script:
  Node: uv_index | code: ref | fields: value, depth, type, reading
  Sensor: evaporation | fields: level, depth, qc, type
Task: Fetch depth from uv_index where unit exists in evaporation sensor data for the same depth.
Script:

Question:
readings = fetch(
    node=Node("uv_index", code="ref"),
    filter=set_member(
        field="unit",
        source=Probe("evaporation", code="evp"),
        match="depth",
    ),
    output="depth",
)


Prompt:
Sensor network script:
  Node: snow_depth | code: hub | fields: reading, depth, ts, value
  Sensor: rainfall | fields: depth, ts, type, lon
Task: Retrieve level from snow_depth that have at least one matching reading in rainfall sharing the same type.
Script:

Question:
readings = fetch(
    node=Node("snow_depth", code="hub"),
    filter=has_match(
        source=Probe("rainfall", code="rnfl"),
        match="type",
    ),
    output="level",
)


Prompt:
Sensor network script:
  Node: rainfall | code: hub | fields: lon, unit, depth, value
  Sensor: dew_point | fields: ts, level, lon, unit
Task: Get depth from rainfall where unit appears in dew_point readings with matching ts.
Script:

Question:
readings = fetch(
    node=Node("rainfall", code="hub"),
    filter=set_member(
        field="unit",
        source=Probe("dew_point", code="cnd"),
        match="ts",
    ),
    output="depth",
)


Prompt:
Sensor network script:
  Node: sunlight | code: thr | fields: value, ts, level, unit
  Sensor: turbidity | fields: unit, ts, depth, lon
Task: Retrieve depth from sunlight that have at least one matching reading in turbidity sharing the same unit.
Script:

Question:
readings = fetch(
    node=Node("sunlight", code="thr"),
    filter=has_match(
        source=Probe("turbidity", code="ftu"),
        match="unit",
    ),
    output="depth",
)


Prompt:
Sensor network script:
  Node: pressure | code: thr | fields: reading, unit, type, ts
  Sensor: turbidity | fields: level, lon, value, ts
Task: Get depth from pressure where unit appears in turbidity readings with matching qc.
Script:

Question:
readings = fetch(
    node=Node("pressure", code="thr"),
    filter=set_member(
        field="unit",
        source=Probe("turbidity", code="ftu"),
        match="qc",
    ),
    output="depth",
)