sharkiefff/RBAC-Text2SQL-Benchmark huggingface dataset:
Database: polar_equipment
Question: I need to see the water situation at all of our stations. Can you give me a list showing each station's name, its water quality score, and the water tank level? Also, add a simple category based on our standard classification system for water quality. Make sure every station shows up, even the ones we don't have water readings for, and list them alphabetically.
Role: DataOperator_1
DDL allowed: yes
INSERT allowed on tables: CabinEnvironment, ChassisAndVehicle, Communication, EngineAndFluids, Equipment, EquipmentType, LightingAndSafety, Location, PowerBattery, StationEquipmentType, ThermalSolarWindAndGrid, Transmission, WaterAndWaste
DELETE allowed on tables: CabinEnvironment, ChassisAndVehicle, Communication, EngineAndFluids, Equipment, EquipmentType, LightingAndSafety, Location, PowerBattery, StationEquipmentType, ThermalSolarWindAndGrid, Transmission, WaterAndWaste
Table-level permissions:
CabinEnvironment: SELECT: *
UPDATE: *
ChassisAndVehicle: SELECT: *
UPDATE: *
Communication: SELECT: COMM_ID, GPS_signal, antenna_stat, btStatus, dataRate_kbps, radioFreq_mhz, radioSignal_dBm, wifiSignal_dBm
UPDATE: COMM_ID, GPS_signal, antenna_stat, btStatus, dataRate_kbps, radioFreq_mhz, radioSignal_dBm, wifiSignal_dBm
EngineAndFluids: SELECT: *
UPDATE: *
Equipment: SELECT: EQUIP_CODE, EquipType, MakerName, RELIAB_IDX, SERVICE_YRS, model_name
UPDATE: EQUIP_CODE, EquipType, MakerName, RELIAB_IDX, SERVICE_YRS, model_name
EquipmentType: SELECT: *
UPDATE: *
LightingAndSafety: SELECT: O2SupplyStat, emerLightStat, extLightStat, fireDetectStat, gasDetectStat, lightIntensityPct, lightingStat, medEquipStat, safetySysStat, wasteMgmtStat, waterSupplyStat
UPDATE: O2SupplyStat, emerLightStat, extLightStat, fireDetectStat, gasDetectStat, lightIntensityPct, lightingStat, medEquipStat, safetySysStat, wasteMgmtStat, waterSupplyStat
Location: SELECT: LAT_deg, LON_deg, STATION_name, TimeStamp, altitude_m
UPDATE: LAT_deg, LON_deg, STATION_name, TimeStamp, altitude_m
PowerBattery: SELECT: battery_telemetry
UPDATE: battery_telemetry
StationEquipmentType: SELECT: *
UPDATE: *
ThermalSolarWindAndGrid: SELECT: H2LevelPct, O2LevelPct, THERMAL_ID, fuelCellOutput_w, fuelCellStat, insulationStat, powerGridStat, solarEffPct, solarOutput_w, solarTempC, thermalImgStat, windRPM, windTurbineStat
UPDATE: H2LevelPct, O2LevelPct, THERMAL_ID, fuelCellOutput_w, fuelCellStat, insulationStat, powerGridStat, solarEffPct, solarOutput_w, solarTempC, thermalImgStat, windRPM, windTurbineStat
Transmission: SELECT: TRANS_ID, TRANS_gear, axleTempC, diffTempC, transPress_kpa
UPDATE: TRANS_ID, TRANS_gear, axleTempC, diffTempC, transPress_kpa
WaterAndWaste: SELECT: WATER_ID, wasteTankPct, waterFlow_lpm, waterLevelPct, waterTempC
UPDATE: WATER_ID, wasteTankPct, waterFlow_lpm, waterLevelPct, waterTempC
Operation: SELECT
Access allowed: yes
Database: polar_equipment
Question: To make things easier, can we build a reusable tool to figure out the index of energy sustainability? I need a function called 'calculate_esi' that takes an efficiency number and a power source name, and then just spits out the ESI score.
Role: DataOperator_1
DDL allowed: yes
INSERT allowed on tables: CabinEnvironment, ChassisAndVehicle, Communication, EngineAndFluids, Equipment, EquipmentType, LightingAndSafety, Location, PowerBattery, StationEquipmentType, ThermalSolarWindAndGrid, Transmission, WaterAndWaste
DELETE allowed on tables: CabinEnvironment, ChassisAndVehicle, Communication, EngineAndFluids, Equipment, EquipmentType, LightingAndSafety, Location, PowerBattery, StationEquipmentType, ThermalSolarWindAndGrid, Transmission, WaterAndWaste
Table-level permissions:
CabinEnvironment: SELECT: *
UPDATE: *
ChassisAndVehicle: SELECT: *
UPDATE: *
Communication: SELECT: COMM_ID, GPS_signal, antenna_stat, btStatus, dataRate_kbps, radioFreq_mhz, radioSignal_dBm, wifiSignal_dBm
UPDATE: COMM_ID, GPS_signal, antenna_stat, btStatus, dataRate_kbps, radioFreq_mhz, radioSignal_dBm, wifiSignal_dBm
EngineAndFluids: SELECT: *
UPDATE: *
Equipment: SELECT: EQUIP_CODE, EquipType, MakerName, RELIAB_IDX, SERVICE_YRS, model_name
UPDATE: EQUIP_CODE, EquipType, MakerName, RELIAB_IDX, SERVICE_YRS, model_name
EquipmentType: SELECT: *
UPDATE: *
LightingAndSafety: SELECT: O2SupplyStat, emerLightStat, extLightStat, fireDetectStat, gasDetectStat, lightIntensityPct, lightingStat, medEquipStat, safetySysStat, wasteMgmtStat, waterSupplyStat
UPDATE: O2SupplyStat, emerLightStat, extLightStat, fireDetectStat, gasDetectStat, lightIntensityPct, lightingStat, medEquipStat, safetySysStat, wasteMgmtStat, waterSupplyStat
Location: SELECT: LAT_deg, LON_deg, STATION_name, TimeStamp, altitude_m
UPDATE: LAT_deg, LON_deg, STATION_name, TimeStamp, altitude_m
PowerBattery: SELECT: battery_telemetry
UPDATE: battery_telemetry
StationEquipmentType: SELECT: *
UPDATE: *
ThermalSolarWindAndGrid: SELECT: H2LevelPct, O2LevelPct, THERMAL_ID, fuelCellOutput_w, fuelCellStat, insulationStat, powerGridStat, solarEffPct, solarOutput_w, solarTempC, thermalImgStat, windRPM, windTurbineStat
UPDATE: H2LevelPct, O2LevelPct, THERMAL_ID, fuelCellOutput_w, fuelCellStat, insulationStat, powerGridStat, solarEffPct, solarOutput_w, solarTempC, thermalImgStat, windRPM, windTurbineStat
Transmission: SELECT: TRANS_ID, TRANS_gear, axleTempC, diffTempC, transPress_kpa
UPDATE: TRANS_ID, TRANS_gear, axleTempC, diffTempC, transPress_kpa
WaterAndWaste: SELECT: WATER_ID, wasteTankPct, waterFlow_lpm, waterLevelPct, waterTempC
UPDATE: WATER_ID, wasteTankPct, waterFlow_lpm, waterLevelPct, waterTempC
Operation: CREATE
Access allowed: yes
Database: polar_equipment
Question: Our queries filtering scientific equipment by reliability are slow. Can you create a special index called 'idx_scientific_reliability' to speed things up? It should be built directly on the reliability score calculation so we can find our most reliable gear faster.
Role: DataOperator_1
DDL allowed: yes
INSERT allowed on tables: CabinEnvironment, ChassisAndVehicle, Communication, EngineAndFluids, Equipment, EquipmentType, LightingAndSafety, Location, PowerBattery, StationEquipmentType, ThermalSolarWindAndGrid, Transmission, WaterAndWaste
DELETE allowed on tables: CabinEnvironment, ChassisAndVehicle, Communication, EngineAndFluids, Equipment, EquipmentType, LightingAndSafety, Location, PowerBattery, StationEquipmentType, ThermalSolarWindAndGrid, Transmission, WaterAndWaste
Table-level permissions:
CabinEnvironment: SELECT: *
UPDATE: *
ChassisAndVehicle: SELECT: *
UPDATE: *
Communication: SELECT: COMM_ID, GPS_signal, antenna_stat, btStatus, dataRate_kbps, radioFreq_mhz, radioSignal_dBm, wifiSignal_dBm
UPDATE: COMM_ID, GPS_signal, antenna_stat, btStatus, dataRate_kbps, radioFreq_mhz, radioSignal_dBm, wifiSignal_dBm
EngineAndFluids: SELECT: *
UPDATE: *
Equipment: SELECT: EQUIP_CODE, EquipType, MakerName, RELIAB_IDX, SERVICE_YRS, model_name
UPDATE: EQUIP_CODE, EquipType, MakerName, RELIAB_IDX, SERVICE_YRS, model_name
EquipmentType: SELECT: *
UPDATE: *
LightingAndSafety: SELECT: O2SupplyStat, emerLightStat, extLightStat, fireDetectStat, gasDetectStat, lightIntensityPct, lightingStat, medEquipStat, safetySysStat, wasteMgmtStat, waterSupplyStat
UPDATE: O2SupplyStat, emerLightStat, extLightStat, fireDetectStat, gasDetectStat, lightIntensityPct, lightingStat, medEquipStat, safetySysStat, wasteMgmtStat, waterSupplyStat
Location: SELECT: LAT_deg, LON_deg, STATION_name, TimeStamp, altitude_m
UPDATE: LAT_deg, LON_deg, STATION_name, TimeStamp, altitude_m
PowerBattery: SELECT: battery_telemetry
UPDATE: battery_telemetry
StationEquipmentType: SELECT: *
UPDATE: *
ThermalSolarWindAndGrid: SELECT: H2LevelPct, O2LevelPct, THERMAL_ID, fuelCellOutput_w, fuelCellStat, insulationStat, powerGridStat, solarEffPct, solarOutput_w, solarTempC, thermalImgStat, windRPM, windTurbineStat
UPDATE: H2LevelPct, O2LevelPct, THERMAL_ID, fuelCellOutput_w, fuelCellStat, insulationStat, powerGridStat, solarEffPct, solarOutput_w, solarTempC, thermalImgStat, windRPM, windTurbineStat
Transmission: SELECT: TRANS_ID, TRANS_gear, axleTempC, diffTempC, transPress_kpa
UPDATE: TRANS_ID, TRANS_gear, axleTempC, diffTempC, transPress_kpa
WaterAndWaste: SELECT: WATER_ID, wasteTankPct, waterFlow_lpm, waterLevelPct, waterTempC
UPDATE: WATER_ID, wasteTankPct, waterFlow_lpm, waterLevelPct, waterTempC
Operation: CREATE
Access allowed: yes
Database: polar_equipment
Question: Let's reward the well-maintained cabins. For any equipment that's in a cabin meeting our 'habitability standard', can you give its reliability index a 15% boost?
Role: DataOperator_1
DDL allowed: yes
INSERT allowed on tables: CabinEnvironment, ChassisAndVehicle, Communication, EngineAndFluids, Equipment, EquipmentType, LightingAndSafety, Location, PowerBattery, StationEquipmentType, ThermalSolarWindAndGrid, Transmission, WaterAndWaste
DELETE allowed on tables: CabinEnvironment, ChassisAndVehicle, Communication, EngineAndFluids, Equipment, EquipmentType, LightingAndSafety, Location, PowerBattery, StationEquipmentType, ThermalSolarWindAndGrid, Transmission, WaterAndWaste
Table-level permissions:
CabinEnvironment: SELECT: *
UPDATE: *
ChassisAndVehicle: SELECT: *
UPDATE: *
Communication: SELECT: COMM_ID, GPS_signal, antenna_stat, btStatus, dataRate_kbps, radioFreq_mhz, radioSignal_dBm, wifiSignal_dBm
UPDATE: COMM_ID, GPS_signal, antenna_stat, btStatus, dataRate_kbps, radioFreq_mhz, radioSignal_dBm, wifiSignal_dBm
EngineAndFluids: SELECT: *
UPDATE: *
Equipment: SELECT: EQUIP_CODE, EquipType, MakerName, RELIAB_IDX, SERVICE_YRS, model_name
UPDATE: EQUIP_CODE, EquipType, MakerName, RELIAB_IDX, SERVICE_YRS, model_name
EquipmentType: SELECT: *
UPDATE: *
LightingAndSafety: SELECT: O2SupplyStat, emerLightStat, extLightStat, fireDetectStat, gasDetectStat, lightIntensityPct, lightingStat, medEquipStat, safetySysStat, wasteMgmtStat, waterSupplyStat
UPDATE: O2SupplyStat, emerLightStat, extLightStat, fireDetectStat, gasDetectStat, lightIntensityPct, lightingStat, medEquipStat, safetySysStat, wasteMgmtStat, waterSupplyStat
Location: SELECT: LAT_deg, LON_deg, STATION_name, TimeStamp, altitude_m
UPDATE: LAT_deg, LON_deg, STATION_name, TimeStamp, altitude_m
PowerBattery: SELECT: battery_telemetry
UPDATE: battery_telemetry
StationEquipmentType: SELECT: *
UPDATE: *
ThermalSolarWindAndGrid: SELECT: H2LevelPct, O2LevelPct, THERMAL_ID, fuelCellOutput_w, fuelCellStat, insulationStat, powerGridStat, solarEffPct, solarOutput_w, solarTempC, thermalImgStat, windRPM, windTurbineStat
UPDATE: H2LevelPct, O2LevelPct, THERMAL_ID, fuelCellOutput_w, fuelCellStat, insulationStat, powerGridStat, solarEffPct, solarOutput_w, solarTempC, thermalImgStat, windRPM, windTurbineStat
Transmission: SELECT: TRANS_ID, TRANS_gear, axleTempC, diffTempC, transPress_kpa
UPDATE: TRANS_ID, TRANS_gear, axleTempC, diffTempC, transPress_kpa
WaterAndWaste: SELECT: WATER_ID, wasteTankPct, waterFlow_lpm, waterLevelPct, waterTempC
UPDATE: WATER_ID, wasteTankPct, waterFlow_lpm, waterLevelPct, waterTempC
Operation: UPDATE
Access allowed: yes
Database: polar_equipment
Question: I need a simple way to check on water usage for our dashboards. Can you create a view called 'water_management_view'? It should show the equipment ID, its calculated water management score, and categorize each of them based on the status classification of water resource management. Let's base it on all equipment that has water level data.
Role: DataOperator_1
DDL allowed: yes
INSERT allowed on tables: CabinEnvironment, ChassisAndVehicle, Communication, EngineAndFluids, Equipment, EquipmentType, LightingAndSafety, Location, PowerBattery, StationEquipmentType, ThermalSolarWindAndGrid, Transmission, WaterAndWaste
DELETE allowed on tables: CabinEnvironment, ChassisAndVehicle, Communication, EngineAndFluids, Equipment, EquipmentType, LightingAndSafety, Location, PowerBattery, StationEquipmentType, ThermalSolarWindAndGrid, Transmission, WaterAndWaste
Table-level permissions:
CabinEnvironment: SELECT: *
UPDATE: *
ChassisAndVehicle: SELECT: *
UPDATE: *
Communication: SELECT: COMM_ID, GPS_signal, antenna_stat, btStatus, dataRate_kbps, radioFreq_mhz, radioSignal_dBm, wifiSignal_dBm
UPDATE: COMM_ID, GPS_signal, antenna_stat, btStatus, dataRate_kbps, radioFreq_mhz, radioSignal_dBm, wifiSignal_dBm
EngineAndFluids: SELECT: *
UPDATE: *
Equipment: SELECT: EQUIP_CODE, EquipType, MakerName, RELIAB_IDX, SERVICE_YRS, model_name
UPDATE: EQUIP_CODE, EquipType, MakerName, RELIAB_IDX, SERVICE_YRS, model_name
EquipmentType: SELECT: *
UPDATE: *
LightingAndSafety: SELECT: O2SupplyStat, emerLightStat, extLightStat, fireDetectStat, gasDetectStat, lightIntensityPct, lightingStat, medEquipStat, safetySysStat, wasteMgmtStat, waterSupplyStat
UPDATE: O2SupplyStat, emerLightStat, extLightStat, fireDetectStat, gasDetectStat, lightIntensityPct, lightingStat, medEquipStat, safetySysStat, wasteMgmtStat, waterSupplyStat
Location: SELECT: LAT_deg, LON_deg, STATION_name, TimeStamp, altitude_m
UPDATE: LAT_deg, LON_deg, STATION_name, TimeStamp, altitude_m
PowerBattery: SELECT: battery_telemetry
UPDATE: battery_telemetry
StationEquipmentType: SELECT: *
UPDATE: *
ThermalSolarWindAndGrid: SELECT: H2LevelPct, O2LevelPct, THERMAL_ID, fuelCellOutput_w, fuelCellStat, insulationStat, powerGridStat, solarEffPct, solarOutput_w, solarTempC, thermalImgStat, windRPM, windTurbineStat
UPDATE: H2LevelPct, O2LevelPct, THERMAL_ID, fuelCellOutput_w, fuelCellStat, insulationStat, powerGridStat, solarEffPct, solarOutput_w, solarTempC, thermalImgStat, windRPM, windTurbineStat
Transmission: SELECT: TRANS_ID, TRANS_gear, axleTempC, diffTempC, transPress_kpa
UPDATE: TRANS_ID, TRANS_gear, axleTempC, diffTempC, transPress_kpa
WaterAndWaste: SELECT: WATER_ID, wasteTankPct, waterFlow_lpm, waterLevelPct, waterTempC
UPDATE: WATER_ID, wasteTankPct, waterFlow_lpm, waterLevelPct, waterTempC
Operation: CREATE
Access allowed: yes
Database: polar_equipment
Question: We need a standard way to calculate the performance coefficient for vehicles. Can you build a function called 'calculate_vpc' that takes brake wear, track wear, speed, and engine load as inputs? It's important that it's robust, so please make sure it throws an error if any of the input values are out of the expected range.
Role: DataOperator_1
DDL allowed: yes
INSERT allowed on tables: CabinEnvironment, ChassisAndVehicle, Communication, EngineAndFluids, Equipment, EquipmentType, LightingAndSafety, Location, PowerBattery, StationEquipmentType, ThermalSolarWindAndGrid, Transmission, WaterAndWaste
DELETE allowed on tables: CabinEnvironment, ChassisAndVehicle, Communication, EngineAndFluids, Equipment, EquipmentType, LightingAndSafety, Location, PowerBattery, StationEquipmentType, ThermalSolarWindAndGrid, Transmission, WaterAndWaste
Table-level permissions:
CabinEnvironment: SELECT: *
UPDATE: *
ChassisAndVehicle: SELECT: *
UPDATE: *
Communication: SELECT: COMM_ID, GPS_signal, antenna_stat, btStatus, dataRate_kbps, radioFreq_mhz, radioSignal_dBm, wifiSignal_dBm
UPDATE: COMM_ID, GPS_signal, antenna_stat, btStatus, dataRate_kbps, radioFreq_mhz, radioSignal_dBm, wifiSignal_dBm
EngineAndFluids: SELECT: *
UPDATE: *
Equipment: SELECT: EQUIP_CODE, EquipType, MakerName, RELIAB_IDX, SERVICE_YRS, model_name
UPDATE: EQUIP_CODE, EquipType, MakerName, RELIAB_IDX, SERVICE_YRS, model_name
EquipmentType: SELECT: *
UPDATE: *
LightingAndSafety: SELECT: O2SupplyStat, emerLightStat, extLightStat, fireDetectStat, gasDetectStat, lightIntensityPct, lightingStat, medEquipStat, safetySysStat, wasteMgmtStat, waterSupplyStat
UPDATE: O2SupplyStat, emerLightStat, extLightStat, fireDetectStat, gasDetectStat, lightIntensityPct, lightingStat, medEquipStat, safetySysStat, wasteMgmtStat, waterSupplyStat
Location: SELECT: LAT_deg, LON_deg, STATION_name, TimeStamp, altitude_m
UPDATE: LAT_deg, LON_deg, STATION_name, TimeStamp, altitude_m
PowerBattery: SELECT: battery_telemetry
UPDATE: battery_telemetry
StationEquipmentType: SELECT: *
UPDATE: *
ThermalSolarWindAndGrid: SELECT: H2LevelPct, O2LevelPct, THERMAL_ID, fuelCellOutput_w, fuelCellStat, insulationStat, powerGridStat, solarEffPct, solarOutput_w, solarTempC, thermalImgStat, windRPM, windTurbineStat
UPDATE: H2LevelPct, O2LevelPct, THERMAL_ID, fuelCellOutput_w, fuelCellStat, insulationStat, powerGridStat, solarEffPct, solarOutput_w, solarTempC, thermalImgStat, windRPM, windTurbineStat
Transmission: SELECT: TRANS_ID, TRANS_gear, axleTempC, diffTempC, transPress_kpa
UPDATE: TRANS_ID, TRANS_gear, axleTempC, diffTempC, transPress_kpa
WaterAndWaste: SELECT: WATER_ID, wasteTankPct, waterFlow_lpm, waterLevelPct, waterTempC
UPDATE: WATER_ID, wasteTankPct, waterFlow_lpm, waterLevelPct, waterTempC
Operation: CREATE
Access allowed: yes
Database: polar_equipment
Question: I want a standard way to figure out how reliable our life support systems are. Can you build a reusable function called get_lssr that takes an equipment ID and gives back its life support score? It should be based on our formulas for how ready the gear is and how well its insulation is holding up. Make sure the calculator doesn't break if some of the sensor data is missing; it should just return zero in that case.
Role: DataOperator_1
DDL allowed: yes
INSERT allowed on tables: CabinEnvironment, ChassisAndVehicle, Communication, EngineAndFluids, Equipment, EquipmentType, LightingAndSafety, Location, PowerBattery, StationEquipmentType, ThermalSolarWindAndGrid, Transmission, WaterAndWaste
DELETE allowed on tables: CabinEnvironment, ChassisAndVehicle, Communication, EngineAndFluids, Equipment, EquipmentType, LightingAndSafety, Location, PowerBattery, StationEquipmentType, ThermalSolarWindAndGrid, Transmission, WaterAndWaste
Table-level permissions:
CabinEnvironment: SELECT: *
UPDATE: *
ChassisAndVehicle: SELECT: *
UPDATE: *
Communication: SELECT: COMM_ID, GPS_signal, antenna_stat, btStatus, dataRate_kbps, radioFreq_mhz, radioSignal_dBm, wifiSignal_dBm
UPDATE: COMM_ID, GPS_signal, antenna_stat, btStatus, dataRate_kbps, radioFreq_mhz, radioSignal_dBm, wifiSignal_dBm
EngineAndFluids: SELECT: *
UPDATE: *
Equipment: SELECT: EQUIP_CODE, EquipType, MakerName, RELIAB_IDX, SERVICE_YRS, model_name
UPDATE: EQUIP_CODE, EquipType, MakerName, RELIAB_IDX, SERVICE_YRS, model_name
EquipmentType: SELECT: *
UPDATE: *
LightingAndSafety: SELECT: O2SupplyStat, emerLightStat, extLightStat, fireDetectStat, gasDetectStat, lightIntensityPct, lightingStat, medEquipStat, safetySysStat, wasteMgmtStat, waterSupplyStat
UPDATE: O2SupplyStat, emerLightStat, extLightStat, fireDetectStat, gasDetectStat, lightIntensityPct, lightingStat, medEquipStat, safetySysStat, wasteMgmtStat, waterSupplyStat
Location: SELECT: LAT_deg, LON_deg, STATION_name, TimeStamp, altitude_m
UPDATE: LAT_deg, LON_deg, STATION_name, TimeStamp, altitude_m
PowerBattery: SELECT: battery_telemetry
UPDATE: battery_telemetry
StationEquipmentType: SELECT: *
UPDATE: *
ThermalSolarWindAndGrid: SELECT: H2LevelPct, O2LevelPct, THERMAL_ID, fuelCellOutput_w, fuelCellStat, insulationStat, powerGridStat, solarEffPct, solarOutput_w, solarTempC, thermalImgStat, windRPM, windTurbineStat
UPDATE: H2LevelPct, O2LevelPct, THERMAL_ID, fuelCellOutput_w, fuelCellStat, insulationStat, powerGridStat, solarEffPct, solarOutput_w, solarTempC, thermalImgStat, windRPM, windTurbineStat
Transmission: SELECT: TRANS_ID, TRANS_gear, axleTempC, diffTempC, transPress_kpa
UPDATE: TRANS_ID, TRANS_gear, axleTempC, diffTempC, transPress_kpa
WaterAndWaste: SELECT: WATER_ID, wasteTankPct, waterFlow_lpm, waterLevelPct, waterTempC
UPDATE: WATER_ID, wasteTankPct, waterFlow_lpm, waterLevelPct, waterTempC
Operation: CREATE
Access allowed: yes
Database: polar_equipment
Question: Let's find our most problematic equipment. I need a list of all assets that are both performing poorly—let's use an a rating to calculate equipment efficiency below 40 as the cutoff—and are also more expensive to maintain than other gear in their same category. For each one that meets these criteria, please log its equipment code in our review system table called EquipmentReviewLog, create if it doesn't exists, and note the reason it was flagged.
Role: DataOperator_1
DDL allowed: yes
INSERT allowed on tables: CabinEnvironment, ChassisAndVehicle, Communication, EngineAndFluids, Equipment, EquipmentType, LightingAndSafety, Location, PowerBattery, StationEquipmentType, ThermalSolarWindAndGrid, Transmission, WaterAndWaste
DELETE allowed on tables: CabinEnvironment, ChassisAndVehicle, Communication, EngineAndFluids, Equipment, EquipmentType, LightingAndSafety, Location, PowerBattery, StationEquipmentType, ThermalSolarWindAndGrid, Transmission, WaterAndWaste
Table-level permissions:
CabinEnvironment: SELECT: *
UPDATE: *
ChassisAndVehicle: SELECT: *
UPDATE: *
Communication: SELECT: COMM_ID, GPS_signal, antenna_stat, btStatus, dataRate_kbps, radioFreq_mhz, radioSignal_dBm, wifiSignal_dBm
UPDATE: COMM_ID, GPS_signal, antenna_stat, btStatus, dataRate_kbps, radioFreq_mhz, radioSignal_dBm, wifiSignal_dBm
EngineAndFluids: SELECT: *
UPDATE: *
Equipment: SELECT: EQUIP_CODE, EquipType, MakerName, RELIAB_IDX, SERVICE_YRS, model_name
UPDATE: EQUIP_CODE, EquipType, MakerName, RELIAB_IDX, SERVICE_YRS, model_name
EquipmentType: SELECT: *
UPDATE: *
LightingAndSafety: SELECT: O2SupplyStat, emerLightStat, extLightStat, fireDetectStat, gasDetectStat, lightIntensityPct, lightingStat, medEquipStat, safetySysStat, wasteMgmtStat, waterSupplyStat
UPDATE: O2SupplyStat, emerLightStat, extLightStat, fireDetectStat, gasDetectStat, lightIntensityPct, lightingStat, medEquipStat, safetySysStat, wasteMgmtStat, waterSupplyStat
Location: SELECT: LAT_deg, LON_deg, STATION_name, TimeStamp, altitude_m
UPDATE: LAT_deg, LON_deg, STATION_name, TimeStamp, altitude_m
PowerBattery: SELECT: battery_telemetry
UPDATE: battery_telemetry
StationEquipmentType: SELECT: *
UPDATE: *
ThermalSolarWindAndGrid: SELECT: H2LevelPct, O2LevelPct, THERMAL_ID, fuelCellOutput_w, fuelCellStat, insulationStat, powerGridStat, solarEffPct, solarOutput_w, solarTempC, thermalImgStat, windRPM, windTurbineStat
UPDATE: H2LevelPct, O2LevelPct, THERMAL_ID, fuelCellOutput_w, fuelCellStat, insulationStat, powerGridStat, solarEffPct, solarOutput_w, solarTempC, thermalImgStat, windRPM, windTurbineStat
Transmission: SELECT: TRANS_ID, TRANS_gear, axleTempC, diffTempC, transPress_kpa
UPDATE: TRANS_ID, TRANS_gear, axleTempC, diffTempC, transPress_kpa
WaterAndWaste: SELECT: WATER_ID, wasteTankPct, waterFlow_lpm, waterLevelPct, waterTempC
UPDATE: WATER_ID, wasteTankPct, waterFlow_lpm, waterLevelPct, waterTempC
Operation: CREATE
Access allowed: yes